Lattice Engineering Blog | We're hiring!

Why we moved our build to Bazel

Posted by Jordan Alvarez on 9 January 2026 · 6 min read
Share on X Share on LinkedIn

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

  1. Caching node_modules between CI runs
  2. Splitting the test suite across 12 shards
  3. 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.

Jordan Alvarez

Jordan Alvarez is a staff engineer on the platform team.

14 Comments

devops_dan said: Great write-up! Did you consider Buck2?
sarahk said: How long did the migration take?
Log in to comment