Skip to content

ci: pull requests only, and the Windows lanes stop building one project at a time - #75

Merged
tsyma merged 4 commits into
mainfrom
ci/pr-only-and-parallel
Sep 15, 2026
Merged

tsyma merged 4 commits into
mainfrom
ci/pr-only-and-parallel

Conversation

@tsyma

@tsyma tsyma commented Sep 15, 2026

Copy link
Copy Markdown
Member

Three one-line changes, each measured on this repository's own runs.

Pull requests only. The triggers were push: ['**'] and pull_request together, so a branch with a PR open bought two complete runs of all five jobs for one commit, and a branch without one bought a run nobody was going to read. In the last sixty runs that is 37 push events against 21 pull_request ones. The pull_request event already covers every branch, and covers it merged into main. A concurrency group now also cancels a superseded run instead of letting it finish against code nobody will merge.

The Windows lanes had no parallelism at all. cmake -B build with no -G picks the Visual Studio generator here, so cmake --build is MSBuild, and MSBuild without /m builds one project at a time. The Linux lanes have asked for -j4 all along, with a comment beside them explaining why; these two never did. It shows:

job step
app-windows Build the app 14.0 min
release-base-linux same build, -j4 3.8 min
app-windows Test, all suites 0.3 min

A run is 49 machine-minutes and 45 of them are compiling.

And the bare -j in core-linux, which means unlimited rather than "use the cores" — harmless in a job that takes 42 seconds, but it is the same footgun the comment beside the Linux lanes already warns about, and leaving one copy of it contradicts the warning.

The magnitude of the Windows saving is not promised: MSBuild's /m parallelises across projects, and a JUCE target is largely one project, so the win could be small. This PR's own run measures it.

…ct at a time

Three one-line changes, each measured on this repository's own runs rather than assumed.

PULL REQUESTS ONLY. The triggers were `push: ['**']` and `pull_request` together, so a branch with a PR
open bought TWO complete runs of all five jobs for one commit, and a branch without one bought a run
nobody was going to read. In the last sixty runs that is 37 push events against 21 pull_request ones. The
pull_request event already covers every branch, and covers it merged into main, which is the stricter
object. A concurrency group now also cancels a superseded run instead of letting it finish against code
nobody will merge.

THE WINDOWS LANES HAD NO PARALLELISM AT ALL. `cmake -B build` with no -G picks the Visual Studio
generator here, so `cmake --build` is MSBuild, and MSBuild without /m builds one project at a time. The
Linux lanes have asked for -j4 all along and there is a comment beside them explaining why; these two
never did. It shows: app-windows spent 14.0 minutes in Build the app, against 3.8 for the same build on
Linux, while its whole test phase is 0.3 minutes. A run is 49 machine-minutes and 45 of them are
compiling.

AND THE BARE -j in core-linux, which means unlimited rather than "use the cores" — harmless in a job that
takes 42 seconds, but it is the same footgun the comment beside the Linux lanes already warns about, and
leaving one copy of it contradicts the warning.
ci.yml had no `permissions` block, so its token arrived with whatever the repository default grants. The
file checks out, builds and uploads artifacts; it never writes to the repository, so `contents: read`
says exactly that. This is the one thing CodeQL has ever found in this family — in orbitcab, about a
workflow file, not about any code.

Timeouts were already on every job here, at 30 and 60 where somebody sized them deliberately. Nothing to
add: the earlier count that said otherwise was counting `on:` sub-keys as jobs.
@tsyma
tsyma force-pushed the ci/pr-only-and-parallel branch from bcd74ce to 7608f9e Compare September 15, 2026 20:07
release.yml had the same two shapes ci.yml did and they were missed the first time: a bare `-j`, which
means unlimited rather than "use the cores", and a Windows build with no parallelism flag at all, which
under the Visual Studio generator is MSBuild without /m — one project at a time. The lane that ships is
the one where a slow build costs the most attention.
The group I wrote was `ci-<pr number>`, the same literal in every file of a repository. In namz, which
has three workflows, that put ci, js and python in ONE group with cancel-in-progress — so starting js
CANCELLED the other two, and the pull request showed nine cancelled jobs that had done nothing wrong.
Adding ${{ github.workflow }} makes the group what it was meant to be: one live run per workflow per
branch, and workflows that do not race each other.

Caught by looking at the runs after opening the pull requests rather than by reading the diff again,
which is the only reason it surfaced at all: the file looked right in every single repository.
@tsyma
tsyma merged commit b2e9102 into main Sep 15, 2026
5 checks passed
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