From e8628623a24a1de6dd226a498c94cb8b277dfa82 Mon Sep 17 00:00:00 2001 From: Yash Dubey Date: Tue, 24 Nov 2026 09:24:04 +0530 Subject: [PATCH] ci: a hung Windows runtime test fails on its own instead of cancelling the job --- .github/workflows/runtime.yml | 8 ++++++-- runtime/CMakeLists.txt | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/runtime.yml b/.github/workflows/runtime.yml index cafdf469fb..c06d54128a 100644 --- a/.github/workflows/runtime.yml +++ b/.github/workflows/runtime.yml @@ -102,7 +102,9 @@ concurrency: jobs: windows: runs-on: windows-latest - timeout-minutes: 20 + # A build with a cold sccache took 18.3 min (main, 24 Nov), which left a 20-minute job under 2 min for the + # whole ctest run. The ctest step bounds each test on its own, so a hung test no longer needs this to stop it. + timeout-minutes: 35 outputs: wine-artifact: ${{ steps.upload-wine-artifact.outcome }} env: @@ -288,8 +290,10 @@ jobs: runtime/build/windows-root.txt retention-days: 7 if-no-files-found: error + # --timeout: a test without a TIMEOUT of its own fails after 5 min instead of the CTest default of 25, which + # is longer than the job. The slowest on Linux and macOS (xdxr_build_check) takes 50 and 106 s. - name: CPU runtime tests - run: ctest --test-dir runtime/build --output-on-failure + run: ctest --test-dir runtime/build --output-on-failure --timeout 300 # Runs the Windows build's tests under Wine, so a change that breaks the loader on Linux (through Wine or Proton) # shows up. The required ones are the loader and the stand-in game run end to end; the table in the job summary diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index 64e346f40a..4641af953c 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -577,6 +577,10 @@ if(BUILD_TESTING) target_link_options(loader_test PRIVATE /OPT:NOREF ${GTA6RT_HOST_BASE}) add_dependencies(loader_test gta6rt_tls_host) add_test(NAME loader COMMAND loader_test) + # It takes about 10 s under Wine and under a minute on a desktop with a virus scanner. Before #239 it waited on + # a "Bad Image" box on the Windows runner until the job's own timeout cancelled the whole job (every Windows + # run from 24 Nov 00:37 to 03:32 UTC); a hang like that now fails this test instead. + set_tests_properties(loader PROPERTIES TIMEOUT 180) # PE loader tests use two locally built fixtures: a DLL with exports, imports and relocations, and an EXE that # imports it so Loader::load exercises recursive module loading. They contain no game data. set(TINY_FIXTURE_DIR "${CMAKE_CURRENT_BINARY_DIR}/fixtures/$")