- All playbooks
- Caching and setup
- Reuse downloaded tools across runs
Reuse downloaded tools across runs
Cache versioned tools and browser downloads so jobs can restore them while retaining installation and repair checks.
How companies used this technique
Read what each company changed and follow the original sources.
Cache compiled lint tools between runs
Bun cached the cargo-dylint binaries on the tool version, and the dylint driver and mordant library on the version plus the pinned mordant revision. A cache hit skips only the install; the workspace check still runs on every change. The cache carried over when Bun folded its Rust lint jobs into one workflow.
A cold run takes about 6.5 minutes; the PR expects warm runs to take about a minute and a half (estimate). Source
- Use it when
- Installing or compiling a lint tool takes a large share of the lint job.
- Before applying it
- The cache key covers the runner OS, the tool version and every pinned revision the tool is built against.
Cache pinned tool and matrix downloads
The same SDK change caches the npm downloads of a version-pinned npx tool and of each smoke-test matrix leg, with keys that name the tool version or the matrix’s Node and TypeScript versions.
- Use it when
- A pinned command-line tool or matrix leg downloads the same packages on every run.
- Before applying it
- OPT2’s recipe targets large binaries; here its version-pinned cache key applies to npm package downloads. Key the cache on every version that changes the download, and keep the step that installs or runs the tool.
Reuse browser downloads and keep the repair step
Checkout Kit caches Playwright Chromium in its default Linux cache directory, keyed by the runner's operating system and the web lockfile. The install command still runs after the restore, so it repairs a stale or partial cache and installs system dependencies.
Merged 2026-10-12; the cache step is on the default branch. Source
- Use it when
- Browser downloads take a large share of a job's setup on every run.
- Before applying it
- A browser cache can take as long to restore as a fresh download; compare cold, warm and changed-lockfile runs before keeping it.
Reuse a downloaded toolchain
Stripe Android replaced its Java installer with direct Temurin downloads for the configured version, OS and architecture, and reuses an existing install directory on later builds.
- Use it when
- Every CI job repeats a large toolchain download or installer bootstrap.
- Before applying it
- Key the reuse on exact version, OS and architecture, verify a published checksum, and install atomically so a partial download is never reused.
Company Playbooks
- Read Anthropic’s playbookRun only affected tests
- Read DoorDash’s playbookRun build and test in parallel, sharded across CI agents
- Read Linear’s playbookBenchmark the same job on faster hardware
- Read Mastra’s playbookStarSling runners for the slowest test workflow
- Read OpenAI’s playbookRank CI fixes by the minutes they save
- Read Ramp’s playbookMove a CPU-bound test suite to a faster CPU
- Read Shopify’s playbookLet an agent iterate against one CI metric
- Read Spotify’s playbookBuild arm64 on native arm64 runners
- Read Stripe’s playbookRun only the tests a change can reach
- Read Uber’s playbookBuild the merge-queue speculations most likely to be needed