Ctest/CDash workflow : deploying nightly builds
Asked Answered
C

2

8

I use/maintain a few CMake projects, so I started examining CTest/CDash, but there's something that I can't figure out:

Is it only made to display build/test results? (aka beautified logs)

Or : May deployment of night build binaries on a server be included in that workflow?

As much as I think that CTest is the ideal tool for testing CMake projects and showing test results, I would also like to automate the deployment of nightly builds on a web server, and I'm wondering if it's the right tool for that...

Chinoiserie answered 24/2, 2012 at 8:42 Comment(0)
O
3

This is a new feature in CDash 2.0 and recent CTest, you can see an experimental example of this in use for ParaView,

http://trunk.cdash.org/index.php?project=ParaView

The CTest script that led to it is viewable as a note, for example (from that dashboard),

http://trunk.cdash.org/viewNotes.php?buildid=10381

I am planning on writing up how to use this once CDash 2.0 is fully releases if no one else gets around to it first. So, the feature is certainly there now but very new. I think it is a great feature, and plan on using it in my projects to make nightly binaries available.

Oistrakh answered 26/2, 2012 at 18:2 Comment(3)
Good to know... For my personal projects, I finally settled down to using Jenkins+windows batch file, directly calling CMake+Visual Studio, as it finally better fits my needs, but I'll sure keep an eye on CDash.Chinoiserie
There are several ways to do this, I think the CDash binary upload feature is a nice one and I am looking at combining it with MIDAS to provide a single page for users to get the latest binary for their platform too (less information than the CDash pages). For distributed test across several sites with only push access to the CDash server I have not found a better way of doing this, but continue to look at other solutions too.Oistrakh
the links in this answer seem to be outdated, and it includes no specific information as to the required steps directly, could anyone who knows what is meant here update it?Opus
R
1

This is rather a task, that would be performed by CMake, not by CTest or CDash. We use CMake to generate an installer image and copy it somewhere on the filesystem. You can use add_custom_target to specify such a target. Your nightly builds might then simply include this target.

Requisite answered 24/2, 2012 at 11:42 Comment(2)
Ok, but what if I want I want to deploy a nightly build only if all CTest tests are ok? It would also be launching CTest with add_custom_target? The other problem is that I'd like to see a link between a successful build in CDash and the build itself... From the point of view of a SDK user, at least, it would seem more consistent...Chinoiserie
I think ctest returns 0 if success? In that case you could do something like 'ctest -S nightly_script.ctest && <deploy nightly build command>', the command after && is only executed if the first command returns 0 (not sure about equivalent for windows shells)Grange

© 2022 - 2024 — McMap. All rights reserved.