[Pdns-dev] Travis-CI builds

Ruben d'Arco cyclops+pdns at prof-x.net
Fri Mar 1 12:52:09 CET 2013


Yesterday i spend some time on Travis-CI. For those who don't know, it's a free CI environment that's hooked up with Github.
This combination allows you to push to github and create a build on Travis. This allows you to verify that your code builds on another environment and would also allow you to run some tests.

To set up travis, go to http://about.travis-ci.org/docs/user/getting-started/, or do this:
1. Go the site (travis-ci.org) and log in with your github account.
2. Go to your profile page (https://travis-ci.org/profile)
3. Click the sync button (this loads your repositories)
4. Enable the travis hook on the repository you want. If this doesn't work, you need to set it up manually (http://about.travis-ci.org/docs/user/how-to-setup-and-trigger-the-hook-manually/)
5. Add the .travis.yml file to your repository. Here's the one i use https://github.com/cyclops1982/powerdns/blob/rfc2136/.travis.yml
6. Push it to github
7. Wait for the magic to happen :-)

The .travis.yml file also contains the all-mighty start-test-stop, this file has been slightly modified to make it return with exit code 0 on success and 1 on failure. The travis system looks at this and determines if the build was succesfull or not.
The modifications to start-test-stop can be found in this commit: https://github.com/cyclops1982/powerdns/commit/8654a705058f6f2bedf2ee1e660550f9128ae460
Some other setup/install can also be done in the .travis.yml file, more info on that here:

I hope this information is helpful for those of you who want to verify that your software builds and tests corectly on another system.

Happy pdns hacking,
	Ruben d'Arco

More information about the Pdns-dev mailing list