Transition primary build system and CI to Bazel #728
marvin-hansen
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm transitioning the primary build system from Cargo to Bazel. The project has a functioning Bazel configuration for at least one or two years, but it was the second option because the project was too small. Cargo will still work as expected and still receive the same level of maintainance as before. I'm just not using it myself any longer and I'm moving the CI build to Bazel.
Just recently the code base exceeded 400k LoC and as a rule of thumb, Bazel really only makes sense at about the 500k LoC threshold. That's still true, but because of the very high test coverage (~97%), test execution often takes 5min or longer. The cause is a really pesty problem of cargo test because it lacks test isolation and thus cannot parallize test execution, but the faster Cargo nextest somehow fails to even run on this codebase for inexplicable reasons. Bazel with it's incremental cached build system completes most test runs within 10 - 15 seconds. Time to make the switch.
The PR paves the way to use BuildBuddy as the primary Bazel driven BRE provider. BRE - Bazel Remote Execution offloads the entire compile and test run to a remote cluster and only streams back the results in real-time. BRE works from any PC or Mac and shares the same global cache as the Bazel CI. BRE already works with this PR, but the Bazel CI needs a bit more time. I'm still working out the exact details of the GH integration so this may needs a few more days until it's online.
All reactions