Skip to content

Commit

Permalink
Release v2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
arobenko committed Sep 28, 2024
2 parents cbb0baf + 745531a commit e046a87
Show file tree
Hide file tree
Showing 10 changed files with 252 additions and 47 deletions.
151 changes: 143 additions & 8 deletions .github/workflows/actions_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Github Actions Build
on: [push]

env:
COMMS_TAG: v5.2.5
COMMSDSL_TAG: v6.3.3
CC_TOOLS_QT_TAG: v5.3.1
COMMS_TAG: v5.2.7
COMMSDSL_TAG: v6.3.4
CC_TOOLS_QT_TAG: v5.3.3

jobs:
build_gcc_old_ubuntu_20_04:
Expand Down Expand Up @@ -199,6 +199,70 @@ jobs:
run: cmake --build . --config ${{matrix.type}} --target install
env:
VERBOSE: 1

build_gcc_ubuntu_24_04:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
type: [Debug, Release, MinSizeRel]
cc_ver: [13, 14]
cpp: [11, 14, 17, 20, 23]
qt_ver: [5, 6]
exclude:
- cc_ver: 13
cpp: 23

steps:
- uses: actions/checkout@v4

- name: Prepare Install
run: sudo apt-get update --fix-missing

- name: Install Packages
run: |
sudo apt install libqt${{matrix.qt_ver}}gui${{matrix.qt_ver}} qtbase5-dev qt6-base-dev libboost-all-dev libxml2-dev gcc-${{matrix.cc_ver}} g++-${{matrix.cc_ver}} \
python3 libpython3-dev swig default-jdk default-jre emscripten
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Prepare externals
shell: bash
run: $GITHUB_WORKSPACE/script/prepare_externals.sh
env:
BUILD_DIR: ${{runner.workspace}}/build
CC: gcc-${{matrix.cc_ver}}
CXX: g++-${{matrix.cc_ver}}
EXTERNALS_DIR: ${{runner.workspace}}/externals
COMMON_INSTALL_DIR: ${{runner.workspace}}/build/install
COMMON_BUILD_TYPE: ${{matrix.type}}
COMMON_CXX_STANDARD: ${{matrix.cpp}}
COMMS_TAG: ${{env.COMMS_TAG}}
COMMSDSL_TAG: ${{env.COMMSDSL_TAG}}
CC_TOOLS_QT_TAG: ${{env.CC_TOOLS_QT_TAG}}
CC_TOOLS_QT_MAJOR_QT_VERSION: ${{matrix.qt_ver}}

- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_PREFIX_PATH=${{runner.workspace}}/build/install -DCMAKE_CXX_STANDARD=${{matrix.cpp}} \
-DUBLOX_GEN_PROTOCOL=ON -DUBLOX_GEN_TEST=ON -DUBLOX_GEN_TOOLS=ON -DUBLOX_BUILD_TOOLS=${{env.BUILD_TOOLS}} \
-DUBLOX_GEN_SWIG=ON -DUBLOX_GEN_EMSCRIPTEN=ON -DUBLOX_BUILD_EXAMPLES=ON -DUBLOX_TOOLS_QT_VER=${{matrix.qt_ver}} \
-DUBLOX_SCHEMA_FILES_LIST_FILE=$GITHUB_WORKSPACE/basic_msgs.txt
env:
CC: gcc-${{matrix.cc_ver}}
CXX: g++-${{matrix.cc_ver}}
BUILD_TOOLS: "${{ matrix.cpp >= 17 && 'ON' || 'OFF' }}"

- name: Build Target
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config ${{matrix.type}} --target install
env:
VERBOSE: 1

build_clang_old_ubuntu_20_04:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -393,6 +457,73 @@ jobs:
env:
VERBOSE: 1

build_clang_ubuntu_24_04:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
type: [Debug, Release, MinSizeRel]
cc_ver: [16, 17, 18]
cpp: [11, 14, 17, 20, 23]
qt_ver: [5, 6]
exclude:
- cc_ver: 16
cpp: 23
- cc_ver: 17
cpp: 23

steps:
- uses: actions/checkout@v4

- name: Prepare Install
run: sudo apt-get update --fix-missing

