work. life. open source. diatribes.

For those who don’t know what Travis CI is, it’s a hosted continuous integration service for the open source community, still in alpha stages but surprisingly stable from my point of view. It also integrates nicely with your GitHub account so you can easily decide what projects you want to build by logging in using your GitHub credentials. On top of that, the Travis CI code itself is hosted on GitHub for people to contribute to.

Traditionally, open source projects benefited from having continuous integration service if they were hosted part of an open source foundation, however, Travis CI allows any project to take advantage of the service if they support the language:

For example, I recently decided to add Travis CI support to hogan.js, which is one of Twitter’s open source projects, essentially a compiler for the Mustache templating language. You essentially get a nice build status icon that integrates nicely into your GitHub’s projects README:

Adding Travis CI support for the hogan.js Javascript library was fairly trivial, you can take a peak at the commit to figure out how it was done or read the Travis CI documentation. The only tricky part was ensuring that git submodules were properly initialized and phantomJS was launched so QUnit can successfully run. It’s even easier for other languages that Travis CI supports!

In the end, I love what Travis CI is doing for the open source community and how it integrates with GitHub. Continuous integration is something every software project should have and Travis CI makes it really easy to get started. In a future post, I’ll considering comparing Travis CI to some of the other CI options out there (e.g., Hudson/Jenkins), but for now, consider trying out or even sponsoring the service.