Keep one wheel job per platform and Python version; never go back to one job per platform
Context#
The CI runs about 35 jobs: 21 wheel jobs (3 platforms x 7 Pythons), 10 Valgrind jobs and 4 test jobs. On the Free plan (public repo) the limit is concurrent jobs, not minutes. In a full run the test jobs waited 17 minutes on average (27 at most) and Valgrind jobs up to 30, because the wheel jobs need only changes and take the runner slots first. Merging the wheels into 3 jobs would remove the queue.
Decision#
Keep the matrix of one wheel job per platform and Python version. Cut the queue with the compiler cache and with job ordering, never by merging the wheels. A per-platform warm-up wheel (cp312 first, then the other six) is a separate and still open choice: with a warm cache every wheel already takes 7 to 14 minutes, so the warm-up wheel adds one such step to a short job.
Why#
Before the sharding commit (2026-09-30) the wheels ran as 3 jobs that built all 7 Pythons in turn: 134 min (ubuntu-22.04), 89 min (ubuntu-22.04-arm), 25 min (macOS) in the last such run. One job per version brought the slowest job to about 28 to 50 minutes. With sccache and a filled cache, one wheel job takes 7 to 10 min (macOS) and 11 to 14 min (Linux x86). The user said the sharding was done on purpose because of the slow runs.
Rejected options#
One wheel job per platform with a warm cache: possible in theory, but unproven, and the cold case still takes about 2 hours. A single warm-up job before all wheels: it makes the Linux wheels wait for the macOS runners, whose queue wait was up to 28 minutes. Fewer Python versions on pull requests: the user wants every check on every PR, because after a merge the chance to reach the author is gone.
Also found by searching
- should wheel builds be one job per platform to reduce concurrent jobs
- wheel CI takes two hours when all Python versions build in one job
- GitHub Actions free plan concurrent jobs limit makes test jobs wait in the queue
- do I need a warm-up wheel job before the other Python versions