#!/bin/tcsh # # This script is run as a nightly cron job from the davidl account. # The crontab file is kept in the scripts directory under # Subversion control as is this one. See the file crontab.ifarml3 for # more details. # # The system here is set up to do a single checkout with multiple # builds (on different platforms). The behavior as to whether the # code is actually checked out is implemented in the make_release # script called by this one. That script uses the HALLD_MAKE_RELEASE_REUSE # environment variable to decide whether to check out the code. # # Cron jobs that reuse the code that has already been checked out # do so by invoking the cron_nightly_reuse script. That one simply # sets the HALLD_MAKE_RELEASE_REUSE environment variable and then # calls this script. # # Set up some important environment variables. This is important # for two reasons: # # 1. This makes the build less dependant on my private .cshrc file # # 2. cron jobs don't source .login so the environment used is not # even exactly what is used by my account anyway. # # Setup the environment for external packages source /group/halld/Software/OS/set_env.csh # Make sure the HALLD_MY variable is not set unsetenv HALLD_MY # Dated labels set today=`date -d "now" +"build_%F"` set yesterday=`date -d "now-1day" +"build_%F"` set twodaysago=`date -d "now-2day" +"build_%F"` # Checkout and build the Hall-D source code cd /work/halld/BUILDS mkdir -p $today rm -f $today/${BMS_OSNAME}.out /group/halld/Software/scripts/make_release latest >& $today/${BMS_OSNAME}.out # make DEBUG versions setenv DEBUG yes setenv HALLD_MAKE_RELEASE_REUSE YES echo "--------------------- DEBUG VERSION ------------------" >> $today/${BMS_OSNAME}.out /group/halld/Software/scripts/make_release latest >>& $today/${BMS_OSNAME}.out # We want to keep three days worth of builds around so delete the # build from 3 days ago set old_build=`date -d "now-3day" +"build_%F"` set dayofweek=`date -d "now-3day" +"%a"` if ( $dayofweek != "Mon") then echo Deleting $old_build rm -rf $old_build else echo "Not deleting Monday's build." endif # Update symbolic links rm -f LATEST YESTERDAY TWODAYSAGO ln -s $today LATEST ln -s $yesterday YESTERDAY ln -s $twodaysago TWODAYSAGO # # Print output for nightly e-mail # echo "---------------- Errors ----------------" cat ${today}/${BMS_OSNAME}.out | \ grep -i error | \ grep -v "sys_errlist' is deprecated" |\ grep -v "^Generating " | \ grep -v "^Preprocessing " | \ grep -v "^Parsing file " | \ grep -v "^U " | \ grep -v "^A src/libraries/include/jerror.h" | \ grep -v "^f90comp: 0 ERRORS," | \ grep -v "gxcs.F:79: warning:" | \ grep -v "gxcs.F:86: warning:" | \ grep -v "uginit.F:194: warning:" echo " " echo " " echo "---------------- Warnings ----------------" cat ${today}/${BMS_OSNAME}.out | \ grep -i warning | \ grep -v mkstemp | \ grep -v "has modification time in the future" | \ grep -v "Clock skew detected" | \ grep -v "sys_errlist' is deprecated" | \ grep -v "^f90: Warning: Option -Wno-globals passed to ld" | \ grep -v "^cc: Warning: option -2 passed to ld" | \ grep -v "^f90comp: 0 ERRORS," | \ grep -v "gxcs.F:79: warning:" | \ grep -v "gxcs.F:86: warning:" | \ grep -v "uginit.F:194: warning:" echo " " echo " " echo "---------------- Executables ----------------" ls $today/bin/* echo " " echo " " echo "---------------- Libraries ----------------" ls $today/lib/* echo " " echo " "