From 190cc0d376dd6c0775ed6c4c3de3b743906d6285 Mon Sep 17 00:00:00 2001 From: SombraSoft Date: Mon, 23 Nov 2026 19:06:22 -0300 Subject: [PATCH] CI: rustc warnings fail the build, except deprecations The tree builds with 0 rustc warnings except one: Rust 1.100 deprecated `AtomicU32::fetch_update` (renamed `try_update`), used in crates/xcl/src/hle/xgameruntime/mod.rs. CI installs the latest stable, so a new release can deprecate an API at any time and would turn CI red with no change in the tree. RUSTFLAGS=-D warnings -A deprecated on the windows job makes every other rustc warning an error and leaves deprecations as warnings. Only CI sets it, so local builds are unaffected. --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc905cb1bc..c325f3d95d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,10 @@ # Build + tests on a GitHub Windows runner: no GPU and no game data, so the GPU tests skip # (each prints "SKIPPED : ", counted at the end of scripts/test.ps1) and the # tests on game data pass without running. What it checks on every push and pull request: -# the workspace builds, the unit / integration tests pass, and the recompiler's HLSL compiles -# with the runner's DXC (Windows SDK). +# the workspace builds with no rustc warnings (`RUSTFLAGS: -D warnings` turns each one into an +# error, except deprecations: `-A deprecated`, because a new stable can deprecate an API at any +# time), the unit / integration tests pass, and the recompiler's HLSL compiles with the +# runner's DXC (Windows SDK). # # Left out: the test title's end-to-end run (`test_title_runs_and_game_folder_is_untouched`). # The runner has no System32\xgameruntime.dll (Gaming Services) and only the Microsoft Basic @@ -30,6 +32,7 @@ jobs: env: CARGO_TERM_COLOR: always CARGO_INCREMENTAL: 0 + RUSTFLAGS: -D warnings -A deprecated steps: - uses: actions/checkout@v4