Continuous Build System for Qt

I am a Qt / C ++ developer. I would like to set up a continuous integration environment in which, after executing the source code, it starts the build process, which creates the code for the three platforms that I use:

  • Linux
  • OS X
  • Win32

If possible, how can I set up such an environment. Any hints or links are appreciated. I read about Jenkins, but I can’t find a good tutorial for this.

+8
c ++ qt build continuous-integration
source share
5 answers

I also suggest Jenkins for several reasons:

  • It will work on all platforms that you specified.
  • It can be configured to start the build when the repository is updated (hint: set Job to “Poll SCM” and you won’t have to guess with your SCM tool to make him say that Jenkins will start building).
  • It provides good support (mainly through plugins) for Unit Testing. [You project performs unit testing, right?]
  • The price is correct.

The big problem will be that AFAIK, Qt does not actually do cross-compilation for other platforms. Using Jenkins (and related plugins) you can solve this problem.

One of the ways that quickly comes to mind is to have a Jenkins instance on each platform. Each instance is responsible for creating a version for its own platform. At the end of the assembly, artifacts created are placed in a shared, shared location.

+4
source share

Two solutions that come to my mind:

Buildbot

BuildBot is a highly customizable continuous integration system written in Python. The master component offers a convenient web interface for monitoring and running assemblies; subordinate components are placed on the target computers (usually virtual machines, but they can be one of the developers Mac laptops). The docs are good enough to create a basic system, the setup can be a little complicated (at least for me). Using the latches / push hooks provided by VC systems, you can easily activate the master and trigger assemblies for slaves. It also supports incremental builds (required if your project is large).

Cdash

Developed by CMake's authors, CDash is a build of web applications that come from across the network, not what you asked for, but I think it's worth a try. Very powerful if you have a development team that could continuously send the build result on their machines to the server (and if you use CMake, it's almost transparent). You cannot run builds from the server, as Buildbot does, but you can configure a group of virtual machines using cron, which checks for changes and, in case, builds and sends the results to CDash

+2
source share

Jenkins supports this feature through plugins for all major version control systems. If you are seriously considering using Jenkins (and I would highly recommend it), consider buying John Ferguson Smart Jenkins: The Ultimate Guide .

+2
source share

Of course it is possible. Most version control systems can execute custom server-side scripts. Some of them (e.g. git) have hooks to achieve the same locally. Check out the git post-commit hook .

All you need to do is create a script that will run cross-platform builds.

0
source share

Most version control systems allow you to intercept messages that let you trigger events, such as assemblies. Alternatively, build systems can be configured to regularly poll the source management repository and manage their own build planning (this is how we use Jenkins).

Something to remember is how long it will take to fully build on different platforms and the typical number of checks in this interval. You may find that batch checks are the best way to perform continuous integration builds if you have a limited-sized team or limited build server resources. Otherwise, your build system could quickly finish trying to play the game.

As for the ability to build on all target platforms, it depends on your tool chain.

0
source share

All Articles