Dashboard Submission

Description

How to submit your build and test results to ITK dashboards from a Linux machine

Get the dashboard scripts

The dashboard branch contains a dashboard client helper script. Use these commands to track it:

$ mkdir -p ~/Dashboards/ITKScripts
$ cd ~/Dashboards/ITKScripts
$ git init
$ git remote add -t dashboard origin git://itk.org/ITK.git
$ git pull origin
The itk_common.cmake script contains setup instructions in its top comments. For more examples, go to the dashboard, click the Advanced View link, then click on the icon that looks like a page next to a Build Name. Update the dashboard branch to get the latest version of this script by simply running::
$ git pull origin

Write your own ctest script

Create your own ctest script to submit your local build to the ITK dashboard, for example:

itk_nightly_gentoo_gcc4.6.3_xyj.cmake:

#Client maintainer: xiaoxiao.liu@kitware.com
set(CTEST_SITE "xyj.kitware")
set(CTEST_BUILD_NAME "Gentoo-g++-4.6.3-Release")
set(CTEST_BUILD_FLAGS -j4)
set(CTEST_DASHBOARD_ROOT "/home/xiaoxiao/Dashboards")
set(CTEST_TEST_TIMEOUT 240)
set(CTEST_BUILD_CONFIGURATION Release)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(dashboard_source_name "src/ITK")
set(dashboard_binary_name "bin/ITK/Release")
set(dashboard_model Nightly)

set(dashboard_cache "
BUILD_SHARED_LIBS:BOOL=OFF
BUILD_TESTING:BOOL=ON
BUILD_EXAMPLES:BOOL=ON
MAXIMUM_NUMBER_OF_HEADERS:STRING=1
CMAKE_CXX_COMPILER:PATH=/usr/bin/c++
CMAKE_C_COMPILER:PATH=/usr/bin/gcc
ITK_BUILD_ALL_MODULES:BOOL=ON
ITKV3_COMPATIBILITY:BOOL=ON
Module_ITKDeprecated:BOOL=ON
ITK_USE_REVIEW:BOOL=ON
ITK_COMPUTER_MEMORY_SIZE:STRING=2
")

include(${CTEST_SCRIPT_DIRECTORY}/itk_common.cmake)

You could run the script to submit the build to the ITK nightly dashboard:

ctest -S itk_nightly_gentoo_gcc4.6.3_xyj.cmake

Set up nightly cron job

You can also add the ctest command ( or multiple commands for multiple builds) into a bash file to run it nightly.

nighlyScripts.sh:

cd /home/xiaoxiao/Dashboards/ITKScripts
ctest -S ./itk_nightly_gentoo_gcc4.6.3_xyj.cmake >  /home/xiaoxiao/Dashboards/Logs/itk_nightly_gentoo_gcc4.6.3_xyj.cmake.log 2>&1

Edit your crontab to set up nightly task on your machine:

sudo crontab -e

Add the following line to run the script everyday at 2 am:

# m h  dom mon dow   command
0 2 * * * /home/xiaoxiao/work/Dashboard/nightlyScript.sh

Video

Table Of Contents

Previous topic

Unit Testing

Next topic

Wanted Sessions

This Page