Latchkey Learn
Faster GitHub Actions
Why Actions workflows are slow and the changes that make them fast, with numbers: caching, parallelism, cold starts and Docker build speed.
Caching
actions/cache, Docker layers, per-ecosystem.
Cache Rust and CargoCache Cargo GitHub Actions builds with Swatinem/rust-cache: what the two keys do, what the post step deletes,
Cache Go modulesCache Go modules GitHub Actions jobs with setup-go: it is on by default, it keys on go.mod since v6.3.0, and
Cache Gradle and MavenCache Gradle GitHub Actions builds with setup-gradle and Maven with setup-java, measured cold against warm on
Cache pip and PoetryCache pip GitHub Actions installs with setup-python, and why the Poetry virtualenv beats the download cache,
"Cache not found for input keys"Fix a GitHub Actions cache not restored: the key that never repeats, the prefix that matched something stale,
The 10 GB cache capThe GitHub Actions cache size limit 10GB default evicts rather than bills.
Cache vs artifactsGitHub Actions cache vs artifacts: two storage meters at different rates, two lifetimes, two scopes, and one
How GitHub Actions caching worksHow the GitHub Actions cache matches keys and restore-keys, what the 10 GB cap and the 7-day eviction really
Self-hosted cache serverA self-hosted GitHub Actions cache server intercepts actions/cache through one environment variable the
Speed up npm installSpeed up npm install GitHub Actions jobs with npm ci, the setup-node cache and the right flags, each change
Why GitHub Actions is slowWhat makes GitHub Actions slow, measured on one job: queue time, the dependency cache, the Docker layer cache
Parallelism
Matrix, sharding, splitting suites.
Matrix strategy and parallel jobsA GitHub Actions matrix parallel fan-out repeats every fixed cost per leg.
Path filters and skipped jobsGitHub Actions path filters skip jobs whose files did not change.
Shard tests across runnersGitHub Actions test sharding measured: one suite split two and four ways, what a bad split costs, and the
Parallelize tests by timingParallelize tests by timing and the slowest shard stops setting your wall clock: where durations come from,
Avoid unnecessary workSpeed up GitHub Actions by avoiding unnecessary work: cancel superseded runs, skip jobs rather than
Split a slow test suiteTo split slow test suite CI jobs you must reassemble the results: unique artifact names, one merge job,
Cold start and checkout
Setup time, clones, runner size.
Run Actions on ARMGitHub Actions ARM runners cost less per minute at every Linux size.
Reduce checkout timeA GitHub Actions checkout slow enough to notice is usually fetch-depth 0, LFS or submodules.
Choose a runner sizePick a GitHub Actions runner size from one reading in your log.
Cold start and setup timeIs GitHub Actions slow to start? Separate queue time from setup time, then see what a checkout, a setup
Docker build speed
Layer cache, image size, buildx.
actions/cache vs buildx cacheactions/cache vs buildx cache is not one choice with two spellings.
Clear the Docker build cacheClear docker build cache commands do not all reach the same store.
Docker layer caching in ActionsDocker layer caching GitHub Actions runners can reuse has to live outside the job.
Layer caching not workingDocker layer caching GitHub Actions not working? Read the CACHED count, not the clock.
Speed up Docker builds in ActionsA GitHub Actions Docker build slow enough to notice has six plausible fixes.
Reduce Docker image sizeReduce Docker image size CI transfers on every run: the measured base image sizes, what multi-stage actually
Explore other topics
GitHub Actions runners comparedEvery managed runner vendor, priced and benchmarked side by side.
GitHub Actions costWhat Actions really costs, and how to cut it.
Runner failures Latchkey repairsOut of memory, disk full, rate limits, lost runners: reproduced and fixed.
GitHub Actions workflow errorsWorkflow, YAML, permissions and artifact errors, diagnosed and fixed.
Docker in CI: Registry, Build & RuntimeRegistry, runtime and build errors on CI runners.
CI for coding agentsGive your coding agent a runner.