Why we moved our build to Bazel
Our monorepo had grown to 1.4 million lines of code, and a clean CI build took 47 minutes. Incremental builds were unreliable, so engineers ran clean builds out of habit.
What we tried first
- Caching
node_modulesbetween CI runs - Splitting the test suite across 12 shards
- Upgrading CI runners to 32 cores
Each change helped a little, but none fixed the root problem: the build had no accurate dependency graph.
Results
After the migration, the median CI build takes 6 minutes, and 92% of builds hit the remote cache.
Thanks to the developer productivity team for leading the migration.
14 Comments