CI: no workflow builds the release profile, so every PR is validated only in the configuration nobody runs #2254

Open
opened 2026-11-25 11:48:07 +00:00 by itsonewi · 2 comments
itsonewi commented 2026-11-25 11:48:07 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by itsonewi on 2026-11-25T11:48:07Z.


Summary

All three workflows on 1a0bbe3 build only the debug profile:

  • .github/workflows/ci.yml runs ./scripts/test.ps1 --skip test_title_runs_and_game_folder_is_untouched, and scripts/test.ps1 runs cargo build --workspace and cargo test --workspace -- --test-threads=4, both debug.
  • .github/workflows/pr-check.yml reads a description and a file list; it compiles nothing.
  • .github/workflows/stale.yml is the stale bot.

No --release anywhere in the three files or in scripts/test.ps1. Meanwhile the release build is the one everything else is measured in:

  • scripts/smoke.ps1 defaults to target\release\xcl.exe and tells the contributor to cargo build --release -p xcl, so every xcl-smoke block in a PR description - the numbers the merge gate compares - comes from a build CI has never made;
  • [profile.release] debug = 2 in the root Cargo.toml exists so release-only crashes can be resolved, which says release is the build people diagnose;
  • crates/xcl/build.rs adds the /HIGHENTROPYVA:NO and --disable-high-entropy-va link arguments for the binary (#631), and the PE-header test is the only thing that sees them.

What that leaves unseen:

  • code under #[cfg(not(debug_assertions))], and debug_assert!-guarded invariants, is never compiled by CI; a type error there is caught by the first contributor who runs cargo build --release for a smoke block, not by the PR;
  • overflow behaviour and optimisation-level-only failures are debug-tested only, while the cache identity, the translated output and every regression number come from release;
  • the release link step itself - the GNU ld path in particular, which is where #631's directive had to be added twice - runs only on contributor machines;
  • and #2214's --locked enforcement, once it lands in scripts/test.ps1, still would not cover the release build.

Suggested fix

One step in ci.yml after Build and test, building the binaries only (not the tests), so the cost stays a few minutes:

      - name: Build the release binary
        run: cargo build --release -p xcl --bins

The existing actions/cache@v4 step already carries target, so the release artifacts are cached with the debug ones. If the 45-minute job timeout is a concern, this can be its own job so it does not extend the test job.

Not #2214 or #2232

  • #2214 is the toolchain pin and --locked in CI and scripts/test.ps1; it says nothing about the profile.
  • #2232 is pr_check.py not noticing that a PR's smoke block came from a different build profile than main's - a check-side hole. This is the CI side: the profile is never built at all.

Not tested

  • Nothing run: 1a0bbe3 was read through the API. The "no --release" claim is a read of the three workflow files and scripts/test.ps1; the release-only paths listed are the usual Rust ones, not a failure I reproduced.

AI use

  • Claude (Opus 5.5) read the three workflows, scripts/test.ps1, scripts/smoke.ps1 and the root Cargo.toml on 1a0bbe3, and wrote this report; the human account checked the files before opening it.
<!-- greyfinch-sync:ivall/xcl:issue:6603780338 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2264). Originally posted by [itsonewi](https://github.com/itsonewi) on 2026-11-25T11:48:07Z. --- ### Summary All three workflows on `1a0bbe3` build only the debug profile: - `.github/workflows/ci.yml` runs `./scripts/test.ps1 --skip test_title_runs_and_game_folder_is_untouched`, and `scripts/test.ps1` runs `cargo build --workspace` and `cargo test --workspace -- --test-threads=4`, both debug. - `.github/workflows/pr-check.yml` reads a description and a file list; it compiles nothing. - `.github/workflows/stale.yml` is the stale bot. No `--release` anywhere in the three files or in `scripts/test.ps1`. Meanwhile the release build is the one everything else is measured in: - `scripts/smoke.ps1` defaults to `target\release\xcl.exe` and tells the contributor to `cargo build --release -p xcl`, so every `xcl-smoke` block in a PR description - the numbers the merge gate compares - comes from a build CI has never made; - `[profile.release] debug = 2` in the root `Cargo.toml` exists so release-only crashes can be resolved, which says release is the build people diagnose; - `crates/xcl/build.rs` adds the `/HIGHENTROPYVA:NO` and `--disable-high-entropy-va` link arguments for the binary (#631), and the PE-header test is the only thing that sees them. What that leaves unseen: - code under `#[cfg(not(debug_assertions))]`, and `debug_assert!`-guarded invariants, is never compiled by CI; a type error there is caught by the first contributor who runs `cargo build --release` for a smoke block, not by the PR; - overflow behaviour and optimisation-level-only failures are debug-tested only, while the cache identity, the translated output and every regression number come from release; - the release link step itself - the GNU `ld` path in particular, which is where #631's directive had to be added twice - runs only on contributor machines; - and #2214's `--locked` enforcement, once it lands in `scripts/test.ps1`, still would not cover the release build. ### Suggested fix One step in `ci.yml` after `Build and test`, building the binaries only (not the tests), so the cost stays a few minutes: ```yaml - name: Build the release binary run: cargo build --release -p xcl --bins ``` The existing `actions/cache@v4` step already carries `target`, so the release artifacts are cached with the debug ones. If the 45-minute job timeout is a concern, this can be its own job so it does not extend the test job. ### Not #2214 or #2232 - #2214 is the toolchain pin and `--locked` in CI and `scripts/test.ps1`; it says nothing about the profile. - #2232 is `pr_check.py` not noticing that a PR's smoke block came from a different build profile than main's - a check-side hole. This is the CI side: the profile is never built at all. ### Not tested - Nothing run: `1a0bbe3` was read through the API. The "no `--release`" claim is a read of the three workflow files and `scripts/test.ps1`; the release-only paths listed are the usual Rust ones, not a failure I reproduced. **AI use** - Claude (Opus 5.5) read the three workflows, `scripts/test.ps1`, `scripts/smoke.ps1` and the root `Cargo.toml` on `1a0bbe3`, and wrote this report; the human account checked the files before opening it.
Creaa commented 2026-11-25 12:06:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by Creaa on 2026-11-25T11:58:22Z.


I'm taking this. I'll add a release build of the xcl binary to the existing Windows CI job and verify the command locally on MSVC.

<!-- greyfinch-sync:ivall/xcl:comment:7161749425 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2264#issuecomment-7161749425). Originally posted by [Creaa](https://github.com/Creaa) on 2026-11-25T11:58:22Z. --- I'm taking this. I'll add a release build of the xcl binary to the existing Windows CI job and verify the command locally on MSVC.
itsonewi commented 2026-11-25 12:06:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by itsonewi on 2026-11-25T12:00:25Z.


Thanks @Creaa. Two notes from reading the workflow while writing this, in case they save a round trip:

  • cargo build --release -p xcl --bins is enough - the tests are not needed for this and it keeps the step near a couple of minutes; the existing actions/cache@v4 step already caches target, so the debug and release artefacts share a key and a cache hit survives across PRs.
  • CI is MSVC (windows-2025, rustup default stable MSVC), so the step covers /HIGHENTROPYVA:NO but not the -Wl,--disable-high-entropy-va branch of build.rs that #631 had to add for the GNU toolchain. Worth one line under Not tested rather than adding a second toolchain to the job.
<!-- greyfinch-sync:ivall/xcl:comment:7161793833 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2264#issuecomment-7161793833). Originally posted by [itsonewi](https://github.com/itsonewi) on 2026-11-25T12:00:25Z. --- Thanks @Creaa. Two notes from reading the workflow while writing this, in case they save a round trip: - `cargo build --release -p xcl --bins` is enough - the tests are not needed for this and it keeps the step near a couple of minutes; the existing `actions/cache@v4` step already caches `target`, so the debug and release artefacts share a key and a cache hit survives across PRs. - CI is MSVC (`windows-2025`, `rustup default stable` MSVC), so the step covers `/HIGHENTROPYVA:NO` but not the `-Wl,--disable-high-entropy-va` branch of `build.rs` that #631 had to add for the GNU toolchain. Worth one line under **Not tested** rather than adding a second toolchain to the job.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl#2254
No description provided.