Fix Windows CI not properly erroring out on errors

Previously, it would not error when tests failed to build or run.
Powershell (at least on CI) apparently only cares about the last exit
status, so separate running the server from running the tests.

Fixes #3057.
This commit is contained in:
heinrich5991 2022-01-31 00:07:48 +01:00
parent 9ef3c8c94a
commit f42a826945

View file

@ -98,6 +98,10 @@ jobs:
run: | run: |
cd debug cd debug
${{ matrix.cmake-path }}cmake --build . --config Debug --target run_tests ${{ matrix.build-args }} ${{ matrix.cmake-path }}cmake --build . --config Debug --target run_tests ${{ matrix.build-args }}
- name: Run debug server
env: ${{ matrix.env }}
run: |
cd debug
./DDNet-Server shutdown ./DDNet-Server shutdown
- name: Build in release mode - name: Build in release mode
@ -112,6 +116,10 @@ jobs:
run: | run: |
cd release cd release
${{ matrix.cmake-path }}cmake --build . --config Release --target run_tests ${{ matrix.build-args }} ${{ matrix.cmake-path }}cmake --build . --config Release --target run_tests ${{ matrix.build-args }}
- name: Run release server
env: ${{ matrix.env }}
run: |
cd release
./DDNet-Server shutdown ./DDNet-Server shutdown
- name: Build headless client - name: Build headless client
@ -142,6 +150,11 @@ jobs:
run: | run: |
cd fancy cd fancy
${{ matrix.cmake-path }}cmake --build . --config RelWithDebInfo --target run_tests ${{ matrix.build-args }} ${{ matrix.cmake-path }}cmake --build . --config RelWithDebInfo --target run_tests ${{ matrix.build-args }}
- name: Run fancy server
if: matrix.fancy
env: ${{ matrix.env }}
run: |
cd fancy
./DDNet-Server shutdown ./DDNet-Server shutdown
- name: Package - name: Package