Skip to content

CI: stop building the same commit several times - #86

Merged
sbrants merged 1 commit into
mainfrom
ci/dedupe-runs
Oct 27, 2026
Merged

sbrants merged 1 commit into
mainfrom
ci/dedupe-runs

Conversation

@sbrants

@sbrants sbrants commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Summary

Since #84, CI used about 4 hours of runner time across 17 runs, and much of it rebuilt work already done. The release commit d4f1cc4 alone was built by CI, CodeQL, Release cache and Release.

  • CodeQL (codeql.yml, new): replaces the default setup, which ran a second scan of about 11 minutes on every push to main. Branch protection requires PRs to be up to date, so that push has the same tree the PR scan just analyzed. The new workflow scans PRs, plus a weekly scan of main to keep its alert state current, with the same four languages and the default query suite.
  • Release cache: a new changes job skips the five release builds when a push only changes the wavetrace version in Cargo.toml/Cargo.lock, which every release bump does. rust-cache only caches dependencies, so the existing caches still fit, and the release that triggered the run couldn't use the new caches anyway. Real dependency changes, edits to this workflow, the weekly schedule and manual runs all still build. I tested the check against real history: 5c148a0..d4f1cc4 (v0.4.24 bump) skips, 41ce3d0..7b84a91 (v0.4.23 bump) skips, and 97c1693..c9e3102 (chore(deps): bump the cargo-minor-patch group across 1 directory with 9 updates #83's Cargo bump) builds.
  • Dependabot: npm and Cargo now share one multi-ecosystem group, app-deps. That means one weekly PR and one CI run, and no second run for whichever PR used to merge second. It also keeps the Tauri npm packages and crates in step. Today chore(deps): bump the cargo-minor-patch group across 1 directory with 9 updates #83 merged ahead of chore(deps): bump the npm-minor-patch group across 1 directory with 6 updates #82, and every Release cache job failed with Found version mismatched Tauri packages. Major versions are still ignored, and github-actions updates are unchanged.

CI on pushes to main is unchanged on purpose. It saves the Rust cache that PR runs start from: about 8 minutes warm, against 39 minutes cold.

Before merging

The CodeQL default setup has to be turned off in Settings → Code security → CodeQL analysis (⋯ → Disable CodeQL). While it's on, GitHub rejects uploads from this workflow, so this PR's Analyze jobs may fail until it's off. After that, re-run them.

🤖 Generated with Claude Code

- codeql.yml: replace CodeQL default setup with a workflow that scans PRs
  and runs weekly, not every push to main. With "require up to date" on,
  the merge commit has the tree the PR scan already analyzed.
- release-cache.yml: skip when a push only changes the wavetrace version
  in Cargo.toml/Cargo.lock (every release bump). rust-cache caches
  dependencies only, so the existing caches still fit, and the run used
  to rebuild all five release targets alongside the release itself.
- dependabot.yml: put npm and Cargo in one multi-ecosystem group, so one
  PR and one CI run replace two (plus a rerun after the first merge), and
  the Tauri npm packages and crates can't land at different versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sbrants
sbrants merged commit 8869ed0 into main Oct 27, 2026
12 of 16 checks passed
@sbrants
sbrants deleted the ci/dedupe-runs branch October 27, 2026 04:19
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