Repository navigation
Description
CI is slow to give results. The free GitHub plan runs about 20 jobs at once. One pull request starts about 20 jobs, every merge to main starts another 10-20, and many jobs take around 15 minutes. With several PRs open, runs wait an hour or more for a runner. This issue explores three ways to fix that.
a) More concurrency
Options to compare on cost, setup and maintenance:
- A paid GitHub plan. Team and Enterprise raise the concurrent-job limit.
- GitHub's larger runners. More CPU per job, so each job finishes sooner. Billed per minute.
- Third-party runner services. Blacksmith, Depot, Namespace, BuildJet, Ubicloud and RunsOn plug into GitHub Actions with a one-line
runs-onchange, often cheaper per minute and with higher concurrency. - Self-hosted runners. On our own machines or cloud VMs, for example with actions-runner-controller on Kubernetes. Cheapest at scale, but we'd maintain them and must keep untrusted fork PRs off them.
b) Faster individual runs
- Build the Rust extension once per commit. Build
citry-corein one job, upload the wheel as an artifact, and install it in every job that needs it, instead of compiling in each one. - Cache Rust builds. Use
sccacheorSwatinem/rust-cachewhere a job still has to compile. - Prebuilt container images. Images with the Rust toolchain, Node, Playwright browsers and Python versions already installed save the setup steps.
- Snapshot and restore. CRIU (Checkpoint/Restore In Userspace, also behind Docker's experimental
checkpoint), or microVM snapshots such as Firecracker's, save a running environment, processes included, and restore it in another job. That could mean building once and installing once, then restoring that state in every job that tests. Check how mature and practical this is on GitHub-hosted or self-hosted runners, and compare it with the simpler artifact approach above.
c) Job topology: run each check once
Audit the workflows for work that's repeated on the same OS, Python version and inputs: for example scripts/check.py, or the same pytest selection, running in more than one job or step on identical Linux and Python. Cross-OS and cross-version runs stay. The goal is to remove only the duplicates. Also review:
- whether every merge to
mainneeds the full set of jobs when the merged PR already passed them, or whether a lightermainrun (or a merge queue) would do; concurrencygroups withcancel-in-progress, so a new push cancels its own superseded runs automatically;- path filters on workflows that don't need to run for every change.
Done when
There is a short written comparison for (a), with a recommendation and cost; the changes from (b) and (c) are measured as time per PR before and after; and the chosen changes are in the workflows.
Activity
ci: cancel a pull request's checks when it merges or closes
ci: drop three Python test jobs that repeat the Check workflow's work
JuroOravec commentedon Oct 28, 2026
Steps 1 (#453) and 3 (#489), plus the trimmed PR matrix (#509), are merged. The remaining steps (2: GitHub Team, 4: build citry_core once and share the wheel, 5: re-measure) are planned after 0.7.0.