Difference between revisions of "Documentation/4.0/Developers/Tutorials/DashboardSetup"

From Slicer Wiki
Jump to: navigation, search
Line 34: Line 34:
 
If git and svn are not in the path, make sure to set the variables CTEST_SVN_COMMAND and CTEST_GIT_COMMAND.
 
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)
+
So that your dashboard can automatically start at 11pm daily, you could add an entry similar to the following one in your <code>[http://en.wikipedia.org/wiki/Cron crontab]</code>. (On ubuntu, I am running <code>crontab -e</code> to edit the current user cron list)
  
 
<pre>
 
<pre>
Line 40: Line 40:
 
</pre>
 
</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]).
+
You can use <code>CTEST_BUILD_FLAGS</code> 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==
 
==Setting up a continuous dashboard==
Line 50: Line 50:
 
</pre>
 
</pre>
  
Edit <MachineName>_<OperatingSystem>-64bits_slicer_release_continuous.cmake and set
+
Edit <code><MachineName>_<OperatingSystem>-64bits_slicer_release_continuous.cmake</code> and set
  
 
<pre>
 
<pre>
Line 56: Line 56:
 
</pre>
 
</pre>
  
Then add the corresponding entry in crontab so that it starts everyday at 6am:
+
Then add the corresponding entry in <code>crontab</code> so that it starts everyday at 6am:
  
 
<pre>
 
<pre>
Line 62: Line 62:
 
</pre>
 
</pre>
  
The output of the build is contained in SlicerFunctionCTestPackage-make-package-output.txt" in your slicer build directory, you can check this file if something went wrong.
+
The output of the build is contained in <code>ctest_package_make_package_output.txt</code> in your slicer build directory, you can check this file if something went wrong.
  
 
= Remarks =
 
= Remarks =

Revision as of 20:30, 5 April 2012

Home < Documentation < 4.0 < Developers < Tutorials < DashboardSetup

Prerequisites

Use CMake version >= 2.8.7

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>_<OperatingSystem>-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   "<OperatingSystem>") # Windows, Linux, Darwin...
set(MY_COMPILER           "g++4.4.3")
set(MY_QT_VERSION         "4.7.4")
set(QT_QMAKE_EXECUTABLE   "$ENV{HOME}/Projects/QtSDK-1.2/Desktop/Qt/474/gcc/bin/qmake")
set(CTEST_SITE            "karakoram.kitware")
set(CTEST_DASHBOARD_ROOT  "$ENV{HOME}/Dashboards/")
...
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.7/bin/ctest -S /Users/JOE/DashboardScripts/<MachineName>_<OperatingSystem>-64bits_slicer_release_nightly.cmake -VV -O /Users/JOE/Dashboards/Logs/<MachineName>-<OperatingSystem>-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>_<OperatingSystem>-64bits_slicer_release_nightly.cmake <MachineName>_opensuse-64bits_slicer_release_continuous.cmake

Edit <MachineName>_<OperatingSystem>-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.7/bin/ctest -S /Users/JOE/DashboardScripts/<MachineName>_<OperatingSystem>-64bits_slicer_release_continuous.cmake -VV -O /Users/JOE/Dashboards/Logs/<MachineName>_<OperatingSystem>-64bits_slicer_release_nightly.log

The output of the build is contained in ctest_package_make_package_output.txt in your slicer build directory, you can check this file if something went wrong.

Remarks