<p>I've been meaning to add something like that to our nightly builds just using shell/batch scripting. You should be able to set CMAKE_PREFIX_PATH in the initial cache and then just make install or use the vs command line app to run the INSTALL project after calling ctest -S.</p>
<p>Not sure on how to detect build failure via ctest directly. For us if the build fails we're not going to care about the contents of the install directory.</p>
<p><blockquote type="cite">On Feb 17, 2010 4:58 PM, "Tyler Roscoe" <<a href="mailto:tyler@cryptio.net">tyler@cryptio.net</a>> wrote:<br><br>Next question:<br>
<br>
- CDash and miscellaneous post-build steps<br>
<br>
Now that I've got Continuous Integration up and running with CDash, I'd<br>
like to publish my Continuous builds to a central build archive so<br>
developers and testers can use them.<br>
<br>
I can write post-build rules to copy my _results directory to the build<br>
archive (or mess with CMAKE_INSTALL_PREFIX and the INSTALL target), but<br>
then the build will be copied as soon as compiling/linking are finished.<br>
I would prefer to run the tests first and only copy the build if it<br>
passes all the tests.<br>
<br>
I thought of doing the copy from my continuous integration script<br>
itself. I could copy after a successful build by making use of the<br>
NUMBER_ERRORS and NUMBER_WARNINGS parameters to ctest_build(). I was<br>
hoping I could do the same after ctest_test(), but that command doesn't<br>
seem to have anything like NUMBER_ERRORS that would let me evaluate if<br>
the tests completed successfully before performing the copy.<br>
<br>
How do other people handle this?<br>
<br>
I'd like to do more than just publish the builds (run the setup.exe and<br>
make sure it works, compare what is installed by setup.exe against a<br>
known-good install manifest, kick off component tests on another machine<br>
with this newly-generated build, etc.) but figuring out a method for<br>
publishing builds would be a great start.<br>
<br>
Thanks,<br>
tyler<br>
<br>
On Fri, Dec 04, 2009 at 01:07:23PM -0500, Bill Hoffman wrote:<br>
> Tyler Roscoe wrote:<br>
> The build scripts for CMake can be found on CDash itself, for example:<br>
><br>
> <a href="http://www.cdash.org/CDash/viewNotes.php?buildid=485762" target="_blank">http://www.cdash.org/CDash/viewNotes.php?buildid=485762</a><br>
><br>
> For each dashboard on the CMake dashboard if you click on the notes for<br>
> the build you can see the script that was used to drive the build.<br>
><br>
> Here is the .bat file that is run for a scheduled task on that machine:<br>
><br>
><br>
> $ cat dash2win64.bat<br>
> setlocal<br>
> rem Update clapack driver script from clapck<br>
> pushd c:\Dashboards\clapack<br>
> svn up clapack_build.cmake<br>
> rem Run the clapack driver script<br>
> "c:\Program Files (x86)\CMake 2.8\bin\ctest.exe" -C Release -S<br>
> clapack_build.cmake -VV -O clapack.log<br>
> popd<br>
> endlocal<br>
><br>
> call C:\cygwin\bin\bash.exe --login<br>
> c:/Dashboards/DashboardScripts/dash2win64cygwin.sh<br>
><br>
> "c:\Program Files (x86)\CMake 2.8\bin\ctest.exe" -C Release -S<br>
> dash2Win64_cmake_vs10.cmake -O cmake_vs10.log<br>
> "c:\Program Files (x86)\CMake 2.8\bin\ctest.exe" -C Release -S<br>
> dash2Win64_cmake_vs10_x64.cmake -O cmake_vs10_x64.log<br>
><br>
> setlocal<br>
> call "C:\Program Files (x86)\Microsoft Visual Studio<br>
> 10.0\VC\bin\vcvars32.bat"<br>
> "c:\Program Files (x86)\CMake 2.8\bin\ctest.exe" -C Release -S<br>
> dash2Win64_cmake_nmake10.cmake -O cmake_nmake10.log<br>
> endlocal<br>
><br>
> setlocal<br>
> call "C:\Program Files (x86)\Microsoft Visual Studio<br>
> 10.0\VC\bin\amd64\vcvars64.bat"<br>
> "c:\Program Files (x86)\CMake 2.8\bin\ctest.exe" -C Release -S<br>
> dash2Win64_cmake_nmake10_x64.cmake -O cmake_nmake10_x64.log<br>
> endlocal<br>
><br>
> "c:\Program Files (x86)\CMake 2.8\bin\ctest.exe" -C Release -S<br>
> dash2win64_libarchive_vs9.cmake -VV > libarchive_vs9.log 2>&1<br>
> "c:\Program Files (x86)\CMake 2.9\bin\ctest.exe" -C Release -S<br>
> dash2win64_cmake_icl11_32.cmake -VV > cmake_icl11_32.log 2>&1<br>
> "c:\Program Files (x86)\CMake 2.9\bin\ctest.exe" -C Release -S<br>
> dash2win64_cmake_icl11_64.cmake -VV > cmake_icl11_64.log 2>&1<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></p>