ci: skip compile-heavy Rust jobs on artifact/docs-only PRs (runner load)#664
Merged
Conversation
Adds a `changes` gate job (pure `git diff`, no third-party action) that
sets `rust=true` when a PR touches `**/*.rs`, `Cargo.{toml,lock}`, or
`.github/workflows/`, and `rust=false` otherwise. On push/main, schedule,
and workflow_dispatch it is always `true`, so merges and the nightly run
still exercise the full matrix.
The compile-heavy self-hosted jobs — fmt, clippy, test, coverage, miri,
proptest, mutants-cli, semver-checks, msrv, deny, supply-chain — now gate
on `needs.changes.outputs.rust == 'true'`. A YAML/artifact- or docs-only
PR drops from ~15 self-hosted jobs (~75 runner-min, incl. the scarce
lean-mem Miri) to just the content validators.
Deliberately NOT gated (must run on artifact/doc PRs): traceability
(`rivet validate` + commits), docs-check (`rivet docs check`), yaml-lint.
GitHub-hosted jobs (playwright, zola, vscode-ext, audit, kani, verus,
rocq) are unchanged — they don't touch the shared self-hosted pool.
Complements the existing `concurrency: cancel-in-progress` (which already
kills superseded PR runs) and the nightly-only heavy matrices (#498).
Motivated by shared-pool contention with the maintainer and other agents.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The shared self-hosted runner pool is contended (maintainer + multiple agents). A YAML/artifact- or docs-only PR currently runs the entire Rust matrix (Clippy, Test, Miri, Coverage, mutants-cli, MSRV, semver, deny, supply-chain) — ~15 self-hosted jobs, ~75 runner-min, including the scarce 4-runner
lean-memclass (Miri) — for changes that touch no code.What
Adds a
changesgate job (puregit diff, no third-party action — keeps the supply chain auditable) that computesrust=truewhen a PR touches**/*.rs,Cargo.{toml,lock}, or.github/workflows/, elserust=false. Onpush/main,schedule, andworkflow_dispatchit is alwaystrue, so merges and the nightly run still exercise everything.The compile-heavy self-hosted jobs gate on
needs.changes.outputs.rust == 'true':fmt, clippy, test, coverage, miri, proptest, mutants-cli, semver-checks, msrv, deny, supply-chain.Deliberately NOT gated (they validate artifact/doc content and must run on those PRs):
traceability(rivet validate+ commits),docs-check(rivet docs check),yaml-lint.Unchanged: GitHub-hosted jobs (playwright, zola, vscode-ext, audit, kani, verus, rocq) — they don't touch the shared self-hosted pool.
Effect
Complements the existing
concurrency: cancel-in-progress(already kills superseded PR runs) and the nightly-only heavy matrices (#498). This PR touches.github/workflows/, so it self-tests:changesreportsrust=trueand the full matrix runs once here to prove the gate doesn't break Rust PRs.Validated locally:
python3 yaml.safe_loadOK;actionlintclean (ignoring the pre-existing custom-runner-label warnings).🤖 Generated with Claude Code