[CMake] continuous integration with CMake
Bill Hoffman
bill.hoffman at kitware.com
Thu Dec 3 09:32:48 EST 2009
Tyler Roscoe wrote:
> I am using CMake to build several medium-sized C++ projects on several
> Linux and Windows platforms (with an eye to supporting Mac and several
> Unices eventually). The next step is to get a Continuous Integration
> envrionment up and running.
>
>>From my readings around the web and in _Mastering CMake_, it seems that
> the CMake solution for CI is CTest + make Continuous + CDash, all run
> via cron or Scheduled Tasks with some sort of customized CTest script.
> That type of setup works, but maintaining it looks like a pain: I have
> to manage crons/Scheduled Tasks on dozens of machines. I have to keep
> track of which machine builds which products with some kind of manual
> logic. I have to figure out for myself how to schedule a one-off build
> as an experiment or for an emergency bugfix.
>
> How do other people handle this situation? Am I overcomplicating things?
> Are my needs more complex than what most people do?
>
> Am I missing out on some management tools for CI with CMake?
>
> Do people with more complex build needs use other tools on top of their
> CMake builds? For example, many build engineers seem to enjoy Hudson,
> especially for Java projects, but it seems like a less natural fit for a
> C++ project. I did find these links; anyone using this plugin?
>
> http://schneide.wordpress.com/2009/04/07/cmake-builder-plugin-for-hudson/
> http://schneide.wordpress.com/2009/11/09/cmake-builder-plugin-reloaded/
>
> Advice, whimsical anecdotes, or links would be appreciated.
>
We are working on being able to drive builds from CDash itself.
However, it is not really that hard to manage the multiple test machine
cronjobs. What we do at Kitware is create a version controlled script
directory. Each machine gets a single driver script that can run ctest
for the machine. You setup two cronjobs or scheduled tasks on the
machine. The first one updates the script directory. The next one runs
the script or bat file for the machine. Then if you want to manage the
individual machines you can just update the one script. Also, since
our projects are open source it allows CMake to easily take builds from
anyone, and they don't have to give up control of the machine or install
any special services. Our planned approach for CDash driven builds
will be to install one cron task or scheduled task that runs a ctest
that connects to a CDash server and offers the machine for builds. With
any approach you will have to install something on all clients anyway.
-Bill
More information about the CMake
mailing list