Lars Bergstrom

home   blog   projects   publications

Transitioning Servo to Travis CI

11 Jun 2014

Servo is a new web browser engine being built at Mozilla Research, focused on memory safety and taking advantage of modern mobile and parallel hardware. We use the new systems programming language, Rust, to help us achieve these goals. But, using a self-hosting compiler under very active development brings its own issues. On my powerful laptop, a parallelized from-scratch Servo build takes around 44 minutes, 40 minutes of which are totally unrelated to Servo - building the LLVM compiler infrastructure, building Rust a first time and then building Rust a second time with the most recent version of Rust. For contributors without a $3500 MacBook Pro, it can take several times as long, and even with one, the machine is totally unresponsive while performing that build.

This post is about what we did to remove the part of our build that compiles the Rust compiler and our longer-term plans for building up our continuous build and release engineering infrastructure.

TLDR: we’ve replaced building Rust locally in favor of binaries built by Travis CI and shaved off 91% of our build time.

Previously, we have used Mozilla-internal infrastructure (maintainable by some members of paid staff, but usable by all contributors) that performs the following functions:

We’re moving all of this to Travis CI both because we would like to support open infrastructure and it enables more contributors than just those on Mozilla staff. Additionally, Travis CI isn’t hidden behind a firewall without external access, sharing infrastructure with mission-critical projects. So, now we can push changes to Servo’s build process without worrying about breaking something in the server farm and jeopardizing FireFoxOS builds.

Today, we’re rolling out the first part - we’ve migrated building of the Rust compiler to Travis CI and are using their automatic caching on S3. Some key features we’re relying on are:

The new steps for updating a Rust compiler build used in Servo are here.

What’s next?

And what will we do later that we can’t do on today’s internal infrastructure?

Build and continuous integration systems are often not considered exciting, but they nip away at a shocking amount of developer time both here at Mozilla Research and previously when I worked at Microsoft. Leveraging awesome systems like Travis CI helps reduce that investment, since they’re handling all of the “hard bits.”