- name: Install Packages
run: |
sudo apt install libqt${{matrix.qt_ver}}gui${{matrix.qt_ver}} qtbase5-dev qt6-base-dev libboost-all-dev libxml2-dev clang-${{matrix.cc_ver}} \
python3 libpython3-dev swig default-jdk default-jre emscripten
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Prepare externals
shell: bash
run: $GITHUB_WORKSPACE/script/prepare_externals.sh
env:
BUILD_DIR: ${{runner.workspace}}/build
CC: clang-${{matrix.cc_ver}}
CXX: clang++-${{matrix.cc_ver}}
EXTERNALS_DIR: ${{runner.workspace}}/externals
COMMON_INSTALL_DIR: ${{runner.workspace}}/build/install
COMMON_BUILD_TYPE: ${{matrix.type}}
COMMON_CXX_STANDARD: ${{matrix.cpp}}
COMMS_TAG: ${{env.COMMS_TAG}}
COMMSDSL_TAG: ${{env.COMMSDSL_TAG}}
CC_TOOLS_QT_TAG: ${{env.CC_TOOLS_QT_TAG}}
CC_TOOLS_QT_MAJOR_QT_VERSION: ${{matrix.qt_ver}}
CC_TOOLS_QT_SKIP: "${{ (matrix.cpp < 17) && '1' || '0' }}"

- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_PREFIX_PATH=${{runner.workspace}}/build/install -DCMAKE_CXX_STANDARD=${{matrix.cpp}} \
-DUBLOX_GEN_PROTOCOL=ON -DUBLOX_GEN_TEST=ON -DUBLOX_GEN_TOOLS=ON -DUBLOX_BUILD_TOOLS=${{env.BUILD_TOOLS}} \
-DUBLOX_GEN_SWIG=ON -DUBLOX_GEN_EMSCRIPTEN=ON -DUBLOX_BUILD_EXAMPLES=ON -DUBLOX_TOOLS_QT_VER=${{matrix.qt_ver}} \
-DUBLOX_SCHEMA_FILES_LIST_FILE=$GITHUB_WORKSPACE/basic_msgs.txt
env:
CC: clang-${{matrix.cc_ver}}
CXX: clang++-${{matrix.cc_ver}}
BUILD_TOOLS: "${{ (matrix.cpp < 17) && 'OFF' || 'ON' }}"

- name: Build Target
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config ${{matrix.type}} --target install
env:
VERBOSE: 1

build_msvc_2019:
runs-on: windows-2019
strategy:
Expand Down Expand Up @@ -425,9 +556,10 @@ jobs:
QT_VER: ${{matrix.qt_ver == '5' && '5.15.3' || '6.2.2'}}

