Older posts...
Older posts...
28 Sep
How I'm going to land my dream job
28 Sep 2014
How I'm going to land my dream job
1 Oct
Neural net training fail
1 Oct 2014
Neural net training fail
13 Oct
Pow + SSL without the hassle
13 Oct 2014
Pow + SSL without the hassle
17 Oct
Using machine learning to rank search results (part 1)
17 Oct 2014
Using machine learning to rank search results (part 1)
23 Oct
Using machine learning to rank search results (part 2)
23 Oct 2014
Using machine learning to rank search results (part 2)
9 Nov
Managing complexity in Go
9 Nov 2014
Managing complexity in Go
25 Nov
Remote work: an engineering leader's perspective
25 Nov 2014
Remote work: an engineering leader's perspective
19 Sep
Running A/B tests on our hosting infrastructure
19 Sep 2016
Running A/B tests on our hosting infrastructure
19 Jan
Optimising Redis storage, part two
19 Jan 2017
Optimising Redis storage, part two
27 Mar
Every service is an island
27 Mar 2017
Every service is an island

Rebund for 4x faster Travis builds

Running bundle install to get all gems ready is often the longest part of a build. Any Rails application will depend on tens of gems; and any gem, besides dependencies, may have a fairly large build matrix.

Rebund can easily cut your build times by 75%, saving you time and saving the good folks at Travis CI some money.

Example for an application, appfab.io (5.3x speedup):

Travis screenshot

Example for a gem, fuzzily (2.7x speedup):

Travis screenshot

Rebund is an alernative to bundle_cache, which didn’t work well enough for us on Travis because it relies on gems to be installed (which partly defeats the purpose).

How it works

Before your build, Rebund checks with a file server if there’s a bundle already available for your current Ruby VM and version of the Gemfile.lock. Technically, it hashes the output of ruby --version and the lockfile.

If there is one, it downloads and unpacks it, then making bundle install blazing fast.

After the build, Rebund packages the bundle (if changed) and uploads it for future uses.

Compared to Travis’ own caching?

Travis provides a similar caching mechanism; unfortunately it’s not available for public repositories.

While implementation details are not public, it seems roughly as efficient as using Rebund. It’s a bit less conservative than Rebund on changes to the Gemfile, too, meaning it’s reuse a branch’s previous bundle if any.

We’ve consciously avoided doing this to avoid difficult-to-debug errors related to upgrading gems.

Using Rebund

Head on to the rebund repository for installation details!

This was reposted from HouseTrip’s developer blog.