Guides
How to get incremental builds in CI
CI always does a clean build even though your build system supports incremental compilation.
6 min read
CI always does a clean build even though your build system supports incremental compilation.
Why it happens
Every job starts on a fresh machine, so there is no previous build state to be incremental against.
How to fix it
- Persist the build output directory keyed on the lockfile
- Use a compiler cache so reuse works across branches, not just within one
- Consider snapshot runners, which restore the whole machine state
- Accept that the first run after a dependency change is always cold
Your next build could be twice as fast, at half the price
Start free. Migrating away is the same one line, and we publish that diff too.
Related
How to scale self-hosted runnersSelf-hosted runners either queue at peak or sit idle and expensive.How to use runner groupsAny repository can schedule jobs on any runner.How to design a runner label strategyLabels grew organically and nobody knows which to use.Hosted or BYOC: how to chooseYou are unsure whether to use hosted runners or deploy into your own cloud.