- name: Install Boost
if: matrix.arch == 'x64'
shell: cmd
run: |
choco install boost-msvc-14.2
choco install boost-msvc-14.2 --version=1.85.0
- name: Prepare externals
shell: cmd
Expand All @@ -452,13 +584,15 @@ jobs:
working-directory: ${{runner.workspace}}/build
run: |
cmake %GITHUB_WORKSPACE% -A ${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install ^
-DCMAKE_PREFIX_PATH="${{runner.workspace}}/build/install;${{env.QTDIR}}" -DBoost_USE_STATIC_LIBS=ON ^
-DCMAKE_PREFIX_PATH="${{runner.workspace}}/build/install;${{env.QTDIR}}" ^
-DCMAKE_POLICY_DEFAULT_CMP0167=OLD -DBoost_USE_STATIC_LIBS=ON ^
-DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DUBLOX_TOOLS_QT_VER=${{matrix.qt_ver}} ^
-DUBLOX_GEN_PROTOCOL=ON -DUBLOX_GEN_TEST=ON -DUBLOX_GEN_TOOLS=ON -DUBLOX_BUILD_TOOLS=${{env.BUILD_TOOLS}} ^
-DUBLOX_BUILD_EXAMPLES=ON ^
-DUBLOX_BUILD_EXAMPLES=${{env.HAS_BOOST}} ^
-DUBLOX_SCHEMA_FILES_LIST_FILE=%GITHUB_WORKSPACE%/basic_msgs.txt
env:
BUILD_TOOLS: "${{ matrix.cpp >= 17 && matrix.arch == 'x64' && 'ON' || 'OFF' }}"
HAS_BOOST: "${{ matrix.arch == 'x64' && 'ON' || 'OFF' }}"

- name: Build Target
working-directory: ${{runner.workspace}}/build
Expand Down Expand Up @@ -486,7 +620,7 @@ jobs:
if: matrix.arch == 'x64'
shell: cmd
run: |
choco install boost-msvc-14.3
choco install boost-msvc-14.3 --version=1.85.0
- name: Prepare externals
shell: cmd
Expand All @@ -509,7 +643,8 @@ jobs:
working-directory: ${{runner.workspace}}/build
run: |
cmake %GITHUB_WORKSPACE% -A ${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install ^
-DCMAKE_PREFIX_PATH="${{runner.workspace}}/build/install" -DBoost_USE_STATIC_LIBS=ON ^
-DCMAKE_PREFIX_PATH="${{runner.workspace}}/build/install" ^
-DCMAKE_POLICY_DEFAULT_CMP0167=OLD -DBoost_USE_STATIC_LIBS=ON ^
-DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DUBLOX_TOOLS_QT_VER=${{matrix.qt_ver}} ^
-DUBLOX_GEN_PROTOCOL=ON -DUBLOX_GEN_TEST=ON -DUBLOX_BUILD_EXAMPLES=${{env.HAS_BOOST}} ^
-DUBLOX_SCHEMA_FILES_LIST_FILE=%GITHUB_WORKSPACE%/basic_msgs.txt
Expand Down
24 changes: 17 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,18 @@ option (UBLOX_BUILD_EXAMPLES "Build examples." OFF)
# COMMSDSL2SWIG_EXTRA_ARGS - Extra arguments to pass to "commsdsl2swig"
# COMMSDSL2EMSCRIPTEN_EXTRA_ARGS - Extra arguments to pass to "commsdsl2emscripten"

set (UBLOX_VERSION "2.8")
set (UBLOX_MIN_COMMSDSL_VERSION "6.3.3")
set (UBLOX_VERSION "2.9")
set (UBLOX_MIN_COMMSDSL_VERSION "6.3.4")

if (("${CMAKE_VERSION}" VERSION_GREATER_EQUAL "3.30") AND
(NOT DEFINED CMAKE_POLICY_DEFAULT_CMP0167))
# Find boost cmake configuration from the boost installation
cmake_policy(SET CMP0167 NEW)
endif ()

if ("${CMAKE_CXX_STANDARD}" STREQUAL "")
set(CMAKE_CXX_STANDARD 17)
endif ()

set (EXTERNALS_DIR "${PROJECT_SOURCE_DIR}/externals")

Expand Down Expand Up @@ -303,7 +313,7 @@ if (UBLOX_GEN_PROTOCOL)
-DCMAKE_GENERATOR=${CMAKE_GENERATOR} -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
-DCMAKE_GENERATOR_TOOLSET=${CMAKE_GENERATOR_TOOLSET} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}
-DOPT_REQUIRE_COMMS_LIB=OFF
-DOPT_REQUIRE_COMMS_LIB=OFF -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
)

Expand Down Expand Up @@ -376,7 +386,7 @@ if (UBLOX_GEN_TEST)
-DCMAKE_GENERATOR=${CMAKE_GENERATOR} -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
-DCMAKE_GENERATOR_TOOLSET=${CMAKE_GENERATOR_TOOLSET} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
-DCMAKE_PREFIX_PATH=${combined_prefix_path_str}
-DOPT_TEST_OPTIONS=cc_ublox::options::AllMessagesDynMemMsgFactoryDefaultOptions
-DOPT_USE_CCACHE=${UBLOX_USE_CCACHE}
Expand Down Expand Up @@ -440,7 +450,7 @@ if (UBLOX_GEN_TOOLS)
-DCMAKE_GENERATOR=${CMAKE_GENERATOR} -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
-DCMAKE_GENERATOR_TOOLSET=${CMAKE_GENERATOR_TOOLSET} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
-DCMAKE_PREFIX_PATH=${combined_prefix_path_str}
-DOPT_QT_MAJOR_VERSION=${UBLOX_TOOLS_QT_VER}
-DOPT_USE_CCACHE=${UBLOX_USE_CCACHE}
Expand Down Expand Up @@ -504,7 +514,7 @@ if (UBLOX_GEN_SWIG)
-DCMAKE_GENERATOR=${CMAKE_GENERATOR} -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
-DCMAKE_GENERATOR_TOOLSET=${CMAKE_GENERATOR_TOOLSET} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
-DCMAKE_PREFIX_PATH=${combined_prefix_path_str}
-DOPT_SWIG_LANGUAGES=${combined_languages_str}
-DOPT_USE_CCACHE=${UBLOX_USE_CCACHE}
Expand Down Expand Up @@ -575,7 +585,7 @@ if (UBLOX_GEN_EMSCRIPTEN)
CMAKE_ARGS
-DCMAKE_GENERATOR=${CMAKE_GENERATOR} -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
-DOPT_MODULARIZE=ON
-DOPT_EXTRA_INCLUDE_DIRS=${extra_includes_path_str}
-DOPT_USE_CCACHE=${UBLOX_USE_CCACHE}
Expand Down
39 changes: 39 additions & 0 deletions script/full_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

