diff --git a/.gitea/scripts/windows-native.sh b/.gitea/scripts/windows-native.sh index 46aa5e2..b3f18f9 100644 --- a/.gitea/scripts/windows-native.sh +++ b/.gitea/scripts/windows-native.sh @@ -43,20 +43,30 @@ if [ "${variant}" = "sanitizers" ]; then linker_flags="-fsanitize=address,undefined" fi -case "${phase}" in -build) +configure() { cmake -S . -B "${build}" -G Ninja \ -DCMAKE_BUILD_TYPE="${build_type}" \ -DCMAKE_CXX_COMPILER=g++ \ -DCMAKE_CXX_FLAGS="${cxx_flags}" \ -DCMAKE_EXE_LINKER_FLAGS="${linker_flags}" \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON +} + +case "${phase}" in +build) + configure cmake --build "${build}" --parallel 4 ;; test) + # The runner uses a different workspace directory per job, so the restored + # build's absolute paths are stale: reconfigure and rebuild incrementally. + configure + cmake --build "${build}" --parallel 4 ctest --test-dir "${build}" --output-on-failure --no-tests=error ;; package) + configure + cmake --build "${build}" --parallel 4 out="dist-windows-${variant}" label="${VBS_RELEASE_TAG:-}" if [ -z "${label}" ]; then diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index e9f39ca..b436d08 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -157,6 +157,9 @@ jobs: UBSAN_OPTIONS: print_stacktrace=1 steps: - uses: actions/checkout@v4 + # Jobs are fresh containers: the upgrade done by `requirements` does not carry over. + - name: Ensure Ninja >= 1.11 (CMake module scanning in the suite) + run: bash .gitea/scripts/install-ninja.sh - name: Download the build uses: actions/download-artifact@v3 with: