diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a733805..8ed391d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,6 +14,20 @@ jobs: name: linux-autoconf runs-on: ubuntu-latest + strategy: + matrix: + shared_libs: + - yes + - no + + static_libs: + - yes + - no + + exclude: + - shared_libs: no + static_libs: no + steps: - name: Checkout Code uses: actions/checkout@v4 @@ -25,7 +39,7 @@ jobs: run: ./autogen.sh - name: Configure - run: ./configure + run: ./configure --enable-shared=${{ matrix.shared_libs }} --enable-static=${{ matrix.static_libs }} - name: Make run: make @@ -44,7 +58,7 @@ jobs: ctest --test-dir . --verbose build-cmake: - name: ${{ matrix.toolchain }} + name: ${{ matrix.toolchain }} (${{ matrix.configuration }}, ${{ matrix.shared_libs }}) runs-on: ${{ matrix.os }} strategy: @@ -52,11 +66,14 @@ jobs: toolchain: - linux-gcc - macos-clang - - windows-msvc-shared - - windows-msvc-static + - windows-msvc configuration: - Release + + shared_libs: + - ON + - OFF include: - toolchain: linux-gcc @@ -67,11 +84,7 @@ jobs: os: macos-latest compiler: clang - - toolchain: windows-msvc-shared - os: windows-latest - compiler: msvc - - - toolchain: windows-msvc-static + - toolchain: windows-msvc os: windows-latest compiler: msvc @@ -81,12 +94,10 @@ jobs: - name: Configure (${{ matrix.configuration }}) run: | - if [ "${{ matrix.toolchain }}" == "windows-msvc-shared" ]; then - cmake -S . -Bbuild -DCMAKE_UNITY_BUILD=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=~/install - elif [ "${{ matrix.toolchain }}" == "windows-msvc-static" ]; then - cmake -S . -Bbuild -DCMAKE_UNITY_BUILD=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DBUILD_TESTING=ON -DBASH_EXECUTABLE="C:/Program Files/Git/bin/bash.exe" -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=~/install + if [ "${{ matrix.compiler }}" == "msvc" ]; then + cmake -S . -Bbuild -DCMAKE_UNITY_BUILD=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=${{ matrix.shared_libs }} -DCMAKE_INSTALL_PREFIX=~/install else - cmake -S . -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_UNITY_BUILD=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX=~/install + cmake -S . -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_UNITY_BUILD=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=${{ matrix.shared_libs }} -DCMAKE_INSTALL_PREFIX=~/install fi - name: Build with ${{ matrix.compiler }} @@ -112,6 +123,15 @@ jobs: name: windows-cygwin runs-on: windows-latest + strategy: + matrix: + configuration: + - Release + + shared_libs: + - ON + - OFF + steps: - name: Set git to use LF run: git config --global core.autocrlf input @@ -128,10 +148,10 @@ jobs: make ninja - - name: Configure (Release) + - name: Configure (${{ matrix.configuration }}) run: | export PATH=/usr/bin:$PATH - cmake -S . -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_UNITY_BUILD=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DBUILD_TESTING=ON -G Ninja + cmake -S . -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_UNITY_BUILD=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=${{ matrix.shared_libs }} -G Ninja shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' - name: Build with gcc @@ -143,9 +163,7 @@ jobs: - name: Test run: | export PATH=/usr/bin:/usr/local/bin:$PATH - cp ./build/*.dll ./build/tests/ - cp ./build/bin/*.dll ./build/tests/ - ctest --test-dir build --build-config Release --verbose + ctest --test-dir build --build-config ${{ matrix.configuration }} --verbose shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' build-nmake: