Skip to content

ci: fix runtime/windows timeout, remove redundant CI legs, and harden caches - #2665

Merged
aslan2142 merged 3 commits into
ProjectLeonida:mainfrom
aslan2142:ci/cleanup-main-workflows
Nov 30, 2026
Merged

aslan2142 merged 3 commits into
ProjectLeonida:mainfrom
aslan2142:ci/cleanup-main-workflows

Conversation

@aslan2142

Copy link
Copy Markdown
Collaborator

Summary

Cleans up red, redundant, and slow CI jobs across main workflows based on an audit of recent main runs, while preserving full coverage across Linux, Windows, macOS, and Wine:

Fixes & Reliability

  • Runtime / windows 35-minute timeout fix (.github/workflows/runtime.yml):
    • Switched CMake build from RelWithDebInfo + /Z7 (CMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded) to Release (keeping NDEBUG, /MAP, and x64 .pdata unwind tables), eliminating multi-GB embedded debug bloat that caused cold-cache builds to hit the 35-minute timeout; updated wine's tiny_async.exe path to Release.
    • Added rustc-commit-hash-keyed actions/cache for Cargo (~/.cargo/registry, ~/.cargo/git, runtime/build/xma_decoder, runtime/build/opus_decoder), parallelized ctest (--parallel 4), and raised timeout-minutes (35 -> 50).
  • Rust compiler-aware Cargo caching (.github/workflows/runtime.yml, launcher.yml, xma2-decoder.yml):
    • Keyed all Cargo caches with rustc -vV commit-hash + Cargo.lock (moving Rust toolchain ahead of actions/cache in launcher.yml) so compiler upgrades never hit stale exact keys.
    • Added workflow_dispatch: to xma2-decoder.yml, gated cargo fmt --check to ubuntu-24.04 in launcher.yml, and tightened launcher.yml timeout-minutes (40 -> 20).
  • Stale macOS xfail & LLVM alignment (.github/workflows/runtime.yml, docs/testing.md, docs/linux.md):
    • Removed stale vk_overlapping_occlusion from Runtime / macos EXPECTED_FAILURES (passes on macos-26 MoltenVK and caused noisy unexpected pass failures).
    • Aligned linux-gpu-tools LLVM from llvm-19 to llvm-21 (matching ci.yml via apt.llvm.org + scripts/check_apt_key.py).
  • Wine skipped-check display fix (.github/workflows/runtime.yml):
    • Dropped the redundant name: wine (${{ matrix.wine }}) override so skipped PR runs display cleanly as Runtime / wine instead of literal Runtime / wine (${{ matrix.wine }}) (expanded runs on main/schedule/workflow_dispatch still auto-name wine (ubuntu) and wine (winehq-stable)).
  • Stricter workflow linting (.github/workflows/jactionlint.yml):
    • Upgraded jactionlint from profile: correctness to profile: default.

Redundancy Removals & Consolidations

  • .github/workflows/ci.yml:
    • Removed redundant macos-python and semantic-tests (windows-latest) jobs (semantic-tests now runs as a single ubuntu-latest job with LEONIDA_REQUIRE_SPIRV_TOOLS: "1").
    • Consolidated translator-tests, viewer-tests, and stdlib-tests-linux into a single linux-python-and-viewer (ubuntu-24.04) job (one checkout/Python/Node 24/LLVM 21/spirv-tools setup; runs node --test, pytest, and run_standalone_tests.py -j 4).
    • Added paths-ignore for docs-only files (README.md, CONTRIBUTING.md, AGENTS.md, docs/**/*.md) under on.push: so docs-only merges to main never queue or coalesce/cancel pending code runs, while change-scope keeps running all 14 doc tests on docs-only PRs and daily schedules still run the full suite.
    • Bumped Windows check standalone test parallelism -j 2 -> -j 4.
  • .github/workflows/runtime.yml:
    • Scoped macos off pull requests (if: github.event_name != 'pull_request'); it continues running on every push to main, daily schedule, and workflow_dispatch.
    • Scoped wine matrix to ["winehq-stable"] on push to main and full ["ubuntu", "winehq-stable"] on daily schedule and workflow_dispatch.
  • Tests & Docs updated: tests/test_ci_registration.py, tests/semantic/test_spirv_tools_required.py, tests/test_feature_scan.py, tests/test_vs_input_survey.py, docs/linux.md, docs/testing.md.

