- All playbooks
- Parallelization and sharding
- Let shared packages without a build step stay cacheable
Let shared packages without a build step stay cacheable
Treat a package with nothing to build as cacheable, so its dependents spread across every CI agent.
Company examples
How DoorDash used this technique
Read what DoorDash changed and follow the original sources.
Let shared packages without a build step stay cacheable
Translated to GitHub Actions
- What DoorDash built
- DoorDash builds its web monorepo with Rush cobuilds, where each CI agent picks up any task whose dependencies are done.
- Your GitHub Actions version
- Split the build across parallel jobs by the project graph, and let projects with no build output run as separate tasks.
DoorDash builds its web monorepo with Rush cobuilds, where each CI agent picks up any task whose dependencies are done. Cobuilds kept a project and its dependents on one agent when the project had no cacheable output, and DoorDash's shared rigs and ESLint profile have no build step, so nearly every project landed in one cluster. DoorDash contributed the fix upstream: a no-op operation now counts as cacheable. With the clusters gone, DoorDash cut its cobuild agents from ten to five, and cobuilds used all five.
- Use it when
- A distributed or sharded build keeps work on one machine whenever it depends on a package that produces no output.
- Before applying it
- A no-op has nothing to restore, so this holds only for packages with no build or test script; a package that writes output still needs its outputs declared.
- GitHub Actions adaptation
- Compare the source system with your own workflow before applying this translation.
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