Skip to content

Updated sensor and light yield constants for EEEMCal digitization #12217

Updated sensor and light yield constants for EEEMCal digitization

Updated sensor and light yield constants for EEEMCal digitization #12217

Workflow file for this run

name: Build against eic-shell
on:
schedule: # run regularly on main branch
- cron: '13 0/8 * * *'
push:
branches:
- main
- 'v[0-9]+.[0-9]+' # maintenance branches
tags:
- '*'
pull_request:
merge_group:
workflow_dispatch:
inputs:
platform:
description: 'eic-shell platform'
default: 'eic_xl'
required: false
type: string
release:
description: 'eic-shell release'
default: 'nightly'
required: false
type: string
detector-version:
description: 'epic geometry version'
default: 'main'
required: false
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
env:
# inputs doesn't always exist, so we make sure env does
platform: ${{ inputs.platform || 'eic_xl' }}
release: ${{ inputs.release || 'nightly' }}
detector-version: ${{ inputs.detector-version || 'main' }}
clang-tidy-iwyu-CXX: clang++
clang-tidy-iwyu-CMAKE_BUILD_TYPE: Debug
# FIXME: FOFFMTRK has only 130 GeV matrix
JANA_OPTIONS: -PFOFFMTRK:ForwardOffMRecParticles:requireMatchingMatrix=false -Pjana:ticker_interval=60000 -Pjana:warmup_timeout=0 -Pjana:timeout=0
JANA_OPTIONS_GUN: -PFOFFMTRK:ForwardOffMRecParticles:requireBeamProton=false -PRPOTS:ForwardRomanPotRecParticles:requireBeamProton=false -PLOWQ2:TaggerTrackerTransportationPreML:requireBeamElectron=false -PLOWQ2:TaggerTrackerTransportationPostML:requireBeamElectron=false
ASAN_OPTIONS: suppressions=${{ github.workspace }}/.github/asan.supp:malloc_context_size=20:detect_leaks=1:verify_asan_link_order=0:detect_stack_use_after_return=1:detect_odr_violation=1:new_delete_type_mismatch=0:intercept_tls_get_addr=0
LSAN_OPTIONS: suppressions=${{ github.workspace }}/.github/lsan.supp
UBSAN_OPTIONS: suppressions=${{ github.workspace }}/.github/ubsan.supp:print_stacktrace=1:silence_unsigned_overflow=1:report_error_type=1
TSAN_OPTIONS: suppressions=${{ github.workspace }}/.github/tsan.supp
jobs:
env:
# env cannot be used in matrix, but outputs can
# so this job turns env into outputs
runs-on: ubuntu-24.04
outputs:
platform_json: ${{ steps.define.outputs.platform_json }}
release_json: ${{ steps.define.outputs.release_json }}
steps:
- id: define
run: |
echo "platform_json=[\"${{ env.platform }}\"]" >> $GITHUB_OUTPUT
echo "release_json=[\"${{ env.release }}\"]" >> $GITHUB_OUTPUT
build:
runs-on: ubuntu-24.04
needs: env
strategy:
# include multiple compilers for one release version,
# and one compiler for a range of release versions
matrix:
CXX: [g++, clang++]
CMAKE_BUILD_TYPE: [Release, Debug]
USE_ASAN: [ON]
USE_TSAN: [OFF]
USE_UBSAN: [ON]
release: ${{ fromJSON(needs.env.outputs.release_json) }}
# note that entries that overwrite matrix values require a full specification
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/running-variations-of-jobs-in-a-workflow#expanding-or-adding-matrix-configurations
exclude:
# exclude g++ Debug with default CXXFLAGS since unused
- CXX: g++
CMAKE_BUILD_TYPE: Debug
release: nightly
# exclude clang++ Debug with default CXXFLAGS since overridden
- CXX: clang++
CMAKE_BUILD_TYPE: Debug
release: nightly
include:
- CXX: g++
# -Wno-error=maybe-uninitialized for GCC only as it has issues with /usr/include/c++/12/bits/std_function.h
CXXFLAGS: -Werror -Wall -Wextra -Wundef -Wno-error=maybe-uninitialized
- CXX: clang++
CXXFLAGS: -Werror -Wall -Wextra -Wundef
# include clang++ Debug with profile CXXFLAGS
- CXX: clang++
CMAKE_BUILD_TYPE: Debug
CXXFLAGS: -fprofile-instr-generate -fcoverage-mapping
release: nightly
# include some configs explicitly (if not yet included)
- CXX: clang++
CMAKE_BUILD_TYPE: Release
release: nightly
- CXX: clang++
# thread sanitizer build
- CXX: clang++
CMAKE_BUILD_TYPE: Release
release: nightly
USE_ASAN: OFF
USE_TSAN: ON
- CXX: clang++
CMAKE_BUILD_TYPE: Release
release: 25.01.1-stable
- CXX: clang++
CMAKE_BUILD_TYPE: Release
release: 25.05.0-stable
steps:
- uses: actions/checkout@v5
with:
filter: "tree:0"
- 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@v4
with:
path: .ccache
key: ccache-${{ matrix.CXX }}-${{ matrix.release }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{matrix.USE_ASAN}}-${{matrix.USE_TSAN}}-${{ github.head_ref || github.ref_name }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
ccache-${{ matrix.CXX }}-${{ matrix.release }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{matrix.USE_ASAN}}-${{matrix.USE_TSAN}}-${{ github.ref_name }}-
ccache-${{ matrix.CXX }}-${{ matrix.release }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{matrix.USE_ASAN}}-${{matrix.USE_TSAN}}-${{ github.head_ref }}-
ccache-${{ matrix.CXX }}-${{ matrix.release }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{matrix.USE_ASAN}}-${{matrix.USE_TSAN}}-${{ github.base_ref }}-
ccache-${{ matrix.CXX }}-${{ matrix.release }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{matrix.USE_ASAN}}-${{matrix.USE_TSAN}}-${{ github.event.merge_group.base_ref }}-
ccache-${{ matrix.CXX }}-${{ matrix.release }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{matrix.USE_ASAN}}-${{matrix.USE_TSAN}}-
ccache-${{ matrix.CXX }}-${{ matrix.release }}-${{ matrix.CMAKE_BUILD_TYPE }}-
ccache-${{ matrix.CXX }}-${{ matrix.release }}-
ccache-${{ matrix.CXX }}-
ccache-
- name: Configure ccache
run: |
mkdir -p ~/.ccache/
echo "cache_dir=${{ github.workspace }}/.ccache" > ~/.ccache/ccache.conf
echo "max_size=1500MB" >> ~/.ccache/ccache.conf
echo "compression=true" >> ~/.ccache/ccache.conf
- uses: cvmfs-contrib/github-action-cvmfs@v5
- name: Build and install
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ matrix.release }}"
run: |
# install this repo
CXX="${{ matrix.CXX }}" CXXFLAGS="${{ matrix.CXXFLAGS }}" cmake --warn-uninitialized -B build -S . -DCMAKE_INSTALL_PREFIX=install -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} -DUSE_ASAN=${{matrix.USE_ASAN}} -DUSE_TSAN=${{matrix.USE_TSAN}} -DUSE_UBSAN=${{matrix.USE_UBSAN}}
cmake --build build -j $(getconf _NPROCESSORS_ONLN) --target install
ccache --show-stats --verbose
ccache --evict-older-than 7d
- name: Check dynamic library loader paths
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ matrix.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
export LD_LIBRARY_PATH=$PWD/install/lib:$LD_LIBRARY_PATH
for lib in install/lib/*.so install/lib/EICrecon/plugins/*.so ; do
readelf -d $lib
# Hide intentionally undefined symbols for asan and ubsan
ldd -r $lib | grep -v __asan | grep -v __ubsan
done
- name: Run testsuite
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ matrix.release }}"
run: |
export LD_LIBRARY_PATH=$PWD/install/lib:$LD_LIBRARY_PATH
export JANA_PLUGIN_PATH=$PWD/install/lib/EICrecon/plugins${JANA_PLUGIN_PATH:+:${JANA_PLUGIN_PATH}}
ctest --test-dir build -V
- name: Compress install directory
run: tar -caf install.tar.zst install/
- name: Upload install directory (ASAN)
if: ${{ matrix.USE_ASAN == 'ON' && matrix.USE_TSAN == 'OFF' }}
uses: actions/upload-artifact@v4
with:
name: install-${{ matrix.CXX }}-eic-shell-${{ matrix.CMAKE_BUILD_TYPE }}-${{ env.platform }}-${{ matrix.release }}-ASAN
path: install.tar.zst
if-no-files-found: error
- name: Upload install directory (TSAN)
if: ${{ matrix.USE_ASAN == 'OFF' && matrix.USE_TSAN == 'ON' }}
uses: actions/upload-artifact@v4
with:
name: install-${{ matrix.CXX }}-eic-shell-${{ matrix.CMAKE_BUILD_TYPE }}-${{ env.platform }}-${{ matrix.release }}-TSAN
path: install.tar.zst
if-no-files-found: error
# Only compress and upload build directory if we are going to use it later
- name: Compress build directory
if: matrix.CXX == env.clang-tidy-iwyu-CXX && matrix.CMAKE_BUILD_TYPE == env.clang-tidy-iwyu-CMAKE_BUILD_TYPE
run: tar -caf build.tar.zst build/
- name: Upload build directory
if: matrix.CXX == env.clang-tidy-iwyu-CXX && matrix.CMAKE_BUILD_TYPE == env.clang-tidy-iwyu-CMAKE_BUILD_TYPE
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.CXX }}-eic-shell-${{ matrix.CMAKE_BUILD_TYPE }}-${{ env.platform }}-${{ matrix.release }}
path: build.tar.zst
if-no-files-found: error
clang-tidy-iwyu:
runs-on: ubuntu-24.04
needs: build
steps:
- uses: actions/checkout@v5
with:
filter: "tree:0"
- uses: cvmfs-contrib/github-action-cvmfs@v5
- name: Download build artifact
uses: actions/download-artifact@v5
with:
name: build-${{ env.clang-tidy-iwyu-CXX }}-eic-shell-${{ env.clang-tidy-iwyu-CMAKE_BUILD_TYPE }}-${{ env.platform }}-${{ env.release }}
path: .
- name: Uncompress build artifact
run: tar -xaf build.tar.zst
- name: Check for pragma once in changed files
if: ${{ github.event_name == 'pull_request' }}
run: |
missing_pragma_headers=$(git diff --diff-filter=AM --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep "\.h$" | xargs -n 1 -r grep -L 'pragma once')
test -z "${missing_pragma_headers}"
- name: Check for pragma once in all files
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
run: |
missing_pragma_headers=$(find src -name "*.h" | xargs -n 1 grep -L 'pragma once')
test -z "${missing_pragma_headers}"
- name: Run clang-tidy on changed files
uses: eic/run-cvmfs-osg-eic-shell@main
if: ${{ github.event_name == 'pull_request' }}
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
run: |
git diff ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.base.sha }} | clang-tidy-diff -p 1 -path build -quiet -export-fixes clang_tidy_fixes.yaml -extra-arg='-std=c++20' -clang-tidy-binary run-clang-tidy
- name: Run clang-tidy on all files
uses: eic/run-cvmfs-osg-eic-shell@main
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
run: |
run-clang-tidy -p build -export-fixes clang_tidy_fixes.yaml -extra-arg='-std=c++20'
- name: Upload clang-tidy fixes as artifact
uses: actions/upload-artifact@v4
with:
name: clang-tidy-fixes.yaml
path: clang_tidy_fixes.yaml
if-no-files-found: ignore
- name: Suggest clang-tidy fixes as PR comments
uses: platisd/[email protected]
if: ${{ github.event_name == 'pull_request' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
clang_tidy_fixes: clang_tidy_fixes.yaml
request_changes: true
suggestions_per_comment: 10
- name: Run include-what-you-use (iwyu) on changed files
uses: eic/run-cvmfs-osg-eic-shell@main
if: ${{ github.event_name == 'pull_request' }}
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
run: |
# reduce headers until diff is stable
while [[ ${sha:-} != $(git diff | sha256sum) ]] ; do
sha=$(git diff | sha256sum)
echo $sha
iwyu_tool.py -p build $(git diff --name-only ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.base.sha }}) -- -Xiwyu --verbose=3 -Xiwyu --no_fwd_decls -Xiwyu --cxx17ns -Xiwyu --mapping_file=${{github.workspace}}/.github/iwyu.imp -Xiwyu --regex=ecmascript | tee iwyu_fixes.log
fix_includes.py --blank_lines --nosafe_headers --reorder --separate_project_includes="<tld>" --keep_iwyu_namespace_format < iwyu_fixes.log
git diff | tee iwyu_fixes.patch
done
- name: Run include-what-you-use (iwyu) on all files
uses: eic/run-cvmfs-osg-eic-shell@main
if: ${{ github.event_name == 'push' }}
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
run: |
# don't aim for stability for all files
iwyu_tool.py -p build -j $(getconf _NPROCESSORS_ONLN) -- -Xiwyu --verbose=3 -Xiwyu --no_fwd_decls -Xiwyu --cxx17ns -Xiwyu --mapping_file=${{github.workspace}}/.github/iwyu.imp -Xiwyu --regex=ecmascript | tee iwyu_fixes.log
fix_includes.py --blank_lines --nosafe_headers --reorder --separate_project_includes="<tld>" --keep_iwyu_namespace_format < iwyu_fixes.log
git diff | tee iwyu_fixes.patch
- name: Create Pull Request
id: create-pull-request
uses: peter-evans/create-pull-request@v7
if: ${{ github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' }}
with:
token: ${{ secrets.EIC_EICRECON_PULL_REQUESTS_READ_WRITE }}
commit-message: "fix: iwyu [skip ci]"
branch: pr${{ github.event.pull_request.number }}-iwyu
base: ${{ github.event.pull_request.head.ref }}
delete-branch: true
add-paths: |
src/**
author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
title: "${{ github.event.pull_request.title }} (fix: iwyu)"
body: |
This PR applies the include-what-you-use fixes as suggested by
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}.
Please merge this PR into the branch `${{ github.event.pull_request.head.ref }}`
to resolve failures in PR #${{ github.event.pull_request.number }}.
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
assignees: ${{ github.event.pull_request.user.login }}
- name: Upload iwyu patch as artifact
uses: actions/upload-artifact@v4
with:
name: iwyu_fixes.patch
path: iwyu_fixes.patch
if-no-files-found: ignore # no file is good
- name: Fail when iwyu provided a patch for this pull request
if: ${{ steps.create-pull-request.outputs.pull-request-operation == 'created' || steps.create-pull-request.outputs.pull-request-operation == 'updated' }}
run: |
echo "Please merge the pull request at ${{ steps.create-pull-request.outputs.pull-request-url }}"
exit 1
llvm-cov:
runs-on: ubuntu-24.04
needs: build
permissions:
statuses: write
steps:
- uses: actions/checkout@v5
with:
filter: "tree:0"
- name: Download build artifact
uses: actions/download-artifact@v5
with:
name: build-${{ env.clang-tidy-iwyu-CXX }}-eic-shell-${{ env.clang-tidy-iwyu-CMAKE_BUILD_TYPE }}-${{ env.platform }}-${{ env.release }}
path: .
- name: Uncompress build artifact
run: tar -xaf build.tar.zst
- run: sudo apt-get update
- run: sudo apt-get install -y llvm-19 jq
- name: llvm-cov
run: |
cd build
COV_OPTIONS=('--ignore-filename-regex=usr/local/include/eigen3.+')
llvm-profdata-19 merge -sparse src/tests/algorithms_test/algorithms_test.profraw \
-o src/tests/algorithms_test/algorithms_test.profdata
LIB_PATHS=()
for LIB_PATH in $(find src/ -type f -name "libalgorithms_*.so"); do
LIB_NAME="$(basename ${LIB_PATH%%.so})"
LIB_NAME="${LIB_NAME##lib}"
LIB_PATHS+=("$LIB_PATH")
llvm-cov-19 report $LIB_PATH \
-instr-profile=src/tests/algorithms_test/algorithms_test.profdata \
"${COV_OPTIONS[@]}"
COV_PERCENT=$(llvm-cov-19 export $LIB_PATH \
-instr-profile=src/tests/algorithms_test/algorithms_test.profdata \
"${COV_OPTIONS[@]}" | jq '.data | map(.totals.regions.percent) | .[]' | xargs printf "%.1f\n")
if [ "${{ github.event.pull_request.head.repo.full_name }}" = "${{ github.repository }}" ]; then
curl --request POST \
--url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha || github.sha }} \
--header "Accept: application/vnd.github+json" \
--header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
--header "X-GitHub-Api-Version: 2022-11-28" \
--data '{
"state": "success",
"context": "Code coverage ('$LIB_NAME') - '$COV_PERCENT'%"
}' \
--fail-with-body
else
echo 'PR submitted from a fork. Skipping posting the "Code coverage ('$LIB_NAME') - '$COV_PERCENT'%" status.'
fi
done
llvm-cov-19 show "${LIB_PATHS[@]/#/--object=}" \
-instr-profile=src/tests/algorithms_test/algorithms_test.profdata \
-output-dir=codecov_report -format=html \
"${COV_OPTIONS[@]}"
- uses: actions/upload-artifact@v4
with:
name: codecov_report
path: build/codecov_report/
detector-info:
runs-on: ubuntu-24.04
outputs:
hash: ${{ steps.detector-info.outputs.hash }}
steps:
- uses: cvmfs-contrib/github-action-cvmfs@v5
- name: Get detector info
id: detector-info
run: |
file=/cvmfs/singularity.opensciencegrid.org/eicweb/${{ env.platform }}:${{ env.release }}/etc/jug_info
test -f ${file}
sed -e 's/\x1b\[[0-9;]*m//g' ${file} > $(basename ${file})
grep ' epic@' $(basename ${file})
hash=$(grep ' epic@' $(basename ${file}) | sha256sum)
echo "hash=${hash%% *}" | tee $GITHUB_OUTPUT
npsim-gun:
runs-on: ubuntu-24.04
needs:
- detector-info
strategy:
matrix:
particle: [pi, e]
detector_config: [craterlake]
steps:
- uses: cvmfs-contrib/github-action-cvmfs@v5
- name: Retrieve simulation files
id: retrieve_simulation_files
uses: actions/cache@v4
with:
path: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root
key: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root-${{ needs.detector-info.outputs.hash }}
- name: Produce simulation files
uses: eic/run-cvmfs-osg-eic-shell@main
if: steps.retrieve_simulation_files.outputs.cache-hit != 'true'
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
npsim --compactFile ${DETECTOR_PATH}/${DETECTOR}_${{ matrix.detector_config }}.xml -G --random.seed 1 --gun.particle "${{ matrix.particle }}-" --gun.momentumMin "1*GeV" --gun.momentumMax "20*GeV" --gun.distribution "uniform" -N 100 --outputFile sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root -v WARNING
- uses: actions/upload-artifact@v4
with:
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root
path: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root
if-no-files-found: error
npsim-gun-EcalLumiSpec:
runs-on: ubuntu-24.04
needs:
- detector-info
strategy:
matrix:
particle: [e]
detector_config: [ip6_extended]
steps:
- uses: actions/checkout@v5
with:
filter: "tree:0"
- uses: cvmfs-contrib/github-action-cvmfs@v5
- name: Retrieve simulation files
id: retrieve_simulation_files
uses: actions/cache@v4
with:
path: sim_${{ matrix.particle }}_EcalLumiSpec_${{ matrix.detector_config }}.edm4hep.root
key: sim_${{ matrix.particle }}_EcalLumiSpec_${{ matrix.detector_config }}.edm4hep.root-${{ needs.detector-info.outputs.hash }}
- name: Produce simulation files
uses: eic/run-cvmfs-osg-eic-shell@main
if: steps.retrieve_simulation_files.outputs.cache-hit != 'true'
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
python src/tests/LUMISPECCAL_test/TwoElectronsTopCAL.py genParticles.hepmc
npsim --compactFile ${DETECTOR_PATH}/${DETECTOR}_${{ matrix.detector_config }}.xml --inputFiles genParticles.hepmc --random.seed 1 --outputFile sim_${{ matrix.particle }}_EcalLumiSpec_${{ matrix.detector_config }}.edm4hep.root -N 100 -v WARNING
- uses: actions/upload-artifact@v4
with:
name: sim_${{ matrix.particle }}_EcalLumiSpec_${{ matrix.detector_config }}.edm4hep.root
path: sim_${{ matrix.particle }}_EcalLumiSpec_${{ matrix.detector_config }}.edm4hep.root
if-no-files-found: error
npsim-dis:
runs-on: ubuntu-24.04
needs:
- detector-info
strategy:
matrix:
include:
- beam: 10x100
minq2: 1000
detector_config: craterlake_tracking_only
- beam: 18x275
minq2: 1000
detector_config: craterlake_18x275
steps:
- uses: cvmfs-contrib/github-action-cvmfs@v5
- name: Retrieve simulation files
id: retrieve_simulation_files
uses: actions/cache@v4
with:
path: sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.edm4hep.root
key: sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.edm4hep.root-${{ needs.detector-info.outputs.hash }}
- name: Produce simulation files
uses: eic/run-cvmfs-osg-eic-shell@main
if: steps.retrieve_simulation_files.outputs.cache-hit != 'true'
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
url=root://dtn-eic.jlab.org//volatile/eic/EPIC/EVGEN/DIS/NC/${{matrix.beam}}/minQ2=${{matrix.minq2}}/pythia8NCDIS_${{matrix.beam}}_minQ2=${{matrix.minq2}}_beamEffects_xAngle=-0.025_hiDiv_1.hepmc3.tree.root
npsim --compactFile ${DETECTOR_PATH}/${DETECTOR}_${{ matrix.detector_config }}.xml -N 100 --inputFiles ${url} --random.seed 1 --outputFile sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.edm4hep.root -v WARNING
- uses: actions/upload-artifact@v4
with:
name: sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.edm4hep.root
path: sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.edm4hep.root
if-no-files-found: error
npsim-minbias:
runs-on: ubuntu-24.04
needs:
- detector-info
strategy:
matrix:
include:
- beam: 5x41
detector_config: craterlake_5x41
- beam: 10x100
detector_config: craterlake_10x100
- beam: 18x275
detector_config: craterlake_18x275
steps:
- uses: cvmfs-contrib/github-action-cvmfs@v5
- name: Retrieve simulation files
id: retrieve_simulation_files
uses: actions/cache@v4
with:
path: sim_dis_${{matrix.beam}}_minQ2=0_${{ matrix.detector_config }}.edm4hep.root
key: sim_dis_${{matrix.beam}}_minQ2=0_${{ matrix.detector_config }}.edm4hep.root-${{ needs.detector-info.outputs.hash }}
- name: Produce simulation files
uses: eic/run-cvmfs-osg-eic-shell@main
if: steps.retrieve_simulation_files.outputs.cache-hit != 'true'
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
url=root://dtn-eic.jlab.org//volatile/eic/EPIC/EVGEN/SIDIS/pythia6-eic/1.0.0/${{matrix.beam}}/q2_0to1/pythia_ep_noradcor_${{matrix.beam}}_q2_0.000000001_1.0_run1.ab.hepmc3.tree.root
npsim --compactFile ${DETECTOR_PATH}/${DETECTOR}_${{ matrix.detector_config }}.xml -N 100 --inputFiles ${url} --random.seed 1 --outputFile sim_dis_${{matrix.beam}}_minQ2=0_${{ matrix.detector_config }}.edm4hep.root -v WARNING
- uses: actions/upload-artifact@v4
with:
name: sim_dis_${{matrix.beam}}_minQ2=0_${{ matrix.detector_config }}.edm4hep.root
path: sim_dis_${{matrix.beam}}_minQ2=0_${{ matrix.detector_config }}.edm4hep.root
if-no-files-found: error
eicrecon-two-stage-running:
runs-on: ubuntu-24.04
needs:
- build
- npsim-gun
strategy:
matrix:
CXX: [g++]
particle: [e]
detector_config: [craterlake]
steps:
- name: Checkout .github
uses: actions/checkout@v5
with:
sparse-checkout: .github
- name: Download install directory
uses: actions/download-artifact@v5
with:
name: install-${{ matrix.CXX }}-eic-shell-Release-${{ env.platform }}-${{ env.release }}-ASAN
- name: Unarchive install directory
run: tar -xaf install.tar.zst
- name: Download simulation input
uses: actions/download-artifact@v5
with:
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root
- name: Setup cvmfs
uses: cvmfs-contrib/github-action-cvmfs@v5
- name: Run EICrecon (digitization)
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
export DETECTOR_CONFIG=${DETECTOR}_${{ matrix.detector_config }}
export LD_LIBRARY_PATH=$PWD/install/lib:$LD_LIBRARY_PATH
export JANA_PLUGIN_PATH=$PWD/install/lib/EICrecon/plugins${JANA_PLUGIN_PATH:+:${JANA_PLUGIN_PATH}}
$PWD/install/bin/eicrecon ${{env.JANA_OPTIONS}} ${{env.JANA_OPTIONS_GUN}} -Ppodio:output_collections=EventHeader,MCParticles,EcalBarrelScFiRawHits,EcalBarrelImagingRawHits -Ppodio:output_file=two_stage_raw_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root -Pplugins=dump_flags,janadot -Pdump_flags:json=${{ matrix.particle }}_${{ matrix.detector_config }}_flags.json
- name: Upload digitization output
uses: actions/upload-artifact@v4
with:
name: two_stage_raw_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root
path: two_stage_raw_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root
if-no-files-found: error
- name: Run EICrecon (reconstruction)
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
export DETECTOR_CONFIG=${DETECTOR}_${{ matrix.detector_config }}
export LD_LIBRARY_PATH=$PWD/install/lib:$LD_LIBRARY_PATH
export JANA_PLUGIN_PATH=$PWD/install/lib/EICrecon/plugins${JANA_PLUGIN_PATH:+:${JANA_PLUGIN_PATH}}
$PWD/install/bin/eicrecon ${{env.JANA_OPTIONS}} ${{env.JANA_OPTIONS_GUN}} -Ppodio:output_collections=EcalBarrelClusters,EcalBarrelClusterAssociations -Ppodio:output_file=two_stage_rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root two_stage_raw_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root -Pplugins=dump_flags,janadot -Pdump_flags:json=${{ matrix.particle }}_${{ matrix.detector_config }}_flags.json
- name: Upload reconstruction output
uses: actions/upload-artifact@v4
with:
name: two_stage_rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root
path: two_stage_rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root
if-no-files-found: error
eicrecon-test-plugins:
runs-on: ubuntu-24.04
needs:
- build
- npsim-gun
strategy:
matrix:
CXX: [g++]
particle: [e]
detector_config: [craterlake]
test_plugins:
- geometry_navigation_test
- tracking_test
- track_propagation_test
steps:
- name: Checkout .github
uses: actions/checkout@v5
with:
sparse-checkout: .github
- name: Download install directory
uses: actions/download-artifact@v5
with:
name: install-${{ matrix.CXX }}-eic-shell-Release-${{ env.platform }}-${{ env.release }}-ASAN
- name: Unarchive install directory
run: tar -xaf install.tar.zst
- uses: actions/download-artifact@v5
with:
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root
- uses: cvmfs-contrib/github-action-cvmfs@v5
- name: Run EICrecon
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
export DETECTOR_CONFIG=${DETECTOR}_${{ matrix.detector_config }}
export LD_LIBRARY_PATH=$PWD/install/lib:$LD_LIBRARY_PATH
export JANA_PLUGIN_PATH=$PWD/install/lib/EICrecon/plugins${JANA_PLUGIN_PATH:+:${JANA_PLUGIN_PATH}}
$PWD/install/bin/eicrecon ${{env.JANA_OPTIONS}} ${{env.JANA_OPTIONS_GUN}} -Pplugins=${{ matrix.test_plugins }} -Phistsfile=rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.test_plugins }}.hists.root -Ppodio:output_file=rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root
- uses: actions/upload-artifact@v4
with:
name: rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.test_plugins }}.hists.root
path: rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.test_plugins }}.hists.root
if-no-files-found: error
eicrecon-benchmarks-plugins:
runs-on: ubuntu-24.04
needs:
- build
- npsim-gun
strategy:
matrix:
CXX: [g++]
particle: [e]
detector_config: [craterlake]
benchmark_plugins:
- femc_studies
- lfhcal_studies
- tracking_efficiency
- tracking_occupancy
steps:
- name: Checkout .github
uses: actions/checkout@v5
with:
sparse-checkout: .github
- name: Download install directory
uses: actions/download-artifact@v5
with:
name: install-${{ matrix.CXX }}-eic-shell-Release-${{ env.platform }}-${{ env.release }}-ASAN
- name: Unarchive install directory
run: tar -xaf install.tar.zst
- uses: actions/download-artifact@v5
with:
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root
- uses: cvmfs-contrib/github-action-cvmfs@v5
- name: Run EICrecon
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
export DETECTOR_CONFIG=${DETECTOR}_${{ matrix.detector_config }}
export LD_LIBRARY_PATH=$PWD/install/lib:$LD_LIBRARY_PATH
export JANA_PLUGIN_PATH=$PWD/install/lib/EICrecon/plugins${JANA_PLUGIN_PATH:+:${JANA_PLUGIN_PATH}}
$PWD/install/bin/eicrecon ${{env.JANA_OPTIONS}} ${{env.JANA_OPTIONS_GUN}} -Pplugins=${{ matrix.benchmark_plugins }} -Phistsfile=rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.benchmark_plugins }}.hists.root -Ppodio:output_file=rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root
- uses: actions/upload-artifact@v4
with:
name: rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.benchmark_plugins }}.hists.root
path: rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.benchmark_plugins }}.hists.root
if-no-files-found: error
eicrecon-gun:
runs-on: ubuntu-24.04
needs:
- build
- npsim-gun
strategy:
matrix:
CXX: [clang++]
particle: [pi, e]
detector_config: [craterlake]
steps:
- name: Checkout .github
uses: actions/checkout@v5
with:
sparse-checkout: .github
- name: Download install directory
uses: actions/download-artifact@v5
with:
name: install-${{ matrix.CXX }}-eic-shell-Release-${{ env.platform }}-${{ env.release }}-ASAN
- name: Uncompress install directory
run: tar -xaf install.tar.zst
- uses: actions/download-artifact@v5
with:
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root
- uses: cvmfs-contrib/github-action-cvmfs@v5
- name: Check dynamic library loader paths
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
export LD_LIBRARY_PATH=$PWD/install/lib:$LD_LIBRARY_PATH
ldd -r install/lib/*.so install/lib/EICrecon/plugins/*.so
- name: Run EICrecon
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
echo "::add-matcher::${{github.workspace}}/.github/ubsan.json"
echo "::add-matcher::${{github.workspace}}/.github/eicrecon.json"
export DETECTOR_CONFIG=${DETECTOR}_${{ matrix.detector_config }}
export LD_LIBRARY_PATH=$PWD/install/lib:$LD_LIBRARY_PATH
export JANA_PLUGIN_PATH=$PWD/install/lib/EICrecon/plugins:/usr/local/plugins
prmon --json-summary rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.prmon.json -- \
$PWD/install/bin/eicrecon ${{env.JANA_OPTIONS}} ${{env.JANA_OPTIONS_GUN}} -Ppodio:output_file=rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root -Pplugins=dump_flags,janadot,janatop $(<${{ github.workspace }}/.github/janadot.groups) -Pdump_flags:json=${{ matrix.particle }}_${{ matrix.detector_config }}_flags.json
- uses: actions/upload-artifact@v4
with:
name: rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root
path: rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.prmon.json
path: rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.prmon.json
if-no-files-found: error
- name: Convert execution graphs
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
mv jana.dot rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.dot
sed '/rank=sink/s/"podio::Frame";//; /podio::Frame/d; /rank=source/s/"JEventProcessorPODIO";//; /JEventProcessorPODIO/d' *.dot | dot -Tsvg > jana.svg
mv jana.svg rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.svg
continue-on-error: true
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.particle }}_${{ matrix.detector_config }}_flags.json
path: ${{ matrix.particle }}_${{ matrix.detector_config }}_flags.json
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.dot
path: |
*.dot
*.svg
if-no-files-found: error
- name: Download previous artifact
id: download_previous_artifact
uses: dawidd6/action-download-artifact@v11
with:
branch: ${{ github.base_ref || github.event.merge_group.base_ref || github.ref_name }}
path: ref/
name: rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root
workflow: ".github/workflows/linux-eic-shell.yml"
workflow_conclusion: "completed"
if_no_artifact_found: warn
- name: Compare to previous artifacts
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
mkdir capybara-reports
mkdir new
ln -sf ../rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root new/
# using nullglob to ensure ref/* does not fail
shopt -s nullglob
capybara bara ref/*rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root new/rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root
mv capybara-reports rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}
touch .rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}
- uses: actions/upload-artifact@v4
with:
name: rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.capy
path: |
.rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}
rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}/
if-no-files-found: error
eicrecon-gun-EcalLumiSpec:
runs-on: ubuntu-24.04
needs:
- build
- npsim-gun-EcalLumiSpec
strategy:
matrix:
CXX: [clang++]
particle: [e]
detector_config: [ip6_extended]
steps:
- name: Checkout .github
uses: actions/checkout@v5
with:
sparse-checkout: .github
- name: Download install directory
uses: actions/download-artifact@v5
with:
name: install-${{ matrix.CXX }}-eic-shell-Release-${{ env.platform }}-${{ env.release }}-ASAN
- name: Unarchive install directory
run: tar -xaf install.tar.zst
- uses: actions/download-artifact@v5
with:
name: sim_${{ matrix.particle }}_EcalLumiSpec_${{ matrix.detector_config }}.edm4hep.root
- uses: cvmfs-contrib/github-action-cvmfs@v5
- name: Run EICrecon
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
export DETECTOR_CONFIG=${DETECTOR}_${{ matrix.detector_config }}
export LD_LIBRARY_PATH=$PWD/install/lib:$LD_LIBRARY_PATH
export JANA_PLUGIN_PATH=$PWD/install/lib/EICrecon/plugins:/usr/local/plugins
$PWD/install/bin/eicrecon ${{env.JANA_OPTIONS}} ${{env.JANA_OPTIONS_GUN}} -Ppodio:output_file=rec_${{ matrix.particle }}_EcalLumiSpec_${{ matrix.detector_config }}.edm4eic.root sim_${{ matrix.particle }}_EcalLumiSpec_${{ matrix.detector_config }}.edm4hep.root -Ppodio:output_collections=EcalLumiSpecRawHits,EcalLumiSpecRecHits,EcalLumiSpecClusters,EcalLumiSpecClusterAssociations -PLUMISPECCAL:EcalLumiSpecIslandProtoClusters:splitCluster=1 -Pplugins=dump_flags,janadot,janatop $(<${{ github.workspace }}/.github/janadot.groups) -Pdump_flags:json=${{ matrix.particle }}_${{ matrix.detector_config }}_flags.json
- uses: actions/upload-artifact@v4
with:
name: rec_${{ matrix.particle }}_EcalLumiSpec_${{ matrix.detector_config }}.edm4eic.root
path: rec_${{ matrix.particle }}_EcalLumiSpec_${{ matrix.detector_config }}.edm4eic.root
if-no-files-found: error
- name: Convert execution graphs
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
mv jana.dot rec_${{ matrix.particle }}_EcalLumiSpec_${{ matrix.detector_config }}.dot
sed '/rank=sink/s/"podio::Frame";//; /podio::Frame/d; /rank=source/s/"JEventProcessorPODIO";//; /JEventProcessorPODIO/d' *.dot | dot -Tsvg > jana.svg
mv jana.svg rec_${{ matrix.particle }}_EcalLumiSpec_${{ matrix.detector_config }}.svg
continue-on-error: true
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.particle }}_${{ matrix.detector_config }}_flags.json
path: ${{ matrix.particle }}_${{ matrix.detector_config }}_flags.json
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: rec_${{ matrix.particle }}_EcalLumiSpec_${{ matrix.detector_config }}.dot
path: |
*.dot
*.svg
if-no-files-found: error
eicrecon-dis:
runs-on: ubuntu-24.04
needs:
- build
- npsim-dis
- npsim-minbias
continue-on-error: ${{ matrix.nthreads > 1 }}
strategy:
matrix:
include:
- CXX: clang++
beam: 5x41
minq2: 0
detector_config: craterlake_5x41
sanitizer: ASAN
- CXX: clang++
beam: 10x100
minq2: 0
detector_config: craterlake_10x100
sanitizer: TSAN
- CXX: clang++
beam: 18x275
minq2: 0
detector_config: craterlake_18x275
sanitizer: ASAN
- CXX: clang++
beam: 18x275
minq2: 0
detector_config: craterlake_18x275
sanitizer: TSAN
nthreads: 4
- CXX: clang++
beam: 10x100
minq2: 1000
detector_config: craterlake_tracking_only
sanitizer: ASAN
- CXX: clang++
beam: 18x275
minq2: 1000
detector_config: craterlake_18x275
sanitizer: ASAN
- CXX: clang++
beam: 18x275
minq2: 1000
detector_config: craterlake_18x275
sanitizer: TSAN
nthreads: 4
steps:
- name: Checkout .github
uses: actions/checkout@v5
with:
sparse-checkout: .github
- name: Download install directory
uses: actions/download-artifact@v5
with:
name: install-${{ matrix.CXX }}-eic-shell-Release-${{ env.platform }}-${{ env.release }}-${{ matrix.sanitizer }}
- name: Unarchive install directory
run: tar -xaf install.tar.zst
- uses: actions/download-artifact@v5
with:
name: sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}.edm4hep.root
- uses: cvmfs-contrib/github-action-cvmfs@v5
- name: Run EICrecon
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
echo "::add-matcher::${{github.workspace}}/.github/ubsan.json"
echo "::add-matcher::${{github.workspace}}/.github/eicrecon.json"
export DETECTOR_CONFIG=${DETECTOR}_${{ matrix.detector_config }}
export LD_LIBRARY_PATH=$PWD/install/lib:$LD_LIBRARY_PATH
export JANA_PLUGIN_PATH=$PWD/install/lib/EICrecon/plugins:/usr/local/plugins
prmon --json-summary rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}.prmon.json -- \
$PWD/install/bin/eicrecon ${{env.JANA_OPTIONS}} ${{matrix.nthreads > 1 && format('-Pnthreads={0}', matrix.nthreads) || ''}} -Ppodio:output_file=rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}.edm4eic.root sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.edm4hep.root -Pacts:WriteObj=true -Pacts:WritePly=true -Pplugins=janadot,janatop $(<${{ github.workspace }}/.github/janadot.groups)
- uses: actions/upload-artifact@v4
with:
name: rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}.edm4eic.root
path: rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}.edm4eic.root
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}.prmon.json
path: rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}.prmon.json
if-no-files-found: error
- name: Convert execution graphs
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
mv jana.dot rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}.dot
sed '/rank=sink/s/"podio::Frame";//; /podio::Frame/d; /rank=source/s/"JEventProcessorPODIO";//; /JEventProcessorPODIO/d' *.dot | dot -Tsvg > jana.svg
mv jana.svg rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}.svg
continue-on-error: true
- uses: actions/upload-artifact@v4
with:
name: rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}.dot
path: |
*.dot
*.svg
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: obj_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}
path: |
*.mtl
*.obj
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: ply_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}
path: |
*.ply
if-no-files-found: error
- name: Download previous artifact
id: download_previous_artifact
uses: dawidd6/action-download-artifact@v11
with:
branch: ${{ github.base_ref || github.event.merge_group.base_ref || github.ref_name }}
path: ref/
name: rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}.edm4eic.root
workflow: ".github/workflows/linux-eic-shell.yml"
workflow_conclusion: "completed"
if_no_artifact_found: warn
- name: Compare to previous artifacts
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
mkdir capybara-reports
mkdir new
ln -sf ../rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}.edm4eic.root new/
# using nullglob to ensure ref/* does not fail
shopt -s nullglob
capybara bara ref/*rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}.edm4eic.root new/rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}.edm4eic.root
mv capybara-reports rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}
touch .rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}
- uses: actions/upload-artifact@v4
with:
name: rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}.capy
path: |
.rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}
rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}${{matrix.nthreads > 0 && '_MT' || ''}}/
if-no-files-found: error
compare-single-multi-threaded:
runs-on: ubuntu-24.04
needs:
- eicrecon-dis
strategy:
matrix:
include:
- beam: 18x275
minq2: 0
detector_config: craterlake_18x275
- beam: 18x275
minq2: 1000
detector_config: craterlake_18x275
steps:
- uses: cvmfs-contrib/github-action-cvmfs@v5
- name: Download single-threaded artifact
uses: actions/download-artifact@v5
with:
name: rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.edm4eic.root
path: single/
- name: Download multi-threaded artifact
uses: actions/download-artifact@v5
with:
name: rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}_MT.edm4eic.root
path: multi/
- name: Compare single- and multi-threaded artifacts
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/bin/thisepic.sh"
run: |
mkdir capybara-reports
capybara bara single/rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.edm4eic.root \
multi/rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}_MT.edm4eic.root
mv capybara-reports rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}_ST_MT
touch .rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}_ST_MT
- uses: actions/upload-artifact@v4
with:
name: rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}_ST_MT.capy
path: |
.rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}_ST_MT
rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}_ST_MT/
if-no-files-found: error
trigger-container:
runs-on: ubuntu-24.04
if: ${{ github.event_name != 'merge_group' && github.event_name != 'schedule' && github.actor != 'dependabot[bot]' && github.ref != 'refs/heads/main' }}
needs:
- build
outputs:
json: ${{ steps.trigger.outputs.json }}
steps:
- uses: eic/trigger-gitlab-ci@v3
id: trigger
with:
url: https://eicweb.phy.anl.gov
project_id: 290
token: ${{ secrets.EICWEB_CONTAINER_TRIGGER }}
ref_name: master
variables: |
GITHUB_REPOSITORY=${{ github.repository }}
GITHUB_SHA=${{ github.event.pull_request.head.sha || github.sha }}
GITHUB_PR=${{ github.event.pull_request.number }}
EICRECON_VERSION="${{ github.event.pull_request.head.ref || github.ref_name }}"
PIPELINE_NAME=${{ github.repository }}: ${{ github.event.pull_request.title || github.ref_name }}
- name: Post a GitHub CI status
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/eic_container"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-docs:
runs-on: ubuntu-24.04
needs:
- eicrecon-gun
- eicrecon-dis
- compare-single-multi-threaded
steps:
- uses: actions/checkout@v5
- name: Copy docs
run: |
cp -r docs publishing_docs
- name: Run Doxygen
if: github.ref_name == 'main'
run: |
sudo apt install doxygen graphviz
doxygen Doxyfile
mv html publishing_docs/doxygen
- uses: actions/upload-artifact/merge@v4
with:
name: jana.dot
pattern: |
*.dot
delete-merged: true
- uses: actions/download-artifact@v5
with:
name: jana.dot
path: publishing_docs/dot/
- uses: actions/download-artifact@v5
with:
name: e_craterlake_flags.json
path: publishing_docs/
- uses: actions/upload-artifact/merge@v4
with:
name: capybara
pattern: |
*.capy
delete-merged: true
- uses: actions/upload-artifact@v4
with:
name: docs
path: publishing_docs/
if-no-files-found: error
list-open-prs:
uses: eic/actions/.github/workflows/list-open-prs.yml@main
get-docs-from-open-prs:
runs-on: ubuntu-24.04
needs:
- build-docs
- list-open-prs
strategy:
matrix: ${{ fromJSON(needs.list-open-prs.outputs.json) }}
fail-fast: false
max-parallel: 4
steps:
- name: Download docs artifact (other PRs)
uses: dawidd6/action-download-artifact@v11
if: github.event.pull_request.number != matrix.pr
with:
commit: ${{ matrix.head_sha }}
path: publishing_docs/pr/${{ matrix.pr }}/
name: docs
workflow: ".github/workflows/linux-eic-shell.yml"
workflow_conclusion: "completed"
if_no_artifact_found: ignore
- name: Download docs artifact (this PR)
uses: actions/download-artifact@v5
if: github.event.pull_request.number == matrix.pr
with:
name: docs
path: publishing_docs/pr/${{ matrix.pr }}/
- name: Download capybara artifact (other PRs)
id: download_capybara
uses: dawidd6/action-download-artifact@v11
if: github.event.pull_request.number != matrix.pr
with:
commit: ${{ matrix.head_sha }}
path: publishing_docs/pr/${{ matrix.pr }}/capybara/
name: capybara
workflow: ".github/workflows/linux-eic-shell.yml"
workflow_conclusion: "completed"
if_no_artifact_found: ignore
- name: Download capybara artifact (this PR)
uses: actions/download-artifact@v5
if: github.event.pull_request.number == matrix.pr
with:
name: capybara
path: publishing_docs/pr/${{ matrix.pr }}/capybara/
- name: Remove doxygen in PR
run: rm -rf publishing_docs/pr/*/doxygen
- uses: actions/upload-artifact@v4
with:
name: github-pages-staging-pr-${{ matrix.pr }}
path: publishing_docs/
if-no-files-found: ignore
get-docs-from-main:
runs-on: ubuntu-24.04
needs:
- build-docs
steps:
# Note:
# - If we run this on a non-main branch, we download from main with action-download-artifact.
# - If we run this on the main branch, we have to download from this pipeline with download-artifact.
- name: Download docs artifact (in PR)
uses: dawidd6/action-download-artifact@v11
if: github.ref_name != 'main'
with:
branch: main
path: publishing_docs/
name: docs
workflow: ".github/workflows/linux-eic-shell.yml"
workflow_conclusion: "completed"
if_no_artifact_found: fail
- name: Download docs artifact (on main)
uses: actions/download-artifact@v5
if: github.ref_name == 'main'
with:
name: docs
path: publishing_docs/
- name: Download capybara artifact (in PR)
id: download_capybara
uses: dawidd6/action-download-artifact@v11
if: github.ref_name != 'main'
with:
commit: ${{ matrix.head_sha }}
path: publishing_docs/capybara/
name: capybara
workflow: ".github/workflows/linux-eic-shell.yml"
workflow_conclusion: "completed"
if_no_artifact_found: ignore
- name: Download capybara artifact (on main)
uses: actions/download-artifact@v5
if: github.ref_name == 'main'
with:
name: capybara
path: publishing_docs/capybara/
- name: Populate capybara summary (on main)
if: github.ref_name == 'main' || steps.download_capybara.outputs.found_artifact == 'true'
run: |
echo "### Capybara summary for main" >> publishing_docs/capybara/index.md
find publishing_docs/capybara/ -mindepth 1 -maxdepth 1 -type d -printf \
"- [%f](https://eicrecon.epic-eic.org/capybara/%f/index.html)\n" | sort >> publishing_docs/capybara/index.md
- name: Create capybara step summary (this PR)
if: github.ref_name == 'main'
run: |
cat publishing_docs/capybara/index.md >> $GITHUB_STEP_SUMMARY
- uses: actions/upload-artifact@v4
with:
name: github-pages-staging-main
path: publishing_docs/
if-no-files-found: error
collect-docs:
runs-on: ubuntu-24.04
needs:
- get-docs-from-main
- get-docs-from-open-prs
steps:
- name: Merge GitHub Pages staging artifact
uses: actions/upload-artifact/merge@v4
with:
name: github-pages-staging
pattern: |
github-pages-staging-*
delete-merged: true
- name: Download GitHub Pages staging artifact
uses: actions/download-artifact@v5
with:
name: github-pages-staging
path: publishing_docs/
- name: Make PR summary page
run: |
echo "### PRs" >> publishing_docs/pr/index.md
find publishing_docs/pr -mindepth 1 -maxdepth 1 -type d -printf "- [%f](%f/index.md)\n" | sort >> publishing_docs/pr/index.md
- name: List content to publish
run:
find publishing_docs/
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: publishing_docs/
retention-days: 7
- name: Populate capybara summary
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "### Capybara summary for PR ${{ github.event.pull_request.number }}" >> capybara_${{ github.event.pull_request.number }}.md
find publishing_docs/pr/${{ github.event.pull_request.number }}/capybara/ -mindepth 1 -maxdepth 1 -type d -printf \
"- [%f](https://eicrecon.epic-eic.org/pr/${{ github.event.pull_request.number }}/capybara/%f/index.html)\n" | sort >> capybara_${{ github.event.pull_request.number }}.md
echo "<sup><sub>Last updated $(TZ=America/New_York date -Iminutes) ${{github.event.pull_request.head.sha}}</sub></sup>" >> capybara_${{ github.event.pull_request.number }}.md
- name: Create capybara step summary
if: ${{ github.event_name == 'pull_request' }}
run: |
cat capybara_${{ github.event.pull_request.number }}.md >> $GITHUB_STEP_SUMMARY
- name: Upload capybara summary
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v4
with:
name: capybara_${{ github.event.pull_request.number }}.md
path: capybara_${{ github.event.pull_request.number }}.md
deploy-docs:
needs:
- collect-docs
permissions:
pages: write
id-token: write
pull-requests: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-24.04
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Find capybara comment
if: ${{ github.event_name == 'pull_request' }}
id: find_comment
uses: peter-evans/find-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Capybara summary
- name: Fetch capybara summary
if: ${{ github.event_name == 'pull_request' }}
uses: actions/download-artifact@v5
with:
name: capybara_${{ github.event.pull_request.number }}.md
- name: Create or update capybara comment
if: ${{ github.event_name == 'pull_request' }}
uses: peter-evans/create-or-update-comment@v5
with:
comment-id: ${{ steps.find_comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body-file: capybara_${{ github.event.pull_request.number }}.md
edit-mode: replace
cancel-container:
if: cancelled() || failure()
needs:
- trigger-container
- deploy-docs
runs-on: ubuntu-24.04
steps:
- name: Cancel container
run: |
curl --request POST \
--header "PRIVATE-TOKEN: ${{ secrets.EICWEB_CONTAINER_CANCEL }}" \
https://eicweb.phy.anl.gov/api/v4/projects/290/pipelines/$(echo '${{ needs.trigger-container.outputs.json }}' | jq --raw-output .id)/cancel