Skip to content

ci: skip compile-heavy Rust jobs on artifact/docs-only PRs (runner load)#664

Merged
avrabe merged 1 commit into
mainfrom
ci/paths-filter-skip-rust-on-docs
Jul 3, 2026
Merged

ci: skip compile-heavy Rust jobs on artifact/docs-only PRs (runner load)#664
avrabe merged 1 commit into
mainfrom
ci/paths-filter-skip-rust-on-docs

Conversation

@avrabe

@avrabe avrabe commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

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-mem class (Miri) — for changes that touch no code.

What

Adds a changes gate job (pure git diff, no third-party action — keeps the supply chain auditable) that computes rust=true when a PR touches **/*.rs, Cargo.{toml,lock}, or .github/workflows/, else rust=false. On push/main, schedule, and workflow_dispatch it is always true, 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

  • Artifact/docs-only PR: ~15 self-hosted jobs → 3 (the validators). Near-zero compile load.
  • Rust PR / merge to main / nightly: unchanged — full matrix.

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: changes reports rust=true and the full matrix runs once here to prove the gate doesn't break Rust PRs.

Validated locally: python3 yaml.safe_load OK; actionlint clean (ignoring the pre-existing custom-runner-label warnings).

🤖 Generated with Claude Code

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.
@avrabe avrabe merged commit 8d53797 into main Jul 3, 2026
26 of 28 checks passed
@avrabe avrabe deleted the ci/paths-filter-skip-rust-on-docs branch July 3, 2026 04:15
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.

1 participant