Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Continuous build system for Qt

I am a Qt/C++ developer. I would like to setup a continuous integration environment whereby after committing the source code, it triggers a build process that build the code for the 3 platforms I'm using:

  • Linux
  • OS X
  • Win32

If possible, how do I setup such environment. Any hints or links are welcome. I've read around about Jenkins, but I can't find any good tutorial for it.

like image 252
linello Avatar asked Mar 28 '12 09:03

linello


Video Answer


3 Answers

I also suggest Jenkins for several reasons:

  • It will run on all of the platforms you listed.
  • It can be configured to start a build when the repository is updated (hint: configure the Job to "Poll SCM" and you won't have to muck with your SCM tool to get it to tell Jenkins to start building).
  • It provides good support (mostly through plugins) for Unit Testing. [You're project is doing unit testing, right?]
  • The price is right

A bigger issue is going to have is that AFAIK, Qt doesn't really do cross-compiling for other platforms well. Using Jenkins (and the appropriate plugins), you should be able to solve this.

One method that comes quickly to mind is to have an instance of Jenkins on each platform. Each instance is responsible for building the version for its own platform. At the end of the build, the created artifacts are all put into a common, shared location.

like image 109
jwernerny Avatar answered Oct 22 '22 02:10

jwernerny


Jenkins supports this feature via plugins for all major source control systems. If you seriously considering using Jenkins (and I would highly recommend it), consider buying John Ferguson Smart's Jenkins: The Definitive Guide.

like image 32
malenkiy_scot Avatar answered Oct 22 '22 04:10

malenkiy_scot


Two solutions coming to my mind:

BuildBot

BuildBot is a highly customizable continuous integration system written in Python. The master component offers a nice web-based GUI to monitor and trigger builds; slave components are put on the target machines (usually virtual machines but they could be the Mac laptop of one of the developers). Docs are good enough to build up a basic system, customization could be a little tricky (at least it was for me). Using commit/push hooks provided by VC systems you can easily activate the master and trigger builds across the slaves. It also supports incremental builds (a must if your project is big).

CDash

Developed by the authors of CMake, CDash is a web application collecting builds coming from across the network, not exactly what you asked for but I think it's worth a try. Very powerful if you have a team of developers who could continuosly submit build result on their machines to the server (and if you use CMake it's almost transparent). You cannot trigger builds from the server as Buildbot does, but you could setup a bunch of VM with a cron which checks for changes and in case performs the build and sends results to CDash

like image 2
Masci Avatar answered Oct 22 '22 04:10

Masci