5 # designed to work on Jenkins
6 # this is a proof of concept script
8 echo "lbneutil version: $LBNEUTILVER"
9 echo "base qualifiers: $QUAL"
10 echo "build type: $BUILDTYPE"
11 echo "workspace: $WORKSPACE"
13 ncores=`cat /proc/cpuinfo 2>/dev/null | grep -c -e '^processor'`
16 source /grid/fermiapp/lbne/software/setup_lbne.sh || exit 1
19 setup gitflow || exit 1
21 # skip around a version of mrb that does not work on macOS
23 if [ `uname` = Darwin ]; then
24 if [[ x`which mrb | grep v1_17_02` != x ]]; then
26 setup mrb v1_16_02 || exit 1
30 export MRB_PROJECT=lbne
34 rm -rf $WORKSPACE/temp || exit 1
35 mkdir -p $WORKSPACE/temp || exit 1
36 mkdir -p $WORKSPACE/copyBack || exit 1
37 rm -f $WORKSPACE/copyBack/* || exit 1
38 cd $WORKSPACE/temp || exit 1
39 mrb newDev -v $LBNEUTILVER -q $QUAL:$BUILDTYPE || exit 1
42 source localProducts*/setup || exit 1
45 cd $MRB_SOURCE || exit 1
46 # make sure we get a read-only copy
47 mrb g -r -t $LBNEUTILVER lbneutil || exit 1
48 cd $MRB_BUILDDIR || exit 1
50 mrb b -j$ncores || exit 1
51 mrb mp -j$ncores || exit 1
52 mv *.bz2 $WORKSPACE/copyBack/ || exit 1
53 ls -l $WORKSPACE/copyBack/
54 cd $WORKSPACE || exit 1
55 rm -rf $WORKSPACE/temp || exit 1