TubeTK/Dashboard Scripts: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
Line 47: Line 47:
The file has two parts.  The first part contains commonly changed variables.  The second part is for advanced users only.
The file has two parts.  The first part contains commonly changed variables.  The second part is for advanced users only.


=== Linux: Commonly changed variables ===
<code>
set( SITE_NAME "Krull.Kitware" )
set( SITE_PLATFORM "Linux_64" )
set( SITE_BUILD_TYPE "Release" )
set( SITE_CTEST_MODE "Experimental" ) # Experimental, Continuous, or Nightly
set( SITE_CMAKE_GENERATOR "Unix Makefiles" )


set( SITE_NAME "abydos.kitware" )
set( TUBETK_GIT_REPOSITORY "git@tubetk.org:TubeTK.git" )
set( SITE_PLATFORM "Linux_32" )
set( TUBETK_SOURCE_DIR "/home/aylward/src/TubeTK" )
set( SITE_BUILD_TYPE "Release" )
set( TUBETK_BINARY_DIR "/home/aylward/src/TubeTK-${SITE_BUILD_TYPE}" )
set( SITE_CMAKE_GENERATOR "Unix Makefiles" )
 
set( ENV{DISPLAY} ":0" )
set( ENV{DISPLAY} ":0" )
 
set( SITE_MAKE_COMMAND "make -j5" )
set( SITE_MAKE_COMMAND "make -j3" )
set( SITE_CMAKE_COMMAND "/usr/local/bin/cmake" )
set( SITE_CMAKE_COMMAND "/usr/local/bin/cmake" )
set( SITE_QMAKE_COMMAND "/usr/bin/qmake" )
set( SITE_QMAKE_COMMAND "/usr/bin/qmake" )
set( SITE_CTEST_COMMAND "/usr/local/bin/ctest -j5" )
set( SITE_CTEST_COMMAND "/usr/local/bin/ctest" )
 
set( SITE_MEMORYCHECK_COMMAND "/usr/bin/valgrind" )
set( SITE_MEMORYCHECK_COMMAND "/usr/bin/valgrind" )
set( SITE_COVERAGE_COMMAND "/usr/bin/gcov" )
set( SITE_COVERAGE_COMMAND "/usr/bin/gcov" )
set( SITE_KWSTYLE_DIR "/usr/local/bin" )
set( SITE_KWSTYLE_DIR "/usr/local/bin" )
 
set( SITE_GIT_COMMAND "/usr/bin/git" )
set( SITE_GIT_COMMAND "/usr/bin/git" )
set( SITE_SVN_COMMAND "/usr/bin/svn" )
set( SITE_SVN_COMMAND "/usr/bin/svn" )
 
set( SITE_CVS_COMMAND "/usr/bin/cvs" )
set( SITE_EXPERIMENTAL_BUILD ON )
set( SITE_EXPERIMENTAL_TEST ON )
set( SITE_SOURCE_DIR "/home/aylward/src/TubeTK" )
set( SITE_EXPERIMENTAL_COVERAGE OFF )
set( SITE_BINARY_DIR "/home/aylward/src/TubeTK-${SITE_BUILD_TYPE}" )
set( SITE_EXPERIMENTAL_MEMORY OFF )
set( SITE_EXPERIMENTAL_PACKAGE OFF )
set( SITE_EXPERIMENTAL_BUILD_TEST ON )
set( SITE_EXPERIMENTAL_UPLOAD OFF )
set( SITE_EXPERIMENTAL_STYLE ON )
set( SITE_EXPERIMENTAL_STYLE OFF )
set( SITE_EXPERIMENTAL_COVERAGE OFF )
 
set( SITE_EXPERIMENTAL_MEMORY OFF )
set( SITE_CONTINUOUS_BUILD ON )
set( SITE_CONTINUOUS_TEST ON )
set( SITE_CONTINUOUS_BUILD_TEST ON ) # Must be ON for any Continuous to run
set( SITE_CONTINUOUS_COVERAGE OFF )
set( SITE_CONTINUOUS_STYLE ON )
set( SITE_CONTINUOUS_MEMORY OFF )
set( SITE_CONTINUOUS_COVERAGE OFF )
set( SITE_CONTINUOUS_PACKAGE ON )
set( SITE_CONTINUOUS_MEMORY OFF )
set( SITE_CONTINUOUS_UPLOAD ON )
set( SITE_CONTINUOUS_STYLE OFF )
set( SITE_NIGHTLY_BUILD_TEST ON ) # Must be on for any Nightly to run
 
