[CMake] continuous builds best practices?

Bill Lorensen bill.lorensen at gmail.com
Fri Apr 3 02:18:45 EDT 2009


I use ctest scripts. Most itk and vtk dashboards are driven by ctest scripts.

Here is the one I use for a continuous Borland build. You need to
start it once a day. ctest will do the proper continuous checking of
the repository:
http://www.cdash.org/CDash/viewNotes.php?buildid=305082

Here is one for a linux build:

http://www.cdash.org/CDash/viewNotes.php?buildid=304831

Here is one for a Mac:

http://www.cdash.org/CDash/viewNotes.php?buildid=304789

To run a ctest script:

ctest -S scriptname

or for a verbose output:

ctest -V -S scriptname

Bill


On Thu, Apr 2, 2009 at 11:03 PM, Philip Lowman <philip at yhbt.com> wrote:
> On Thu, Apr 2, 2009 at 5:06 PM, Alexander Neundorf <a.neundorf-work at gmx.net>
> wrote:
>>
>> On Wednesday 01 April 2009, Philip Lowman wrote:
>> > Is there a best practices for kicking off Continuous builds using ctest?
>> > What do most people do for this?
>> >
>> > I know about svn hooks but I don't want multiple builds spawned for each
>> > commit, just the latest commit when the machines are idle.  Also, I have
>> > multiple build machines on various operating systems.
>>
>> I think it's usually just "time triggered", e.g. every 15 minutes or so.
>
> Yeah I tried something like that and realized I would have to give up
> cleaning the build directory because it seems to recompile everytime, even
> if the svn revision number hasn't changed (bug?).  I don't use a config.h
> file so not rebuilding from scratch on every commit could potentially break
> the build on MSVC.
>
> I think I have a better idea which would be to turn ctest into a daemon that
> connects to a build server which sends out a per-branch pulse when a commit
> occurs.  Connected clients that are idle and interested in the pulse (by
> having already examined CVSROOT or svn info) could immediately start their
> builds.  Clients that are busy would queue their update & start their builds
> when the existing builds finish.
>
> ctest --daemon http://my.cdash.server.org/check.php \
>    -S foo-continuous-msvc80.cmake \
>    -S foo-continuous-msvc90.cmake
>
> In this way the continuous builds could be started nearly instantaneously
> after a commit.  Long polling could be used on the CDash server to make this
> work through proxy servers.  One could also envision CDash keeping tabs on
> connected sites and being able to inform the site administrator if one goes
> down in the middle of the day.
>
> --
> Philip Lowman
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>


More information about the CMake mailing list