Skip to content

Commit

Permalink
Run CTest on Windows only for static build
Browse files Browse the repository at this point in the history
  • Loading branch information
thbeu committed Mar 9, 2024
1 parent 8b8ea5d commit fc9ade6
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
defaults:
run:
shell: bash

jobs:
build-autoconf:
name: linux-autoconf
Expand Down Expand Up @@ -50,18 +50,30 @@ jobs:
configuration:
- Release

build_type:
- OFF
- ON

include:
- toolchain: linux-gcc
os: ubuntu-latest
compiler: gcc
build_type: ON

- toolchain: macos-clang
os: macos-latest
compiler: clang
build_type: ON

- toolchain: windows-msvc-shared
os: windows-latest
compiler: msvc
build_type: ON

- toolchain: windows-msvc
- toolchain: windows-msvc-static
os: windows-latest
compiler: msvc
build_type: OFF

steps:
- name: Checkout Code
Expand All @@ -70,9 +82,9 @@ jobs:
- name: Configure (${{ matrix.configuration }})
run: |
if [ "${{ matrix.compiler }}" == "msvc" ]; 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"
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=${{ matrix.build_type }}
else
cmake -S . -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_UNITY_BUILD=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DBUILD_TESTING=ON
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.build_type }}
fi
- name: Build with ${{ matrix.compiler }}
Expand All @@ -84,4 +96,5 @@ jobs:
fi
- name: Test
if: matrix.toolchain != 'windows-msvc-static'
run: ctest --test-dir build --build-config ${{ matrix.configuration }} --verbose

0 comments on commit fc9ade6

Please sign in to comment.