From 1dc555dcf5c7ac62f6a11bf47fef37a53e6c435a Mon Sep 17 00:00:00 2001 From: Sylvester Joosten <sylvester.joosten@gmail.com> Date: Wed, 21 Apr 2021 04:09:43 +0000 Subject: [PATCH] Update for latest container --- .gitlab-ci.yml | 8 +++++++- options/env.sh | 2 +- util/build_detector.sh | 42 +++++++++++++++++++++++++----------------- 3 files changed, 33 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 84a180cb..11793315 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,13 @@ image: eicweb.phy.anl.gov:4567/eic/juggler/juggler:$JUGGLER_TAG default: before_script: - - git clone https://eicweb.phy.anl.gov/EIC/detectors/topside.git && mkdir topside/build && cd topside/build && cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local && make -j20 install && cd ../.. + - git clone https://eicweb.phy.anl.gov/EIC/detectors/topside.git + && mkdir topside/build + && cd topside/build + && cmake ../. -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=/usr/local + && make -j20 install + && cd ../.. + || exit 1 artifacts: expire_in: 72 hours paths: diff --git a/options/env.sh b/options/env.sh index 28216396..4b7b1e76 100755 --- a/options/env.sh +++ b/options/env.sh @@ -34,7 +34,7 @@ if [ ! -n "${JUGGLER_DETECTOR}" ] ; then fi if [ ! -n "${JUGGLER_DETECTOR_VERSION}" ] ; then - export JUGGLER_DETECTOR_VERSION="v0.0.1" + export JUGGLER_DETECTOR_VERSION="master" fi diff --git a/util/build_detector.sh b/util/build_detector.sh index bccf765b..aab1ed00 100755 --- a/util/build_detector.sh +++ b/util/build_detector.sh @@ -27,26 +27,33 @@ source options/env.sh pushd ${DETECTOR_PREFIX} ## We need an up-to-date copy of the detector -if [ ! -d ${JUGGLER_DETECTOR} ]; then - echo "Fetching ${JUGGLER_DETECTOR}" - git clone -b ${JUGGLER_DETECTOR_VERSION} https://eicweb.phy.anl.gov/EIC/detectors/${JUGGLER_DETECTOR}.git -else - echo "Updating ${JUGGLER_DETECTOR}" - pushd ${JUGGLER_DETECTOR} - git pull --ff-only - popd +## start clean to avoid issues... +if [ -d ${JUGGLER_DETECTOR} ]; then + echo "cleaning up ${JUGGLER_DETECTOR}" + rm -rf ${JUGGLER_DETECTOR} fi +echo "Fetching ${JUGGLER_DETECTOR}" +git clone -b ${JUGGLER_DETECTOR_VERSION} https://eicweb.phy.anl.gov/EIC/detectors/${JUGGLER_DETECTOR}.git +#else + #echo "Updating ${JUGGLER_DETECTOR}" + #pushd ${JUGGLER_DETECTOR} + #git pull --ff-only + #popd +#fi ## We also need an up-to-date copy of the accelerator. For now this is done ## manually. Down the road we could maybe automize this with cmake -if [ ! -d accelerator ]; then - echo "Fetching accelerator" - git clone https://eicweb.phy.anl.gov/EIC/detectors/accelerator.git -else - echo "Updating accelerator" - pushd accelerator - git pull --ff-only - popd +if [ -d accelerator ]; then + echo "cleaning up accelerator" + rm -rf accelerator fi +echo "Fetching accelerator" +git clone https://eicweb.phy.anl.gov/EIC/detectors/accelerator.git +#else +# echo "Updating accelerator" +# pushd accelerator +# git pull --ff-only +# popd +#fi ## Now symlink the accelerator definition into the detector definition echo "Linking accelerator definition into detector definition" ln -s -f ${DETECTOR_PREFIX}/accelerator/eic ${DETECTOR_PATH}/eic @@ -57,7 +64,8 @@ echo "Building and installing the ${JUGGLER_DETECTOR} package" mkdir -p ${DETECTOR_PREFIX}/build pushd ${DETECTOR_PREFIX}/build -cmake ${DETECTOR_PATH} -DCMAKE_INSTALL_PREFIX=${LOCAL_PREFIX} && make -j30 install +cmake ${DETECTOR_PATH} -DCMAKE_INSTALL_PREFIX=${LOCAL_PREFIX} -DCMAKE_CXX_STANDARD=17 && + make -j30 install || exit 1 ## ============================================================================= ## Step 3: That's all! -- GitLab