Skip to content

ci: gate area jobs on a changes filter + single ci aggregator - #64

Merged
loss-and-quick merged 1 commit into
mainfrom
ci/gate-job
Jun 21, 2026
Merged

ci: gate area jobs on a changes filter + single ci aggregator#64
loss-and-quick merged 1 commit into
mainfrom
ci/gate-job

Conversation

@loss-and-quick

Copy link
Copy Markdown
Owner

Summary

Stop spinning up runners for areas a PR doesn't touch. Today every job runs on
every PR (to keep the required checks reporting) and only its steps skip — so an
irrelevant rust/desktop-windows job still starts a runner (a Windows one) just
to no-op.

New shape:

  • a cheap changes job computes frontend / rust / desktop flags from the
    diff (the detect logic, previously copy-pasted into each job, now lives once);
  • the heavy jobs gate at the job level (needs: changes + if), so an untouched
    area's job is genuinely skipped — no runner;
  • a ci aggregator (if: always(), needs: all) is the one job that always
    runs and fails only on a real failure/cancel (skipped = fine).

Rollout (required — read before merging)

A skipped job doesn't satisfy a required status check, so the single required check
must become ci. Sequence:

  1. Merge this PR (it touches only .github/, so the area jobs skip — may need a
    bypass merge under the current ruleset).
  2. Switch ruleset main required checks: frontend/rust/desktop-linux/
    desktop-windowsci.
  3. Rebase open PRs (feat(desktop): auto-update via tauri-plugin-updater #63) onto the new main so their runs emit the ci context.

Affected layer

  • CI / .github/

Verification

  • actionlint .github/workflows/ci.yml

Notes for reviewers

Trade-off: heavy jobs now wait on changes (~10–20s added wall-clock on relevant
PRs) in exchange for not starting runners on irrelevant ones, and a single,
maintainable required check.

A cheap `changes` job computes which areas a PR touches; the frontend/rust/
desktop jobs gate on its outputs (needs + job-level if), so an untouched area's
job no longer spins up a runner just to skip its steps (notably the Windows one).
Since a skipped job doesn't satisfy a required status check, add a `ci` aggregator
(always() + needs all) that fails only on a real job failure — point branch
protection at that single context instead of the individual jobs.
@loss-and-quick
loss-and-quick merged commit 96b58cc into main Jun 21, 2026
7 checks passed
@loss-and-quick
loss-and-quick deleted the ci/gate-job branch June 21, 2026 14:37
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