What Is Build Avoidance?
Build avoidance is a strategy where a build system detects that a target's inputs have not changed and reuses a previously produced output rather than rebuilding it. It relies on accurate input hashing so reuse is always correct. Done well, it turns large pipelines into mostly cache hits.
Why it matters
Most CI runs only touch a small part of a codebase, yet naive pipelines rebuild everything. Build avoidance cuts wall-clock time and runner cost by doing only the work a change actually requires. On metered managed runners, fewer rebuilt targets translates directly into fewer billed minutes.
What it depends on
- Precise input hashing for every target
- A cache that survives between runs
- Deterministic builds so reuse stays correct
Related guides
What Is a Cache Key?A cache key is the identifier that determines which cached entry a lookup retrieves, typically derived from t…
What Is a Deterministic Build?A deterministic build produces the same output from the same inputs every time, with no run-to-run variation…
What Is a Build Cache?A build cache stores intermediate build outputs so unchanged work can be reused across runs instead of recomp…