set( SITE_NIGHTLY_STYLE ON )
set( SITE_NIGHTLY_BUILD ON )
set( SITE_NIGHTLY_COVERAGE ON )
set( SITE_NIGHTLY_TEST ON )
set( SITE_NIGHTLY_MEMORY ON )
set( SITE_NIGHTLY_COVERAGE ON )
set( SITE_NIGHTLY_MEMORY ON )
set( SITE_NIGHTLY_PACKAGE ON )
set( SITE_NIGHTLY_UPLOAD ON )
set( SITE_NIGHTLY_STYLE ON )
</code>


=== Windows: Commonly changed variables ===
=== Windows: Commonly changed variables ===

Revision as of 15:14, 21 June 2012

Overview

TubeTK uses a novel configuration-file based method for installing dashboard machines. In general, you will perform an initial download of TubeTK, copy an example configuration file to the level above the TubeTK source, edit that file as appropriate, and then setup cron jobs to call script files that are distributed with TubeTK and that are controlled by your configuration file.

TubeTK's current dashboard is available at: http://open.cdash.org/index.php?project=TubeTK

Tutorial

Assuming that your top-level dashboard directory is call "Dashboards" this tutorial assumes that you want a directory structure with the following hierarchy

 Dashboards/TubeTK
 Dashboards/TubeTK-${BUILD_TYPE}

where ${BUILD_TYPE} is one of Release, Debug, RelWithDebInfo, ...

Background

  • You must have CMake 2.8.8 or greater installed to run a TubeTK dashboard system.
  • You must have Qt 4.7 or greater installed to compile TubeTK
  • This tutorial assumes you have some knowledge of CMake and CTest

Checkout a new TubeTK for your dashboard

> cd Dashboards
> git clone git://tubetk.org/TubeTK.git

Initialize local configuration file

The configuration file "<MachineName>_TubeTK.cmake" belongs at the top of the Dashboards directory. For example,

Dashboards/MyMachine_TubeTK.cmake

Linux

> cp TubeTK/CMake/DashboardScripts/TubeTK_CDashClient_Linux.cmake MyMachine_TubeTK.cmake

Note that a single configuration file can control Nightly, Continuous, and Experimental build options.

Windows

> cp TubeTK/CMake/DashboardScripts/tubetk_config.cmake-windows MyMachine_TubeTK.cmake

Edit local configuration file

The file has two parts. The first part contains commonly changed variables. The second part is for advanced users only.

set( SITE_NAME "Krull.Kitware" ) set( SITE_PLATFORM "Linux_64" ) set( SITE_BUILD_TYPE "Release" ) set( SITE_CTEST_MODE "Experimental" ) # Experimental, Continuous, or Nightly set( SITE_CMAKE_GENERATOR "Unix Makefiles" )

set( TUBETK_GIT_REPOSITORY "git@tubetk.org:TubeTK.git" ) set( TUBETK_SOURCE_DIR "/home/aylward/src/TubeTK" ) set( TUBETK_BINARY_DIR "/home/aylward/src/TubeTK-${SITE_BUILD_TYPE}" )

set( ENV{DISPLAY} ":0" )

set( SITE_MAKE_COMMAND "make -j5" ) set( SITE_CMAKE_COMMAND "/usr/local/bin/cmake" ) set( SITE_QMAKE_COMMAND "/usr/bin/qmake" ) set( SITE_CTEST_COMMAND "/usr/local/bin/ctest -j5" )

set( SITE_MEMORYCHECK_COMMAND "/usr/bin/valgrind" ) set( SITE_COVERAGE_COMMAND "/usr/bin/gcov" ) set( SITE_KWSTYLE_DIR "/usr/local/bin" )

set( SITE_GIT_COMMAND "/usr/bin/git" ) set( SITE_SVN_COMMAND "/usr/bin/svn" )

