Boost logo

Boost-Commit :

From: troy_at_[hidden]
Date: 2007-06-13 09:00:29


Author: troy
Date: 2007-06-13 09:00:27 EDT (Wed, 13 Jun 2007)
New Revision: 7027
URL: http://svn.boost.org/trac/boost/changeset/7027

Log:

Cleaner, documented unix build scripts.

 

Text files modified:
   sandbox-branches/boost-cmake/dart-client/initialize.sh | 95 ++++++++++++++++++++++++++++++++-------
   sandbox-branches/boost-cmake/dart-client/run.sh | 46 +++++++++++++++++--
   2 files changed, 118 insertions(+), 23 deletions(-)

Modified: sandbox-branches/boost-cmake/dart-client/initialize.sh
==============================================================================
--- sandbox-branches/boost-cmake/dart-client/initialize.sh (original)
+++ sandbox-branches/boost-cmake/dart-client/initialize.sh 2007-06-13 09:00:27 EDT (Wed, 13 Jun 2007)
@@ -1,22 +1,81 @@
 #!/bin/sh -x
 
+#
+# initialize.sh
+#
+
+# This script initializes a dart-client testing hierarchy on local
+# disk to support running the run.sh script found in this directory.
+
+# The directory structure constructed by this script is as follows:
+#
+# debug/
+# nightly/
+# src/
+# build/
+# continuous/
+# src/
+# build/
+# release/
+# nightly/
+# src/
+# build/
+# continuous/
+# src/
+# build/
+
+#
+# Customizations:
+#
+# srcurl: The source to build and test
+#
+srcurl="http://svn.boost.org/svn/boost/sandbox-branches/boost-cmake/boost_1_34_0"
+
+#
+# path to cmake
+#
+cmake_bin="cmake"
+
+#
+# path to svn
+#
+svn_bin="svn"
+
+#
+# CXX: if you'd like to specify a particular compiler, set it here
+#
+export CXX=
+
+#
+# Set topdir to directory where the builds should go. Default is the directory
+# where this script is found.
+#
+scriptdir=`dirname $0`
+cd $scriptdir
 topdir=`pwd`
-COMPILER=$1
-if [[ -z "$COMPILER" ]]
-then
- print "No compiler specified, using g++"
- COMPILER=g++
-fi
-
-cd $topdir/debug/1.34.0/src
-svn update
-cd $topdir/debug/1.34.0/build
-rm CMakeCache.txt
-CXX="$COMPILER" cmake -DBUILD_TESTING:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Debug ../src
-
-cd $topdir/release/1.34.0/src
-svn update
-cd $topdir/release/1.34.0/build
-rm CMakeCache.txt
-CXX="$COMPILER" cmake -DBUILD_TESTING:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Release ../src
+
+for variant in debug release
+do
+ for rate in nightly continuous
+ do
+ builddir=$topdir/$variant/$rate
+ rm -rf $builddir
+ mkdir -p $builddir/build
+ $svn_bin co $srcurl $builddir/src
+ cd $builddir/build
+ rm -f CMakeCache.txt
+ if [ "$variant" = "debug" ] ; then
+ VARIANT_ARGS="-DBUILD_DEBUG:BOOL=ON -DBUILD_RELEASE:BOOL=OFF"
+ else
+ VARIANT_ARGS="-DBUILD_DEBUG:BOOL=OFF -DBUILD_RELEASE:BOOL=ON"
+ fi
+ CXX="$COMPILER" $cmake_bin \
+ -DBUILD_TESTING:BOOL=ON \
+ -DCMAKE_BUILD_TYPE:STRING= \
+ -DCMAKE_VERBOSE_MAKEFILE:STRING=ON \
+ $VARIANT_ARGS $builddir/src
+ done
+done
+
+echo "Done initializing dart-client build directories."
 

Modified: sandbox-branches/boost-cmake/dart-client/run.sh
==============================================================================
--- sandbox-branches/boost-cmake/dart-client/run.sh (original)
+++ sandbox-branches/boost-cmake/dart-client/run.sh 2007-06-13 09:00:27 EDT (Wed, 13 Jun 2007)
@@ -1,14 +1,50 @@
 #!/bin/sh -x
 
+#
+# run.sh: run nightly and continuous builds.
+#
+
+#
+# This script runs as a daemon. Once per day a 'nightly' build will
+# be run and the continuous build directories will be cleaned out.
+# After this 'continuous' builds will be continuously run.
+#
+
+#
+# Set topdir to directory where the builds should go. Default is the directory
+# where this script is found.
+#
+scriptdir=`dirname $0`
+cd $scriptdir
 topdir=`pwd`
 
+#
+# Start script
+#
+
+# date of last nightly build: YYYYMMDD
+lastnightly=00000000
+sleepduration=180
+ctest_bin=ctest
 # alternately build debug and release
 while true
 do
- cd $topdir/debug/1.34.0/build
- ctest -D Continuous
- cd $topdir/release/1.34.0/build
- ctest -D Continuous
- sleep 180 # wait three minutes
+ rightnow=`date +%Y%m%m`
+ if [ $rightnow -gt $lastnightly ] ; then
+ lastnightly=$rightnow
+
+ # do nightly builds
+ cd $topdir/debug/nightly/build
+ $ctest_bin -D Nightly
+ cd $topdir/release/nightly/build
+ $ctest_bin -D Nightly
+ fi
+
+ cd $topdir/debug/continuous/build
+ $ctest_bin -D Continuous
+ cd $topdir/release/continuous/build
+ $ctest_bin -D Continuous
+
+ sleep $sleepduration
 done
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk