ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

How can I integrate my ROS package with Travis continuous integration?

asked 2015-11-02 08:57:43 -0500

Felix Duvallet gravatar image

I want to run continuous integration (through travis-ci) for my ROS package, where can I find a .travis.yml file to get started?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
9

answered 2015-11-02 09:02:29 -0500

Felix Duvallet gravatar image

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:

  1. Sign up for travis-ci.org and enable CI for your repository.
  2. Copy this .travis.yml file into your repository and commit it.
  3. Push to github!

Note: At this time, Travis-CI only works with github.

What Travis does each time you push:

  1. Installs a barebones ROS distribution (indigo by default) on a fresh ubuntu virtual machine.
  2. Creates a catkin workspace and puts your repository in it.
  3. Uses wstool to check out any from-source dependencies (i.e. other repositories).
  4. Resolves package dependencies using rosdep (i.e. install packages using apt-get).
  5. Compiles the catkin workspace
  6. 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.

edit flag offensive delete link more
1

answered 2015-11-05 05:21:59 -0500

Andriy Petlovanyy gravatar image

Hi,

Recently Travis CI support was added to open source Shadow Robots's build tools. It is using Docker container with pre-installed ROS Indigo. So it is saving time for ROS installation. You can also select what actions do you want to do with your packages e.g. roslint checks, unit tests, code coverage. More information can be found here

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2015-11-02 08:57:43 -0500

Seen: 2,317 times

Last updated: Nov 02 '15