Add hadron magnetic fields for nuclei #2651
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: linux-eic-shell | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
github_repository: | |
description: 'Submitting GitHub repository' | |
required: false | |
default: '' | |
type: string | |
github_sha: | |
description: 'Submitting GitHub sha' | |
required: false | |
default: '' | |
type: string | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
xmllint-before-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: | | |
sudo apt-get update | |
sudo apt-get install -y libxml2-utils | |
find compact/ -name "*.xml" -exec xmllint {} \; > /dev/null | |
list-detector-configs: | |
runs-on: ubuntu-latest | |
outputs: | |
configs_csv: ${{ steps.list-detector-configs.outputs.configs_csv }} | |
configs_json: ${{ steps.list-detector-configs.outputs.configs_json }} | |
steps: | |
- uses: actions/checkout@v3 | |
- id: list-detector-configs | |
run: | | |
CONFIGS_CSV=$( | |
ls -1 configurations | sed 's/^/epic_/g' | xargs | sed 's/\.yml//g;s/ /,/g' | |
) | |
CONFIGS_JSON=$(( | |
echo '{ "detector_config": [' | |
ls -1 configurations | sed 's/^/epic_/g' | xargs | sed 's/\.yml//g;s/ /, /g' | xargs -n 1 echo | sed -r 's/^([^,]*)(,?)$/"\1"\2/' | |
echo ' ]}' | |
) | jq -c .) | |
echo "configs_csv=${CONFIGS_CSV}" | tee -a $GITHUB_OUTPUT | |
echo "configs_json=${CONFIGS_JSON}" | tee -a $GITHUB_OUTPUT | |
build: | |
runs-on: ubuntu-latest | |
needs: xmllint-before-build | |
strategy: | |
matrix: | |
include: | |
- CC: gcc | |
CXX: g++ | |
- CC: clang | |
CXX: clang++ | |
env: | |
PREFIX: ${{ github.workspace }}/install | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare ccache timestamp | |
id: ccache_cache_timestamp | |
run: | | |
echo "timestamp=$(date --iso-8601=minutes)" >> $GITHUB_OUTPUT | |
- name: Retrieve ccache cache files | |
uses: actions/cache@v3 | |
with: | |
path: .ccache | |
key: ccache-${{ matrix.CC }}-${{ github.ref_name }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }} | |
restore-keys: | | |
ccache-${{ matrix.CC }}-${{ github.ref_name }}- | |
ccache-${{ matrix.CC }}- | |
ccache- | |
- name: Configure ccache | |
run: | | |
mkdir -p ~/.ccache/ | |
echo "cache_dir=${{ github.workspace }}/.ccache" >> ~/.ccache/ccache.conf | |
echo "max_size=500MB" >> ~/.ccache/ccache.conf | |
echo "compression=true" >> ~/.ccache/ccache.conf | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- name: Setup CVMFS OSG eic-shell environment | |
uses: eic/run-cvmfs-osg-eic-shell@main | |
with: | |
platform-release: "jug_xl:nightly" | |
run: | | |
eic-info | |
- name: Build detector geometry | |
uses: eic/run-cvmfs-osg-eic-shell@main | |
with: | |
platform-release: "jug_xl:nightly" | |
run: | | |
CC=${{ matrix.CC }} CXX=${{ matrix.CXX }} cmake -B build -S . -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
cmake --build build -- -k -j 2 install | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: build-${{ matrix.CC }}-full-eic-shell | |
path: install/ | |
if-no-files-found: error | |
- run: | | |
source install/setup.sh | |
sed -i 's%\(<fiber\|<lens\)%<comment>\1%g; s%\(/fiber>\|/lens>\)%\1</comment>%g' \ | |
${DETECTOR_PATH}/compact/ecal/barrel_interlayers.xml \ | |
${DETECTOR_PATH}/compact/ecal/forward_scfi.xml \ | |
${DETECTOR_PATH}/compact/far_forward/ZDC_Ecal_WSciFi.xml \ | |
${DETECTOR_PATH}/compact/pid/mrich.xml | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: build-${{ matrix.CC }}-fast-eic-shell | |
path: install/ | |
if-no-files-found: error | |
xmllint-after-build: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build-gcc-full-eic-shell | |
path: install/ | |
- run: | | |
sudo apt-get update | |
sudo apt-get install -y libxml2-utils | |
find install/share -name "*.xml" -exec xmllint {} \; > /dev/null | |
trigger-geoviewer: | |
runs-on: ubuntu-latest | |
needs: | |
- xmllint-after-build | |
- list-detector-configs | |
steps: | |
- uses: eic/trigger-gitlab-ci@v2 | |
id: trigger | |
with: | |
url: https://eicweb.phy.anl.gov | |
project_id: 539 | |
token: ${{ secrets.EICWEB_GEOVIEWER_TRIGGER }} | |
ref_name: main | |
variables: | | |
DETECTOR_REPOSITORYURL=${{ github.server_url }}/${{ github.repository }} | |
DETECTOR_REPOSITORYREF=${{ github.ref }} | |
DETECTOR_CONFIG=${{ needs.list-detector-configs.outputs.configs_csv }} | |
DETECTOR_VERSION=${{ github.event.pull_request.head.ref || github.ref_name }} | |
GITHUB_REPOSITORY=${{ github.repository }} | |
GITHUB_SHA=${{ github.event.pull_request.head.sha || github.sha }} | |
GITHUB_PR=${{ github.event.pull_request.number }} | |
check-geometry-configs: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
- list-detector-configs | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build-gcc-fast-eic-shell | |
path: install/ | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- uses: eic/run-cvmfs-osg-eic-shell@main | |
with: | |
platform-release: "jug_xl:nightly" | |
network_types: "none" | |
setup: install/setup.sh | |
run: | | |
IFS=, read -a configs <<< "${{ needs.list-detector-configs.outputs.configs_csv }}" | |
for config in ${configs[@]} ; do | |
echo "::group::${config}" ; | |
checkGeometry -c ${DETECTOR_PATH}/${config}.xml ; | |
echo "::endgroup::" ; | |
done | |
check-tracking-geometry: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build-gcc-fast-eic-shell | |
path: install/ | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- uses: eic/run-cvmfs-osg-eic-shell@main | |
with: | |
platform-release: "jug_xl:nightly" | |
network_types: "none" | |
setup: install/setup.sh | |
run: | | |
root -b -q "scripts/test_ACTS.cxx+(\"${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml\")" | tee check_tracking_geometry.out | |
bin/acts_geo_check check_tracking_geometry.out | |
convert-to-gdml: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
- list-detector-configs | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build-gcc-full-eic-shell | |
path: install/ | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- uses: eic/run-cvmfs-osg-eic-shell@main | |
with: | |
platform-release: "jug_xl:nightly" | |
network_types: "none" | |
setup: install/setup.sh | |
run: | | |
IFS=, read -a configs <<< "${{ needs.list-detector-configs.outputs.configs_csv }}" | |
for config in ${configs[@]} ; do | |
echo "::group::${config}" ; | |
geoConverter -compact2gdml -input ${DETECTOR_PATH}/${config}.xml -output ${config}.gdml ; | |
echo "::endgroup::" ; | |
done | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: gdml | |
path: "*.gdml" | |
if-no-files-found: error | |
convert-to-tgeo: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
- list-detector-configs | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build-gcc-full-eic-shell | |
path: install/ | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- uses: eic/run-cvmfs-osg-eic-shell@main | |
with: | |
platform-release: "jug_xl:nightly" | |
network_types: "none" | |
setup: install/setup.sh | |
run: | | |
IFS=, read -a configs <<< "${{ needs.list-detector-configs.outputs.configs_csv }}" | |
for config in ${configs[@]} ; do | |
echo "::group::${config}" ; | |
geoConverter -compact2tgeo -input ${DETECTOR_PATH}/${config}.xml -output ${config}.root | |
echo "::endgroup::" ; | |
done | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: tgeo | |
path: "*.root" | |
if-no-files-found: error | |
dump-constants: | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
detector_config: [epic_brycecanyon, epic_craterlake] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build-gcc-full-eic-shell | |
path: install/ | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- uses: eic/run-cvmfs-osg-eic-shell@main | |
with: | |
platform-release: "jug_xl:nightly" | |
network_types: "none" | |
setup: install/setup.sh | |
run: | | |
mkdir -p doc | |
npdet_info dump ${DETECTOR_PATH}/${{matrix.detector_config}}.xml | tee doc/${{matrix.detector_config}}_constants.out | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: constants | |
path: doc/${{matrix.detector_config}}_constants.out | |
if-no-files-found: error | |
dump-parameter-table: | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
detector_config: [epic_brycecanyon, epic_craterlake] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build-gcc-full-eic-shell | |
path: install/ | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- uses: eic/run-cvmfs-osg-eic-shell@main | |
with: | |
platform-release: "jug_xl:nightly" | |
network_types: "none" | |
setup: install/setup.sh | |
run: | | |
mkdir -p doc | |
npdet_info dump ${DETECTOR_PATH}/${{matrix.detector_config}}.xml | grep -v '^\s' | grep '=' | cut -d= -f1-2 | tee doc/${{matrix.detector_config}}_constants.toml | |
cp doc/${{matrix.detector_config}}_constants.toml doc/constants.toml | |
python bin/make_detector_parameter_table | tee doc/${{matrix.detector_config}}.csv | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: constants | |
path: doc/${{matrix.detector_config}}_constants.toml | |
if-no-files-found: error | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: DetectorParameterTable | |
path: doc/${{matrix.detector_config}}.csv | |
if-no-files-found: error | |
check-overlap-tgeo: | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
option: ['m'] #, 's'] # FIXME | |
detector_config: [epic_brycecanyon, epic_craterlake] # FIXME | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build-gcc-full-eic-shell | |
path: install/ | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- uses: eic/run-cvmfs-osg-eic-shell@main | |
with: | |
platform-release: "jug_xl:nightly" | |
network_types: "bridge" # this job must succeed even when new artifacts | |
setup: install/setup.sh | |
run: | | |
mkdir -p doc | |
checkOverlaps --option ${{ matrix.option }} -c ${DETECTOR_PATH}/${{ matrix.detector_config }}.xml | tee doc/overlap_check_tgeo.out | |
noverlaps="$(grep -c ovlp doc/overlap_check_tgeo.out || true)" | |
if [[ "${noverlaps}" -gt "0" ]] ; then echo "${noverlaps} overlaps found!" && false ; fi | |
check-geometry-full: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build-gcc-full-eic-shell | |
path: install/ | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- uses: eic/run-cvmfs-osg-eic-shell@main | |
with: | |
platform-release: "jug_xl:nightly" | |
setup: install/setup.sh | |
run: | | |
mkdir -p doc | |
checkGeometry -f true -c ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml | tee geometry_check_full.out | |
mv statistics.root geometry_check_full.root | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: check-geometry-full | |
path: | | |
geometry_check_full.out | |
geometry_check_full.root | |
if-no-files-found: error | |
check-overlap-geant4: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
strategy: | |
matrix: | |
detector_config: [epic_brycecanyon, epic_craterlake] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build-gcc-full-eic-shell | |
path: install/ | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- uses: eic/run-cvmfs-osg-eic-shell@main | |
with: | |
platform-release: "jug_xl:nightly" | |
network_types: "bridge" # this job must succeed even when new artifacts | |
setup: install/setup.sh | |
run: | | |
mkdir -p doc | |
python scripts/checkOverlaps.py -c ${DETECTOR_PATH}/${{ matrix.detector_config }}.xml | tee doc/overlap_check_geant4.out | |
noverlaps="$(grep -c GeomVol1002 doc/overlap_check_geant4.out || true)" | |
if [[ "${noverlaps}" -gt "0" ]] ; then echo "${noverlaps} overlaps found!" && false ; fi | |
check-overlap-geant4-fast: | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
detector_config: [epic_inner_detector, epic_brycecanyon, epic_craterlake] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build-gcc-fast-eic-shell | |
path: install/ | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- uses: eic/run-cvmfs-osg-eic-shell@main | |
with: | |
platform-release: "jug_xl:nightly" | |
network_types: "bridge" # this job must succeed even when new artifacts | |
setup: install/setup.sh | |
run: | | |
mkdir -p doc | |
python scripts/checkOverlaps.py -c ${DETECTOR_PATH}/${{ matrix.detector_config }}.xml | tee doc/overlap_check_geant4.out | |
noverlaps="$(grep -c GeomVol1002 doc/overlap_check_geant4.out || true)" | |
if [[ "${noverlaps}" -gt "0" ]] ; then echo "${noverlaps} overlaps found!" && false ; fi | |
trigger-detector-benchmarks: | |
runs-on: ubuntu-latest | |
needs: [check-overlap-tgeo, check-overlap-geant4-fast] | |
strategy: | |
matrix: | |
detector_config: [epic_brycecanyon, epic_craterlake] | |
steps: | |
- uses: eic/trigger-gitlab-ci@v2 | |
id: trigger | |
with: | |
url: https://eicweb.phy.anl.gov | |
project_id: 399 | |
token: ${{ secrets.EICWEB_DETECTOR_BENCHMARK_TRIGGER }} | |
ref_name: master | |
variables: | | |
DETECTOR_REPOSITORYURL=${{ github.server_url }}/${{ github.repository }} | |
DETECTOR_VERSION=${{ github.event.pull_request.head.ref || github.ref_name }} | |
DETECTOR_CONFIG=${{ matrix.detector_config }} | |
GITHUB_REPOSITORY=${{ inputs.github_repository || github.repository }} | |
GITHUB_SHA=${{ inputs.github_sha || github.event.pull_request.head.sha || github.sha }} | |
- run: | | |
gh api \ | |
--method POST \ | |
-H "Accept: application/vnd.github+json" \ | |
/repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha || github.sha }} \ | |
-f state="pending" \ | |
-f target_url="${{ steps.trigger.outputs.web_url }}" \ | |
-f description="Triggered... $(TZ=America/New_York date)" \ | |
-f context="eicweb/detector_benchmarks (${{ matrix.detector_config }})" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
generate-prim-file: | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
detector_config: [epic_brycecanyon, epic_craterlake] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build-gcc-fast-eic-shell | |
path: install/ | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- uses: eic/run-cvmfs-osg-eic-shell@main | |
with: | |
platform-release: "jug_xl:nightly" | |
network_types: "none" | |
setup: install/setup.sh | |
run: | | |
bin/generate_prim_file -c $DETECTOR_PATH/${{ matrix.detector_config }}.xml -o prim -D -t ${{ matrix.detector_config }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.detector_config }}.prim | |
path: prim/${{ matrix.detector_config }}.prim | |
if-no-files-found: error | |
retention-days: 1 | |
dawn-view: | |
runs-on: ubuntu-latest | |
needs: generate-prim-file | |
strategy: | |
matrix: | |
view: [view1, view2, view3, view6, view7, view11, view13, view50] | |
detector_config: [epic_brycecanyon, epic_craterlake] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: ${{ matrix.detector_config }}.prim | |
path: prim/ | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- uses: eic/run-cvmfs-osg-eic-shell@main | |
with: | |
platform-release: "jug_xl:nightly" | |
network_types: "none" | |
run: | | |
mkdir -p images | |
bin/make_dawn_views -i prim/${{ matrix.detector_config }}.prim -t ${{ matrix.view }} -d scripts/${{ matrix.view }} -D | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.detector_config }}_views | |
path: images/ | |
if-no-files-found: error | |
dawn-view-slices: | |
runs-on: ubuntu-latest | |
needs: generate-prim-file | |
if: github.ref == 'refs/heads/main' | |
strategy: | |
matrix: | |
view: [view12, view14, view15] | |
slice: [100, 300, 500, 700, 900, 1100, 1300, 1500, 1700, 1900] | |
detector_config: [epic_brycecanyon, epic_craterlake] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: ${{ matrix.detector_config }}.prim | |
path: prim/ | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- uses: eic/run-cvmfs-osg-eic-shell@main | |
with: | |
platform-release: "jug_xl:nightly" | |
network_types: "none" | |
run: | | |
mkdir -p images | |
bin/make_dawn_views -i prim/${{ matrix.detector_config }}.prim -t ${{ matrix.view }} -d scripts/${{ matrix.view }} -D -- ${{ matrix.slice }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.detector_config }}_views | |
path: images/ | |
if-no-files-found: error | |
#TODO view20 | |
build-artifacts-page: | |
runs-on: ubuntu-latest | |
needs: | |
- dawn-view | |
- dawn-view-slices | |
- convert-to-gdml | |
- convert-to-tgeo | |
- dump-constants | |
- dump-parameter-table | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
path: artifacts/ | |
- uses: actions/jekyll-build-pages@v1 | |
- uses: actions/upload-pages-artifact@v1 | |
with: | |
retention-days: 7 | |
deploy-artifacts-page: | |
needs: | |
- build-artifacts-page | |
if: github.ref == 'refs/heads/main' | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |