Build server / continuous integration recommendation for C++ / Qt-based projects

Dave Mateer picture Dave Mateer · Nov 29, 2011 · Viewed 20.1k times · Source

I'm looking to implement a build server for Qt-based C++ projects. The server needs to check out the necessary code / assets from Subversion, build the executable files, assemble the artifacts for installation projects, and build the installation media files. The target platforms and (rough) toolchains are:

  • Windows (32- and 64-bit): qmake, nmake, msbuild, wix toolchain. The end result is an installer EXE and DVD image.
  • Mac OS X: qmake, make, custom bash scripts to assemble package. The end result is an application bundle within a disk image and a DVD image.
  • Ubuntu (32- and 64-bit): qmake, make, debuild-based scripts. The end result is a collection of DEB files and a DVD image.
  • Fedora (32- and 64-bit): qmake, make, rpmbuild-based scripts. The end result is a collection of RPM files and a DVD image.

So that's at least 4 build agents (maybe more if 32- and 64-bit can't be done on the same box) and 7 configurations. Open-source projects are preferred, but that is not an absolute requirement.

Most of the tools I'm seeing seem to be catered to Java (Jenkins, CruiseControl, etc.) or .Net (CruiseControl.net, etc.) Can those be used with a C++ toolchain, or will I constantly be fighting the system? Anything that you have used in the past and found works well with Qt / C++?

Answer

Silas Parker picture Silas Parker · Nov 30, 2011

I use Jenkins for building and packaging many C++ projects, based on qmake, cmake, and makefiles.

There are plugins for cmake, qmake, and msbuild, but any command line scripts can be run as well.

I have done packaging using Jenkins with no problems, as it is just another command line step in a project.

There are good plugins for monitoring the number of warnings/errors produced by the compiler (I normally use GCC).

It also has matrix builds which allow you to build a project several times with different combinations of compiler flags, pre-processor variables, platform, etc. One project I set up is a matrix build with 5 boolean preprocessor flags on two platforms, which then does 2^6=64 builds. These can take a bit of setting up to get correct.