From bc949fd5bfd7a37e7145a366bdc40656f3720eae Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Mon, 19 Feb 2024 10:09:05 -0700 Subject: [PATCH] Test static library builds in CI --- .github/workflows/ci.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cbdc59b..3331db7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,7 +7,7 @@ on: jobs: cmake: - name: cmake (${{ matrix.ros_distro }}, ${{ matrix.preset }}, ${{ matrix.compiler.name }}) + name: cmake (${{ matrix.ros_distro }}, ${{ matrix.preset }}, ${{ matrix.compiler.name }} ${{ matrix.type.name }}) strategy: matrix: ros_distro: [humble, rolling] @@ -15,6 +15,9 @@ jobs: compiler: - { name: gcc } - { name: clang, flags: -DCMAKE_CXX_COMPILER=clang++ } + type: + - { name: Static, flags: -DBUILD_SHARED_LIBS=OFF } + - { name: Shared, flags: -DBUILD_SHARED_LIBS=ON } exclude: - preset: codecov compiler: { name: clang } @@ -41,7 +44,7 @@ jobs: if: matrix.compiler.name == 'clang' run: sudo apt update && sudo apt install clang - name: Configure - run: cmake --preset ${{ matrix.preset }} ${{ matrix.compiler.flags }} -DCMAKE_INSTALL_PREFIX=install -DCMAKE_VERBOSE_MAKEFILE=ON + run: cmake --preset ${{ matrix.preset }} ${{ matrix.compiler.flags }} ${{ matrix.type.flags }} -DCMAKE_INSTALL_PREFIX=install -DCMAKE_VERBOSE_MAKEFILE=ON - name: Build run: cmake --build build/${{ matrix.preset }} --target install - name: Test