Newer
Older
image: eicweb.phy.anl.gov:4567/eic/juggler/juggler:latest
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_PIPELINE_SOURCE == "web"'
- if: '$CI_PIPELINE_SOURCE == "webide"'
- if: '$CI_COMMIT_BRANCH == "master"'
- if: '$CI_COMMIT_TAG'
default:
before_script:
- .local/detector
- .local/lib
- .local/bin
- .local/include
- .local/share
- results
- config
- images
- doc
- juggler.env
reports:
dotenv: juggler.env
stages:
- config
common:setup:
stage: config
rules:
- if: '$CI_SERVER_HOST == "eicweb.phy.anl.gov"'
before_script:
- git clone https://eicweb.phy.anl.gov/EIC/benchmarks/common_bench.git setup
- |
if [[ "x${CI_PIPELINE_SOURCE}" == "xmerge_request_event" || "$CI_COMMIT_BRANCH" == "master" ]]; then
export JUGGLER_DETECTOR_VERSION="${CI_COMMIT_REF_NAME}"
echo "BEAMLINE_CONFIG = ${BEAMLINE_CONFIG}"
echo "BEAMLINE_CONFIG_VERSION = ${BEAMLINE_CONFIG_VERSION}"
echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}"
echo "JUGGLER_DETECTOR_VERSION = ${CI_COMMIT_REF_NAME}"
echo "JUGGLER_DETECTOR_VERSION=$CI_COMMIT_REF_NAME" >> juggler.env
echo "JUGGLER_DETECTOR=$JUGGLER_DETECTOR" >> juggler.env
fi
- source setup/bin/env.sh && ./setup/bin/install_common.sh
common:detector:
stage: initialize
needs: ["common:setup"]
script:
- source .local/bin/env.sh && build_detector.sh
- mkdir_local_data_link sim_output
- mkdir -p results
- mkdir -p config
- mkdir -p doc
- print_env.sh
- mkdir -p build && cd build && cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local && make -j20 && make install && cd ..
- echo "Build successful."
.views:
stage: docs
needs:
include:
- local: 'views/view1.yml'
- local: 'views/view2.yml'
- local: 'views/view3.yml'
- local: 'views/view6.yml'
- local: 'views/view7.yml'
- local: 'views/view11.yml'
- local: 'views/view12.yml'
- local: 'views/view13.yml'
- local: 'views/view14.yml'
- local: 'views/view15.yml'
dump_geometry:
stage: test
needs:
- common:detector
script:
- echo "dumping geometry"
- mkdir -p geo
## full geo with downstream beamline
- dd_web_display --output geo/detector_geo_full.root ${DETECTOR_PATH}/athena.xml
## only central detector geo
- sed -i '/forward_ion_beamline/d' ${DETECTOR_PATH}/athena.xml
- sed -i '/far_forward/d' ${DETECTOR_PATH}/athena.xml
- dd_web_display --output geo/detector_geo.root ${DETECTOR_PATH}/athena.xml
- view_02
- view_03
- view_06
- view_07
- view_11
- view_12
- view_13
- view_14
- view_15
script:
- pip3 install jinja2 && ls -lrth
- ./bin/make_images > doc/dawn_views.md
- npdet_info dump ${DETECTOR_PATH}/athena.xml | tee doc/constants.out
- checkOverlaps -c ${DETECTOR_PATH}/athena.xml | tee doc/overlap_check.out
- echo "$(cat doc/overlap_check.out | grep ovlp | wc -l) overlaps..."
- if [[ "$(cat doc/overlap_check.out | grep ovlp | wc -l)" -gt "0" ]] ; then echo "Overlaps exist!" && false ; fi
- checkOverlaps -o 's' -c ${DETECTOR_PATH}/athena.xml | tee doc/overlap_check.out | wc -l
benchmarks:detector:
stage: deploy
variables:
JUGGLER_DETECTOR: "$JUGGLER_DETECTOR"
JUGGLER_DETECTOR_VERSION: "$JUGGLER_DETECTOR_VERSION"
trigger:
project: EIC/benchmarks/detector_benchmarks
strategy: depend
needs: ["overlap_check","report"]
#benchmarks:reconstruction:
# stage: deploy
# variables:
# JUGGLER_DETECTOR: "$JUGGLER_DETECTOR"
# JUGGLER_DETECTOR_VERSION: "$JUGGLER_DETECTOR_VERSION"
# trigger:
# project: EIC/benchmarks/reconstruction_benchmarks
# strategy: depend
# needs: ["env","overlap_check","report"]
#
#
#benchmarks:physics:
# stage: deploy
# variables:
# JUGGLER_DETECTOR: "$JUGGLER_DETECTOR"
# JUGGLER_DETECTOR_VERSION: "$JUGGLER_DETECTOR_VERSION"
# trigger:
# project: EIC/benchmarks/physics_benchmarks
# strategy: depend
# needs: ["env","overlap_check","report"]