I've open-sourced my .travis.yml file for using travis-ci for continuous integration on ROS packages:
https://github.com/felixduvallet/ros-...
It works with Ubuntu 14.04 and ROS indigo by default, but in principle could be used with other ubuntu/ros distributions.
To enable continuous integration for your ROS package, just:
- Sign up for travis-ci.org and enable CI for your repository.
- Copy this .travis.yml file into your repository and commit it.
- Push to github!
Note: At this time, Travis-CI only works with github.
What Travis does each time you push:
- Installs a barebones ROS distribution (indigo by default) on a fresh ubuntu virtual machine.
- Creates a catkin workspace and puts your repository in it.
- Uses wstool to check out any from-source dependencies (i.e. other repositories).
- Resolves package dependencies using rosdep (i.e. install packages using apt-get).
- Compiles the catkin workspace
- Runs all available unit tests
If any of the steps fail, the build is marked as a failure and you'll hear about it.
Dependencies:
This script handles two types of dependencies:
- ROS package: Packages that can be installed using apt-get (resolved using rosdep).
- source: Other repositories that must be checked out into the workspace (resolved using wstool).
This means that all your dependencies must be explicitly declared (in the package.xml files) so they can be resolved (NOTE: this is a good thing!).
Source depencies are (by default) listed in a file named dependencies.rosinstall
in the root of your repository.
If you don't have dependencies to list, this file can safely be ignored.
Advanced use:
If you want to pass additional options to catkin_make, you can use the catkin.options
file to specify any command-line options.
Private repositories:
These can be handled by travis-ci.com (the 'pro' version of travis-ci.org ), provided you set up the correct permissions to the repository and its dependencies. Beta instructions are provided here.