set( SITE_EXPERIMENTAL_BUILD ON ) set( SITE_EXPERIMENTAL_TEST ON ) set( SITE_EXPERIMENTAL_COVERAGE OFF ) set( SITE_EXPERIMENTAL_MEMORY OFF ) set( SITE_EXPERIMENTAL_PACKAGE OFF ) set( SITE_EXPERIMENTAL_UPLOAD OFF ) set( SITE_EXPERIMENTAL_STYLE OFF )

set( SITE_CONTINUOUS_BUILD ON ) set( SITE_CONTINUOUS_TEST ON ) set( SITE_CONTINUOUS_COVERAGE OFF ) set( SITE_CONTINUOUS_MEMORY OFF ) set( SITE_CONTINUOUS_PACKAGE ON ) set( SITE_CONTINUOUS_UPLOAD ON ) set( SITE_CONTINUOUS_STYLE OFF )

set( SITE_NIGHTLY_BUILD ON ) set( SITE_NIGHTLY_TEST ON ) set( SITE_NIGHTLY_COVERAGE ON ) set( SITE_NIGHTLY_MEMORY ON ) set( SITE_NIGHTLY_PACKAGE ON ) set( SITE_NIGHTLY_UPLOAD ON ) set( SITE_NIGHTLY_STYLE ON )

Windows: Commonly changed variables

set( SITE_NAME "ginger.aylward.org" )
set( SITE_PLATFORM "WindowsXP-VS2010Exp" )
set( SITE_BUILD_TYPE "Release" )
set( SITE_CMAKE_GENERATOR "Visual Studio 10" )

set( SITE_MAKE_COMMAND "${CTEST_BUILD_COMMAND}" )
set( SITE_CMAKE_COMMAND "C:\\Program Files\\CMake 2.8\\bin\\cmake" )
set( SITE_QMAKE_COMMAND "C:\\Qt\\4.6.3\\bin\\qmake" )
set( SITE_CTEST_COMMAND "C:\\Program Files\\CMake 2.8\\bin\\ctest" )

set( SITE_MEMORYCHECK_COMMAND "" )
set( SITE_COVERAGE_COMMAND "" )
set( SITE_STYLE_COMMAND "" )
set( SITE_CTEST_COMMAND "ctest" )

set( SITE_GIT_COMMAND 
  "C:\\Program Files\\Git\\bin\\git" )
set( SITE_SVN_COMMAND 
  "C:\\Program Files\\CollabNet\\Subversion Client\\svn" )

set( SITE_SOURCE_DIR 
  "C:\\Documents and Settings\\aylward\\My Documents\\src\\tubetk" )
set( SITE_BINARY_DIR 
  "C:\\Documents and Settings\\aylward\\My Documents\\src\\tubetk-Release" )

set( SITE_EXPERIMENTAL_BUILD_TEST ON )
set( SITE_EXPERIMENTAL_STYLE OFF )
set( SITE_EXPERIMENTAL_COVERAGE OFF )
set( SITE_EXPERIMENTAL_MEMORY OFF )

set( SITE_CONTINUOUS_BUILD_TEST ON ) # Must be ON for any Continuous to run
set( SITE_CONTINUOUS_STYLE OFF )
set( SITE_CONTINUOUS_COVERAGE OFF )
set( SITE_CONTINUOUS_MEMORY OFF )

set( SITE_NIGHTLY_BUILD_TEST ON ) # Must be ON for any Nightly to run
set( SITE_NIGHTLY_STYLE OFF )
set( SITE_NIGHTLY_COVERAGE OFF )
set( SITE_NIGHTLY_MEMORY OFF )

Setup cron job

Linux

crontab -l

0 23  *  *  *  /home/kitware/Dashboards/cmake-2.8.8/bin/ctest -V -VV -S /home/kitware/Dashboards/MyMachine_TubeTK.cmake -O /home/kitware/Dashboards/MyMachine_TubeTK.log

Windows

Edit the two bat files that include the necessary vcvars.bat files for Visual Studio to work:

edit Dashboards/tubetk_nightly_windows.bat 

Setup "Scheduled Jobs" to execute those batch files.