1010 build :
1111 runs-on : ${{ matrix.os }}
1212 strategy :
13+ fail-fast : false
1314 matrix :
1415 os : [ubuntu-latest, windows-latest, macos-latest]
16+
1517 steps :
1618 - uses : actions/checkout@v4
1719
@@ -22,12 +24,26 @@ jobs:
2224 vcpkgDirectory : ' ${{ github.workspace }}/vcpkg'
2325 runVcpkgInstall : true
2426
25- - name : Configure CMake
26- run : cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
27+ - name : Configure CMake (Windows)
28+ if : runner.os == 'Windows'
29+ run : >
30+ cmake -B build -S .
31+ -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
32+ -DBUILD_TESTS=ON
33+ -DBUILD_EXAMPLES=OFF
34+
35+ - name : Configure CMake (Linux/macOS)
36+ if : runner.os != 'Windows'
37+ run : >
38+ cmake -B build -S .
39+ -DCMAKE_BUILD_TYPE=Release
40+ -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
41+ -DBUILD_TESTS=ON
42+ -DBUILD_EXAMPLES=OFF
2743
2844 - name : Build (Windows)
2945 if : runner.os == 'Windows'
30- run : cmake --build build
46+ run : cmake --build build --config Release
3147 shell : pwsh
3248
3349 - name : Build (Linux)
3854 if : runner.os == 'macOS'
3955 run : cmake --build build -- -j$(sysctl -n hw.logicalcpu)
4056
57+ - name : Test (Windows)
58+ if : runner.os == 'Windows'
59+ run : ctest --test-dir build -C Release --output-on-failure
60+ shell : pwsh
61+
62+ - name : Test (Linux)
63+ if : runner.os == 'Linux'
64+ run : ctest --test-dir build --output-on-failure
65+
66+ - name : Test (macOS)
67+ if : runner.os == 'macOS'
68+ run : ctest --test-dir build --output-on-failure
0 commit comments