Set up a nightly

From OTBWiki
Jump to: navigation, search

Here are the quick instruction to set up a nightly test on linux

Set up the testing account

sudo adduser otbtesting 
su otbtesting

Donwload the source

Create the directory and download the required repository:

mkdir -p OTB/trunk 
cd OTB/trunk
hg clone
hg clone
hg clone

This last one will take a while so you can go and take a coffee (you can also start the next steps)

Set up the configuration

Prepare the .cmake file that will be used to configure the nightly. The starting point is a standard .cmake that should work.

cp OTB-DevUtils/Config/basic-OTB-Nightly.cmake 
sed -i 's/OSVersion/WhateverTheOSis/g' 

You can edit this standard file with the options you usually enter manually during the ccmake step.

Once the .cmake file is working, you can set up the run every night. Depending on your timezone, you might want to adjust the starting time. The nightly version is the dev repository at 2000 french time (which is GMT+1 now). You want to make it start after that, but as early as you can in the night to make sure that it is finished in the morning.

crontab -l > /tmp/cronotbtesting 
echo "02 21 * * * cd $HOME/OTB/trunk/OTB-DevUtils; hg pull -u" >> /tmp/cronotbtesting 
echo "03 21 * * * cd $HOME/OTB/trunk/OTB-Data; hg pull -u" >> /tmp/cronotbtesting 
echo "07 21 * * * ctest -S $HOME/OTB/trunk/OTB-DevUtils/Config/$HOSTNAME-OTB-Nightly.cmake" >> /tmp/cronotbtesting 
crontab /tmp/cronotbtesting 

Keep the configuration in the repository

That's optional, but a good idea once you're sure that the configuration is working. That enable everybody to check the configuration and make the debugging easier

cd $HOME/OTB/trunk/OTB-DevUtils 
hg add Config/$HOSTNAME-OTB-Nightly.cmake 
hg commit -m "TEST: add config for $HOSTNAME" 
hg push