ci: the renderer's build check runs on pull requests that touch it, not in every release #2586

Merged
HumanBean merged 1 commit from HumanBean/Longshot:ci/renderer-build-check-in-pr into main 2026-11-26 02:45:28 +00:00
Owner

Summary

Every release (nightly or stable) compiled the Vulkan back end alone (longshot-builder compile --only renderer) as build checks that ship nothing: longshot_vk.so without and with AMD FSR 4 in the Linux job, longshot_vk.dll in the Windows job. That took about 11 minutes of the ~55-minute nightly on the 2-core release runner, and only caught a broken renderer after it had merged.

This moves the check to pull requests. ci.yml gets a renderer job, a matrix of two: Renderer build check (Linux, compile --only renderer, without and with FSR 4) and Renderer build check (Windows, compile --only renderer, without and with FSR 4). It runs on the pull request runners (ubuntu-24.04, in the longshot-ci-checks image, with the ci_setup.sh fallback like the other jobs), never on release or deploy. The Windows leg now also builds with AMD FSR 4, which the release never did (vulkan-dlss.yml, the manual DLSS link check, is unchanged).

  • When it runs: scripts/ci_changes.py gets a renderer= output next to code=, from a new RENDERER list of what that compile reads: gpu/, the host and game headers it includes, host/posix/, host/pgo_rt.c, the MinGW shims, the third-party parts its plan names, the logo and the renderer profile, builder/, the Rust pins, tools.lock, the CI image's tools, and the job's own files. It also runs on every push to main. A base whose ci_changes.py has no renderer= yet (this PR's own run, since the script comes from the base) falls back to code=, so the job runs here.
  • The builder: a developer's build, cargo build -p longshot-builder over the rust job's dependency cache (read only). The rust job uploads no builder artifact.
  • The tools: tools.lock's, installed into the checkout by that builder (dev tools install --only ...): linux-x64's llvm, sysroot and cpm; windows-x64's cpm plus llvm-mingw's Linux build. RX_RELEASE=1, RX_MARCH=x86-64-v3, as the release check had.
  • Caches (read by every run, written only by a push to main): the tools' downloads, and the compiled objects (--store, objects keyed by compiler, flags, source and headers) under a key of the renderer files' hash. Main writes an entry from an empty store when there's none for its tree, so each entry holds one tree's objects. A pull request restores the newest.
  • The release: the four build-check steps are gone from build-linux.yml and build-windows.yml. Everything that ships is unchanged. Their checked input, and release.yml's released-as call that set it, only existed to skip those checks on a re-tagged commit, so they are removed too. One side effect: a tag no longer stops early when the commit's earlier release isn't signed or complete. That check guarded the skip, which no longer exists.

Read first: the renderer job in .forgejo/workflows/ci.yml, then scripts/ci_changes.py.

Overlap: #2568 (open) also edits build-linux.yml and build-windows.yml (step names, waits, uploads). This PR is based on main and only removes the trailing build-check steps and the checked input, so whichever merges second has a small rebase.

Testing

Tested: A workflow and CI-script change only, so a game run means nothing here. Locally I ran actionlint on every workflow (it passes, ShellCheck included). This PR's own CI runs the new job: the PR touches ci.yml, so changes marks it as needed. tests/test_windows_on_linux.py and tests/test_release_workflow.py are updated for the removed steps, and a check of the new job and RENDERER is added. Those run in CI's game-free checks, not on my PC.

Still to test:

  • The next nightly after merge: it should finish about 11 minutes sooner with no longshot_vk.* (build check) steps (by hand, from the Actions tab).

Measurements

Nothing to measure in the game: this changes CI only. The nightly loses the ~11 minutes the build checks took. This PR's run shows the new job's time on the PR runners.

Risks

  • A renderer break now shows on the pull request rather than in the nightly. If RENDERER misses a path the renderer reads, a PR touching only that path skips the check, and the next push to main catches it (the job always runs there).
  • The PR runners do the compile work the release runner used to, only for renderer-touching PRs and main pushes; the object-store cache makes repeat runs incremental.
  • A revert brings the release steps back.
  • Candidate required check: both renderer legs, since a skipped job counts as passed. Branch protection is not changed here.
  • Players notice nothing.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says. (The game doesn't run this change: CI only.)
  • mise run test passes (any failure that also fails on main is named). (Not run on this PC; CI's game-free checks run the same run_all.py --strict. Ticked once they pass.)
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A check under tests/ that reads changed source is updated, not weakened.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

https://claude.ai/code/session_017vw8e1RP1VgcWpgA7Kq6ec

## Summary Every release (nightly or stable) compiled the Vulkan back end alone (`longshot-builder compile --only renderer`) as build checks that ship nothing: `longshot_vk.so` without and with AMD FSR 4 in the Linux job, `longshot_vk.dll` in the Windows job. That took about 11 minutes of the ~55-minute nightly on the 2-core release runner, and only caught a broken renderer after it had merged. This moves the check to pull requests. `ci.yml` gets a `renderer` job, a matrix of two: **Renderer build check (Linux, compile --only renderer, without and with FSR 4)** and **Renderer build check (Windows, compile --only renderer, without and with FSR 4)**. It runs on the pull request runners (`ubuntu-24.04`, in the `longshot-ci-checks` image, with the `ci_setup.sh` fallback like the other jobs), never on `release` or `deploy`. The Windows leg now also builds with AMD FSR 4, which the release never did (`vulkan-dlss.yml`, the manual DLSS link check, is unchanged). - **When it runs:** `scripts/ci_changes.py` gets a `renderer=` output next to `code=`, from a new `RENDERER` list of what that compile reads: `gpu/`, the host and game headers it includes, `host/posix/`, `host/pgo_rt.c`, the MinGW shims, the third-party parts its plan names, the logo and the renderer profile, `builder/`, the Rust pins, `tools.lock`, the CI image's tools, and the job's own files. It also runs on every push to `main`. A base whose `ci_changes.py` has no `renderer=` yet (this PR's own run, since the script comes from the base) falls back to `code=`, so the job runs here. - **The builder:** a developer's build, `cargo build -p longshot-builder` over the `rust` job's dependency cache (read only). The `rust` job uploads no builder artifact. - **The tools:** tools.lock's, installed into the checkout by that builder (`dev tools install --only ...`): linux-x64's llvm, sysroot and cpm; windows-x64's cpm plus llvm-mingw's Linux build. `RX_RELEASE=1`, `RX_MARCH=x86-64-v3`, as the release check had. - **Caches** (read by every run, written only by a push to `main`): the tools' downloads, and the compiled objects (`--store`, objects keyed by compiler, flags, source and headers) under a key of the renderer files' hash. Main writes an entry from an empty store when there's none for its tree, so each entry holds one tree's objects. A pull request restores the newest. - **The release:** the four build-check steps are gone from `build-linux.yml` and `build-windows.yml`. Everything that ships is unchanged. Their `checked` input, and `release.yml`'s `released-as` call that set it, only existed to skip those checks on a re-tagged commit, so they are removed too. One side effect: a tag no longer stops early when the commit's earlier release isn't signed or complete. That check guarded the skip, which no longer exists. Read first: the `renderer` job in `.forgejo/workflows/ci.yml`, then `scripts/ci_changes.py`. **Overlap:** [#2568](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2568) (open) also edits `build-linux.yml` and `build-windows.yml` (step names, waits, uploads). This PR is based on `main` and only removes the trailing build-check steps and the `checked` input, so whichever merges second has a small rebase. ## Testing **Tested:** A workflow and CI-script change only, so a game run means nothing here. Locally I ran `actionlint` on every workflow (it passes, ShellCheck included). This PR's own CI runs the new job: the PR touches `ci.yml`, so `changes` marks it as needed. `tests/test_windows_on_linux.py` and `tests/test_release_workflow.py` are updated for the removed steps, and a check of the new job and `RENDERER` is added. Those run in CI's game-free checks, not on my PC. **Still to test:** - The next nightly after merge: it should finish about 11 minutes sooner with no `longshot_vk.* (build check)` steps (by hand, from the Actions tab). ## Measurements Nothing to measure in the game: this changes CI only. The nightly loses the ~11 minutes the build checks took. This PR's run shows the new job's time on the PR runners. ## Risks - A renderer break now shows on the pull request rather than in the nightly. If `RENDERER` misses a path the renderer reads, a PR touching only that path skips the check, and the next push to `main` catches it (the job always runs there). - The PR runners do the compile work the release runner used to, only for renderer-touching PRs and `main` pushes; the object-store cache makes repeat runs incremental. - A revert brings the release steps back. - Candidate required check: both `renderer` legs, since a skipped job counts as passed. Branch protection is not changed here. - Players notice nothing. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. (The game doesn't run this change: CI only.) - [ ] `mise run test` passes (any failure that also fails on `main` is named). (Not run on this PC; CI's game-free checks run the same `run_all.py --strict`. Ticked once they pass.) - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017vw8e1RP1VgcWpgA7Kq6ec
ci: the renderer's build check runs on pull requests that touch it, not in every release
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
CI / What the change needs (pull_request) Successful in 6s
PR description / Title and description (pull_request_target) Successful in 8s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 1s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 0s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 0s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Failing after 0s
CI / Third-party parts and guide screenshots (pull_request) Successful in 11s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Failing after 1s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 0s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 0s
CI / Website build and checks (pull_request) Failing after 0s
1f3868b40a
The release's build checks (compile --only renderer for Linux without and with
AMD FSR 4, and for Windows) shipped nothing and took about 11 minutes of the
nightly on the release runner. They are now ci.yml's renderer job, on the pull
request runners, for Linux and Windows, each without and with AMD FSR 4, when a
change touches what that compile reads (scripts/ci_changes.py's RENDERER) and on
every push to main. release.yml's checked (released-as), whose only use was
skipping those checks, goes with them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e1RP1VgcWpgA7Kq6ec
HumanBean force-pushed ci/renderer-build-check-in-pr from 1f3868b40a
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
CI / What the change needs (pull_request) Successful in 6s
PR description / Title and description (pull_request_target) Successful in 8s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 1s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 0s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 0s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Failing after 0s
CI / Third-party parts and guide screenshots (pull_request) Successful in 11s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Failing after 1s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 0s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 0s
CI / Website build and checks (pull_request) Failing after 0s
to d80c19e7ad
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
PR description / Title and description (pull_request_target) Successful in 7s
CI / What the change needs (pull_request) Successful in 8s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 1s
CI / Third-party parts and guide screenshots (pull_request) Successful in 12s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 1s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 1s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Failing after 1s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Failing after 1s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 1s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 1s
CI / Website build and checks (pull_request) Failing after 1s
2026-11-26 01:27:58 +00:00
Compare
HumanBean force-pushed ci/renderer-build-check-in-pr from d80c19e7ad
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
PR description / Title and description (pull_request_target) Successful in 7s
CI / What the change needs (pull_request) Successful in 8s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 1s
CI / Third-party parts and guide screenshots (pull_request) Successful in 12s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 1s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 1s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Failing after 1s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Failing after 1s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 1s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 1s
CI / Website build and checks (pull_request) Failing after 1s
to 21086e6c6c
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
CI / What the change needs (pull_request) Successful in 34s
CI / Third-party parts and guide screenshots (pull_request) Successful in 45s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 3m54s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Successful in 3m15s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 3m5s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 2m57s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 9m27s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Successful in 8m47s
CI / Website build and checks (pull_request) Successful in 4m8s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 19m8s
PR description / Title and description (pull_request_target) Failing after 8s
2026-11-26 02:03:56 +00:00
Compare
HumanBean changed title from WIP: ci: the renderer's build check runs on pull requests that touch it, not in every release to ci: the renderer's build check runs on pull requests that touch it, not in every release 2026-11-26 02:45:20 +00:00
HumanBean deleted branch ci/renderer-build-check-in-pr 2026-11-26 02:45:29 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
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.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2586
No description provided.