Difference between revisions of "Documentation/4.0/Developers/Tutorials/DashboardSetup"
m (moved Slicer4:Dashboard Setup to Slicer4: Dashboard Setup) |
|||
Line 1: | Line 1: | ||
[[Slicer4| Back to Slicer 4]] | [[Slicer4| Back to Slicer 4]] | ||
+ | |||
+ | =Prerequisites= | ||
+ | |||
+ | Use CMake version >= 2.8.5 | ||
+ | |||
+ | =Setup= | ||
+ | |||
+ | Follow the following instructions to set up dashboard: (by JC, from [http://massmail.spl.harvard.edu/public-archives/slicer-devel/2011/006703.html]) | ||
+ | |||
+ | <pre> | ||
+ | $ cd ~ | ||
+ | $ mkdir Dashboards | ||
+ | $ mkdir DashboardScripts | ||
+ | $ cd DashboardScripts | ||
+ | $ wget http://svn.slicer.org/Slicer4/trunk/CMake/SlicerDashboardScript.TEMPLATE.cmake | ||
+ | $ mv SlicerDashboardScript.TEMPLATE.cmake <MachineName>_opensuse-64bits_slicer_release_nightly.cmake | ||
+ | </pre> | ||
+ | |||
+ | Edit the file <MachineName>_opensuse_slicer_release_nightly.cmake to match | ||
+ | your machine settings. You should update the following variables: | ||
+ | |||
+ | <pre> | ||
+ | set(MY_OPERATING_SYSTEM "*OpenSuSe*") # Windows, Linux, Darwin... | ||
+ | set(MY_COMPILER "*g++4.4.3*") | ||
+ | set(MY_QT_VERSION "*4.7*") | ||
+ | set(QT_QMAKE_EXECUTABLE "*$ENV{HOME}/Projects/qtsdk-2010.05/qt/bin/qmake*") | ||
+ | set(CTEST_SITE "*karakoram.kitware*") | ||
+ | set(CTEST_DASHBOARD_ROOT "*$ENV{HOME}/Dashboards/*") | ||
+ | set(CTEST_CMAKE_COMMAND "*/home/jchris/Projects/cmake-2.8.4/bin/cmake*") | ||
+ | ... | ||
+ | set(CTEST_BUILD_CONFIGURATION "*Release*") | ||
+ | ... | ||
+ | set(SCRIPT_MODE "*nightly*") | ||
+ | </pre> | ||
+ | |||
+ | If git and svn are not in the path, make sure to set the variables CTEST_SVN_COMMAND and CTEST_GIT_COMMAND. | ||
+ | |||
+ | So that your dashboard can automatically start at 11pm daily, you could add an entry similar to the following one in your [http://en.wikipedia.org/wiki/Cron crontab]. (On ubuntu, I am running *crontab -e* to edit the current user cron list) | ||
+ | |||
+ | <pre> | ||
+ | 0 11 * * * */path/to/*cmake-2.8.5/bin/ctest* *-S */Users/gouttard* /DashboardScripts/*<MachineName>*_opensuse-64bits_slicer_release_nightly.cmake -VV -O */Users/JOE*/Dashboards/Logs/*<MachineName>*-64bits_slicer_release_nightly.log | ||
+ | </pre> | ||
+ | |||
+ | You can use CTEST_BUILD_FLAGS to set the number of CPUs to be used by ''make'' (eg, -j4), and CTEST_PARALLEL_LEVEL to set the number of tests to run in parallel (see comments in the [http://svn.slicer.org/Slicer4/trunk/CMake/SlicerDashboardScript.TEMPLATE.cmake configuration script]). | ||
+ | |||
+ | ==Setting up a continuous dashboard== | ||
+ | |||
+ | Similarly if you want to setup a continuous dashboard, | ||
+ | |||
+ | <pre> | ||
+ | $ cp *<MachineName>*_opensuse-64bits_slicer_release_nightly.cmake *<MachineName>*_opensuse-64bits_slicer_release_continuous.cmake | ||
+ | </pre> | ||
+ | |||
+ | Edit *<MachineName>*_opensuse-64bits_slicer_release_continuous.cmake and set | ||
+ | |||
+ | <pre> | ||
+ | set(SCRIPT_MODE "*continuous*") | ||
+ | </pre> | ||
+ | |||
+ | Then add the corresponding entry in crontab so that it starts everyday at 6am: | ||
+ | |||
+ | <pre> | ||
+ | 0 6 * * * */path/to/*cmake-2.8.5/bin/ctest* *-S */Users/gouttard*/DashboardScripts/*<MachineName>*_opensuse-64bits_slicer_release_continuous.cmake -VV -O */Users/JOE*/Dashboards/Logs//*<MachineName>_*opensuse-64bits_slicer_release_nightly.log | ||
+ | </pre> |
Revision as of 02:43, 3 October 2011
Home < Documentation < 4.0 < Developers < Tutorials < DashboardSetupPrerequisites
Use CMake version >= 2.8.5
Setup
Follow the following instructions to set up dashboard: (by JC, from [1])
$ cd ~ $ mkdir Dashboards $ mkdir DashboardScripts $ cd DashboardScripts $ wget http://svn.slicer.org/Slicer4/trunk/CMake/SlicerDashboardScript.TEMPLATE.cmake $ mv SlicerDashboardScript.TEMPLATE.cmake <MachineName>_opensuse-64bits_slicer_release_nightly.cmake
Edit the file <MachineName>_opensuse_slicer_release_nightly.cmake to match your machine settings. You should update the following variables:
set(MY_OPERATING_SYSTEM "*OpenSuSe*") # Windows, Linux, Darwin... set(MY_COMPILER "*g++4.4.3*") set(MY_QT_VERSION "*4.7*") set(QT_QMAKE_EXECUTABLE "*$ENV{HOME}/Projects/qtsdk-2010.05/qt/bin/qmake*") set(CTEST_SITE "*karakoram.kitware*") set(CTEST_DASHBOARD_ROOT "*$ENV{HOME}/Dashboards/*") set(CTEST_CMAKE_COMMAND "*/home/jchris/Projects/cmake-2.8.4/bin/cmake*") ... set(CTEST_BUILD_CONFIGURATION "*Release*") ... set(SCRIPT_MODE "*nightly*")
If git and svn are not in the path, make sure to set the variables CTEST_SVN_COMMAND and CTEST_GIT_COMMAND.
So that your dashboard can automatically start at 11pm daily, you could add an entry similar to the following one in your crontab. (On ubuntu, I am running *crontab -e* to edit the current user cron list)
0 11 * * * */path/to/*cmake-2.8.5/bin/ctest* *-S */Users/gouttard* /DashboardScripts/*<MachineName>*_opensuse-64bits_slicer_release_nightly.cmake -VV -O */Users/JOE*/Dashboards/Logs/*<MachineName>*-64bits_slicer_release_nightly.log
You can use CTEST_BUILD_FLAGS to set the number of CPUs to be used by make (eg, -j4), and CTEST_PARALLEL_LEVEL to set the number of tests to run in parallel (see comments in the configuration script).
Setting up a continuous dashboard
Similarly if you want to setup a continuous dashboard,
$ cp *<MachineName>*_opensuse-64bits_slicer_release_nightly.cmake *<MachineName>*_opensuse-64bits_slicer_release_continuous.cmake
Edit *<MachineName>*_opensuse-64bits_slicer_release_continuous.cmake and set
set(SCRIPT_MODE "*continuous*")
Then add the corresponding entry in crontab so that it starts everyday at 6am:
0 6 * * * */path/to/*cmake-2.8.5/bin/ctest* *-S */Users/gouttard*/DashboardScripts/*<MachineName>*_opensuse-64bits_slicer_release_continuous.cmake -VV -O */Users/JOE*/Dashboards/Logs//*<MachineName>_*opensuse-64bits_slicer_release_nightly.log