Skip to content

Commit 70d4956

Browse files
committed
CI: Error out when Windows CMake test fails
Only the exit code of the last command is considered, so make sure CTest is last
1 parent b4d3bdc commit 70d4956

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
cd ..
103103
rm -rf __build
104104
105-
- name: Run modules tests wihtout 'import std;'
105+
- name: Run modules tests without 'import std;'
106106
if: ${{matrix.toolset == 'clang-19'}}
107107
run: |
108108
cd ../boost-root/libs/type_index
@@ -213,46 +213,37 @@ jobs:
213213
if: ${{matrix.toolset == 'msvc-14.3'}}
214214
shell: cmd
215215
run: |
216-
choco install --no-progress ninja
217216
call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64
218-
cd ../boost-root/
219-
mkdir __build
220-
cd __build
221-
cmake -DBUILD_TESTING=1 -DBOOST_INCLUDE_LIBRARIES=type_index ..
217+
cd ../boost-root
218+
mkdir __build_cmake
219+
cd __build_cmake
220+
cmake -DBUILD_TESTING=1 -DBOOST_INCLUDE_LIBRARIES=type_index -G Ninja ..
222221
cmake --build . --target tests --config Debug
223222
ctest --output-on-failure --no-tests=error -C Debug
224-
cd ..
225-
rm -rf __build
226223
227224
- name: Run modules tests
228225
if: ${{matrix.toolset == 'msvc-14.3'}}
229226
shell: cmd
230227
run: |
231-
choco install --no-progress ninja
232228
call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64
233-
cd ../boost-root/libs/type_index
234-
mkdir build_module
235-
cd build_module
236-
cmake -DBOOST_USE_MODULES=1 -DBUILD_TESTING=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja ../test/cmake_subdir_test/
229+
cd ../boost-root
230+
mkdir __build_modules
231+
cd __build_modules
232+
cmake -DBOOST_USE_MODULES=1 -DBUILD_TESTING=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja ../libs/type_index/test/cmake_subdir_test
237233
cmake --build .
238234
ctest --no-tests=error -V
239-
cd ..
240-
rm -rf build_module
241235
242236
- name: Run modules tests without 'import std;'
243237
if: ${{matrix.toolset == 'msvc-14.3'}}
244238
shell: cmd
245239
run: |
246-
choco install --no-progress ninja
247240
call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64
248-
cd ../boost-root/libs/type_index
249-
mkdir build_module
250-
cd build_module
251-
cmake -DBOOST_USE_MODULES=1 -DBUILD_TESTING=1 -DCMAKE_CXX_STANDARD=20 -G Ninja ../test/cmake_subdir_test/
241+
cd ../boost-root
242+
mkdir __build_modules_std
243+
cd __build_modules_std
244+
cmake -DBOOST_USE_MODULES=1 -DBUILD_TESTING=1 -DCMAKE_CXX_STANDARD=20 -G Ninja ../libs/type_index/test/cmake_subdir_test
252245
cmake --build .
253246
ctest --no-tests=error -V
254-
cd ..
255-
rm -rf build_module
256247
257248
- name: Run tests
258249
shell: cmd

0 commit comments

Comments
 (0)