From c528692f15b84728a6d341e5c7774d24b58ddb22 Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Mon, 22 Jan 2024 08:16:28 +0100 Subject: [PATCH 1/4] test shared/static and Release/Debug on CI --- .github/workflows/cmake-multi-platform.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 5f735016..a47d1677 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -24,8 +24,9 @@ jobs: # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. matrix: os: [ubuntu-latest, windows-latest, macos-latest] - build_type: [Release] + build_type: [Release, Debug] c_compiler: [gcc, clang, cl] + shared_libs: ['ON', 'OFF'] include: - os: windows-latest c_compiler: cl @@ -74,9 +75,10 @@ jobs: run: > cmake -B ${{ steps.strings.outputs.build-output-dir }} -G Ninja - -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} - -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} - -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + -D CMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} + -D CMAKE_C_COMPILER=${{ matrix.c_compiler }} + -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} + -D BUILD_SHARED_LIBS=${{ matrix.shared_libs }} -S ${{ github.workspace }} - name: Build From e4f417bf8aaf32f615a3c4b0eb47aa6d7a73bb8e Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Mon, 22 Jan 2024 08:27:16 +0100 Subject: [PATCH 2/4] test shared libs with colcon --- .github/workflows/colcon-workspace.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/colcon-workspace.yml b/.github/workflows/colcon-workspace.yml index ca37f4b3..c9f6d56f 100644 --- a/.github/workflows/colcon-workspace.yml +++ b/.github/workflows/colcon-workspace.yml @@ -62,7 +62,7 @@ jobs: strategy: matrix: ros_distribution: [noetic, humble] - cmake_shared_libs: ['OFF'] + cmake_shared_libs: ['ON', 'OFF'] include: - ros_distribution: noetic ros_version: 1 @@ -103,7 +103,7 @@ jobs: strategy: matrix: ros_distribution: [humble] - cmake_shared_libs: ['OFF'] + cmake_shared_libs: ['ON', 'OFF'] steps: - uses: actions/checkout@v4 From 33288b510264c9970ec1bff53206845614b5ef82 Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Mon, 22 Jan 2024 08:31:46 +0100 Subject: [PATCH 3/4] install Python and NumPy --- .github/workflows/cmake-multi-platform.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index a47d1677..0b578c07 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -69,6 +69,12 @@ jobs: - uses: ilammy/msvc-dev-cmd@v1 + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - run: pip install numpy + - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type From 81b4c6f80601c84fe1e56208a57ad1116181e20d Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Mon, 22 Jan 2024 18:42:27 +0100 Subject: [PATCH 4/4] [DBG] do not build Debug and static --- .github/workflows/cmake-multi-platform.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 0b578c07..0b97f3bc 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -24,9 +24,9 @@ jobs: # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. matrix: os: [ubuntu-latest, windows-latest, macos-latest] - build_type: [Release, Debug] + build_type: [Release] c_compiler: [gcc, clang, cl] - shared_libs: ['ON', 'OFF'] + shared_libs: ['ON'] include: - os: windows-latest c_compiler: cl