This comes at a convenient time because I was looking into setting up CI for a suite of privately-developed packages.

I find that declaring dependencies in ROS is complex, and often a package builds even when it is sloppy with these declarations. Using catkin_make_isolated and catkin_tools helps with dependency hygiene between ROS packages, but I don’t know of a way to keep packages honest about their system dependencies (like Boost).

Here is the CI system I had sketched:

  1. Discover all of the package.xml files and build a dependency tree of the packages.

  2. Do a topological sort based on build_depends directives to find the correct build order.

  3. For each package (following the build order), create a fresh Docker container.

  4. Install any .deb files for any packages that were built earlier that are build dependencies of this package, and generate a rosdep.yaml file mapping the ROS package names to their Debian package names. Then run rosdep to install the remaining system packages to the container.

  5. Use bloom-generate to generate Debian package files, then use these to compile and produce the .deb package. (Instructions.) Copy it out of the container into an artifacts directory.

If you want to run tests, you would additionally have to compile each package with testing enabled, then install test_depends and then run the test suite.

Do any of the existing CI solutions do all these steps?