if [ -z "${CC}" -o -z "$CXX" ]; then
echo "ERROR: Compilers are not provided"
exit 1
fi

if [ -z "${COMMON_BUILD_TYPE}" ]; then
echo "ERROR: Build type is not provided"
exit 1
fi


SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ROOT_DIR=$( dirname ${SCRIPT_DIR} )

if [ -z ${BUILD_DIR} ]; then
export BUILD_DIR="${ROOT_DIR}/build.full.${CC}.${COMMON_BUILD_TYPE}"
fi

export COMMON_INSTALL_DIR=${BUILD_DIR}/install
export EXTERNALS_DIR=${ROOT_DIR}/externals
export COMMON_USE_CCACHE=ON
mkdir -p ${BUILD_DIR}

${SCRIPT_DIR}/prepare_externals.sh

cd ${BUILD_DIR}
cmake .. -DCMAKE_INSTALL_PREFIX=${COMMON_INSTALL_DIR} \
-DCMAKE_BUILD_TYPE=${COMMON_BUILD_TYPE} -DUBLOX_GEN_TEST=ON \
-DUBLOX_GEN_TOOLS=ON -DUBLOX_GEN_SWIG=OFF -DUBLOX_GEN_EMSCRIPTEN=OFF \
-DUBLOX_BUILD_EXAMPLES=ON -DUBLOX_USE_CCACHE=ON "$@"

procs=$(nproc)
if [ -n "${procs}" ]; then
procs_param="--parallel ${procs}"
fi

cmake --build ${BUILD_DIR} --config ${COMMON_BUILD_TYPE} --target install ${procs_param}
25 changes: 1 addition & 24 deletions script/full_debug_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,6 @@ if [ -z "${CC}" -o -z "$CXX" ]; then
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ROOT_DIR=$( dirname ${SCRIPT_DIR} )

if [ -z ${BUILD_DIR} ]; then
export BUILD_DIR="${ROOT_DIR}/build.full.${CC}"
fi

export COMMON_INSTALL_DIR=${BUILD_DIR}/install
export COMMON_BUILD_TYPE=Debug
export EXTERNALS_DIR=${ROOT_DIR}/externals
export COMMON_USE_CCACHE=ON
mkdir -p ${BUILD_DIR}

${SCRIPT_DIR}/prepare_externals.sh

cd ${BUILD_DIR}
cmake .. -DCMAKE_INSTALL_PREFIX=${COMMON_INSTALL_DIR} \
-DCMAKE_BUILD_TYPE=Debug -DUBLOX_GEN_TEST=ON \
-DUBLOX_GEN_TOOLS=ON -DUBLOX_GEN_SWIG=OFF -DUBLOX_GEN_EMSCRIPTEN=OFF \
-DUBLOX_BUILD_EXAMPLES=ON -DUBLOX_USE_CCACHE=ON "$@"

procs=$(nproc)
if [ -n "${procs}" ]; then
procs_param="--parallel ${procs}"
fi
exec ${SCRIPT_DIR}/full_build.sh "$@"

cmake --build ${BUILD_DIR} --config ${COMMON_BUILD_TYPE} --target install ${procs_param}
9 changes: 7 additions & 2 deletions script/full_debug_build_basic_clang.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/bin/bash

export CC=clang
export CXX=clang++
if [ -z "${CC}" ]; then
export CC=clang
fi

if [ -z "${CXX}" ]; then
export CXX=clang++
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
${SCRIPT_DIR}/full_debug_build_basic.sh "$@"
Expand Down
9 changes: 7 additions & 2 deletions script/full_debug_build_basic_gcc.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/bin/bash

export CC=gcc
export CXX=g++++
if [ -z "${CC}" ]; then
export CC=gcc
fi

if [ -z "${CXX}" ]; then
export CXX=g++
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
${SCRIPT_DIR}/full_debug_build_basic.sh "$@"
Expand Down
9 changes: 7 additions & 2 deletions script/full_debug_build_clang.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/bin/bash

export CC=clang
export CXX=clang++
if [ -z "${CC}" ]; then
export CC=clang
fi

if [ -z "${CXX}" ]; then
export CXX=clang++
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
${SCRIPT_DIR}/full_debug_build.sh "$@"
Expand Down
Loading

0 comments on commit e046a87

Please sign in to comment.