End-State Workflows Overview

Workflow pull_request push (main) schedule / workflow_dispatch
ci.yml change-scope (docs-only: 14 doc tests); non-docs: check, linux-python-and-viewer, semantic-tests Docs-only ignored; code pushes run check, linux-python-and-viewer, semantic-tests check, linux-python-and-viewer, semantic-tests
runtime.yml windows (50m Release), linux-gpu-tools (LLVM 21); wine & macos skipped windows, wine (winehq-stable), linux-gpu-tools, macos windows, wine (ubuntu, winehq-stable), linux-gpu-tools, macos
jactionlint.yml jactionlint (profile: default) Same —
launcher.yml launcher (windows-latest, ubuntu-24.04, 20m, Cargo cache) Same —
xma2-decoder.yml windows-ffi (15m, Cargo cache) Same workflow_dispatch
no-game-data.yml no-game-data Same —
conflict-label.yml — label Hourly + workflow_dispatch

Out of Scope / Notes

  • Does not duplicate existing open PRs fixing individual test failures or d3d12.yml (e.g., #2633, #2641, #2653).
  • Maintainer housekeeping note: deleted ghost workflow coordination-claim.yml (workflow ID 428545624) still appears in GitHub's workflow registry and can be disabled via gh workflow disable 428545624.

Testing

  • AI-assisted: Yes (implemented and independently reviewed with AI assistance).
  • Local verification (Linux x86-64, no game files):
    • yaml.safe_load + bash -n across all 7 .github/workflows/*.yml files + .github/dependabot.yml: PASS
    • All CI/workflow/docs tests (tests/test_ci_expected_failures.py, test_ci_main_signal.py, test_ci_registration.py, test_runtime_paths.py, test_check_apt_key.py, test_no_game_data_workflow.py, test_pr_conflict_label.py, test_cmake_vulkan_missing.py, test_cmake_vulkan_headers_version.py, test_runner_calls_all_tests.py, all 13 test_docs_*.py, test_i18n_index.py, test_design_contract_rows.py, test_feature_scan.py, test_vs_input_survey.py, tests/semantic/test_spirv_tools_required.py): ALL PASS
    • node --test tests/test_*.cjs: 85/85 PASS
    • python3 -I scripts/check_no_game_data.py & python3 -m compileall -q make_game.py tools tests: PASS
    • Note: jactionlint binary is not installed locally; live jactionlint (profile: default) will be verified on this PR's checks.

@OreoFR

OreoFR commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16 (pytest), main b8bd371, PR head 129c840. MEASURED, Python tests only (the workflow changes themselves are checked by this PR's own CI, not here):

  • red (main + only this PR's test files) / green (main + this PR, merge --no-ff):
    • tests/test_ci_registration.py: red 2 failed / 18 (test_the_spirv_tools_check_flags_a_job_that_installs_nothing, test_step_script_reads_the_check_loop: main's step still runs run_standalone_tests.py -j 2) → green 18/18, 44 subtests.
    • tests/semantic/test_spirv_tools_required.py: 1/1 on both sides with LEONIDA_REQUIRE_SPIRV_TOOLS=1 (skipped without it, as designed).
    • tests/test_feature_scan.py 16/16 and tests/test_vs_input_survey.py 1/1 on both sides (no red: these edits don't change what is checked).
  • Merges cleanly with main and with [integration] PageMirror, GPU detile, async queue & RDNA2->SPIR-V performance stack (INTEGRATION-PERF-CPU-GPU-R6) #2566 (git merge-tree).

jactionlint is red on this PR because of the profile switch (correctness → default in .github/workflows/jactionlint.yml); on main it is green. The stricter profile reports lines this PR doesn't touch:

  • runtime.yml:475 vulkaninfo --summary | grep -E 'deviceName.*llvmpipe' and runtime.yml:564 "$LLVM_MC" --version | grep 'LLVM version': pipeline without pipefail under the default bash -e shell (add shell: bash or set -o pipefail);
  • Dependabot updates without cooldown.default-days (two entries).
    Either fix those here or keep profile: correctness for now.

At the time of this comment Runtime / windows, CI / check, CI / semantic-tests and Launcher were still running, so the timeout and Release-build changes are not confirmed yet.

AI-assisted: Claude Code

@OreoFR

OreoFR commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

Update by OreoFR, same Mac (macOS 27.2.1, Apple M5, Python 3.12.16), main b8bd371, new head 3209231. MEASURED:

Runtime / windows was still running, so the timeout/Release change is still not confirmed here.

AI-assisted: Claude Code

@fiestorra

Copy link
Copy Markdown
Contributor

Verified on main b8bd37111 (Windows 11, Python 3.13): the two commits apply cleanly and the tests the change touches pass - with one caveat that is not yours.

git merge-tree origin/main refs/pull/2665/head  -> clean
cherry-pick (2 commits)                         -> clean
python3 -m pytest tests/test_ci_registration.py tests/test_vs_input_survey.py tests/semantic/test_spirv_tools_required.py -q
    -> 33 passed, 1 skipped, 44 subtests

The caveat: tests/test_feature_scan.py has 2 tests that fail on main too, with and without this branch:

main b8bd37111, no PR:  2 failed, 14 passed
this branch:            2 failed, 14 passed

Both are FeatureScanAtomicOutputTests, failing in subprocess.Popen with TypeError("bufsize must be an integer") - a Windows-specific way for that test to fail, not something the branch introduces. The branch's only change in that file is a docstring line (the CI job's name), so it cannot be the cause.

What that means for your pull request: nothing blocking. What it means for the repository: the Python suite has two tests that fail on Windows today, and nobody would see it in CI, where that file runs on Linux. Worth its own issue rather than riding along here.

Not verified: the workflows themselves - I can read YAML, not execute GitHub's runner. What I can say is that the branch does not disturb the tests that police the CI registration, which is the closest thing to a check I have here.

Written with an AI assistant.

@OreoFR

OreoFR commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

Follow-up by OreoFR, read from this PR's own Runtime / windows job on head 3209231 (the job failed). MEASURED:

  • Build: 29 min 43 s (00:31:59 → 01:01:42), job total 32.5 min. So the job fits the new 50-minute limit, but Release + the Cargo cache did not make this cold build much shorter than before.
  • CPU runtime tests (ctest ... --parallel 4): 512/514, 2 failed, both timing-sensitive:
    • xmem (22.3 s): FAIL the reader of the views' last pages never faults or misreads;
    • silent_audio: FAIL the position follows real time at 48 kHz.
  • The same two tests pass serially in three Runtime runs of the same workflow on my fork (main 452d1d1, no --parallel): xmem 4.5-6.9 s and silent_audio 0.7 s, every time.

So --parallel 4 looks like the cause (ASSUMED: CPU contention on the 4-core runner skews real-time checks). Possible ways out: run those two with RUN_SERIAL (set_tests_properties(xmem silent_audio PROPERTIES RUN_SERIAL TRUE)), or keep ctest serial for now.

AI-assisted: Claude Code

@aslan2142

Copy link
Copy Markdown
Collaborator Author

Merging after full CI verification: Runtime/windows passed in 6m35s (down from 35m+ timeouts), jactionlint (profile: default) passed in 19s (0 findings), Runtime/linux-gpu-tools (LLVM 21) passed in 3m32s, CI/linux-python-and-viewer passed in 4m51s, Launcher (Win/Linux), XMA2 decoder, No Game Data, and CI/change-scope are all green, and CI/check passed on 3209231b3 prior to the runtime.yml-only serial ctest fix (d2befefad). The sole red check (CI/semantic-tests) is the pre-existing main failure in test_interp_computed_ij_fallback (open PR #2633). Maintainer note: deleted ghost workflow coordination-claim.yml (ID 428545624) can be disabled separately via gh workflow disable 428545624.

@aslan2142
aslan2142 merged commit 40e7fe6 into ProjectLeonida:main Nov 30, 2026
12 of 13 checks passed
@OreoFR

OreoFR commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

Follow-up by OreoFR on head d2befef (serial ctest on Windows). MEASURED, from this PR's own CI and on the Mac (main 40e7fe6):

From my side this is ready for a maintainer's review of the workflow changes.

AI-assisted: Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants