CI: stop running every job twice, and supersede in-flight pull-request runs - #160
Closed
mmelnich wants to merge 1 commit into
Closed
CI: stop running every job twice, and supersede in-flight pull-request runs#160mmelnich wants to merge 1 commit into
mmelnich wants to merge 1 commit into
Conversation
…t runs Two independent sources of wasted CI, both repo-wide and both pre-existing. Every workflow fired on `pull_request` AND on `push` for every branch, so each commit on a pull request ran every job twice: same SHA, same result. With 11 jobs across the four workflows that is 22 check runs per commit, half of them redundant. `push` is now restricted to `main`; a branch with an open pull request is already covered by the `pull_request` event, and `main` still gets a run of its own. Nothing cancelled superseded runs, so pushing a fix while CI was in flight left the previous run going to completion -- a full Windows matrix included. A `concurrency` group now supersedes in-flight runs, but only for pull requests: on `main` every commit should be validated, not just the newest, so `cancel-in-progress` is false there. The one behaviour this removes is automatic CI for a branch with no pull request open. `workflow_dispatch` covers that on demand, and is already declared in all four workflows. Rationale recorded in docs/CI.md so neither is "tidied" back.
Contributor
Author
|
Folded into #156 instead of shipping separately — the Windows PR is already touching these workflows, and splitting it made the change harder to review, not easier. Closing. |
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.
Two independent sources of wasted CI. Both repo-wide, both pre-existing, one line each.
Every job ran twice
All four workflows fired on
pull_requestand onpushfor every branch. On a pull request that means each commit runs every job twice — same SHA, same result:11 jobs across the four workflows, so 22 check runs per commit, half of them redundant.
pushis now restricted tomain. A branch with an open pull request is covered by thepull_requestevent;mainstill gets a run of its own.Nothing cancelled superseded runs
Pushing a fix while CI was in flight left the previous run going to completion, including a full Windows matrix. A
concurrencygroup now supersedes in-flight runs — for pull requests only. Onmain,cancel-in-progressis deliberatelyfalse: every commit there should be validated, not just the newest.What this removes
Automatic CI for a branch with no pull request open.
workflow_dispatchcovers that on demand and is already declared in all four workflows. That is the only behaviour change; if anyone relies on push-triggered CI for branchless work, this is the line to object to.Not included
The remaining idea worth doing separately:
windows-toolchain-guards's decision-table step needs no MSVC and could run on a Linux runner underpwsh, which bills at half the Windows rate. It needs path-separator fixes first, and it touches a file another PR is currently changing.Rationale is recorded in
docs/CI.mdso neither change gets "tidied" back.