Build against eic-shell #7962
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: 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-CC: clang | |
clang-tidy-iwyu-CMAKE_BUILD_TYPE: Debug | |
JANA_OPTIONS: "-Pjana:ticker_interval=60000 -Pjana:extended_report=1 -Pjana:warmup_timeout=0 -Pjana:timeout=0" | |
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 | |
jobs: | |
env: | |
# env cannot be used in matrix, but outputs can | |
# so this job turns env into outputs | |
runs-on: ubuntu-latest | |
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-latest | |
needs: env | |
strategy: | |
# include multiple compilers for one release version, | |
# and one compiler for a range of release versions | |
matrix: | |
CC: [gcc, clang] | |
CMAKE_BUILD_TYPE: [Release, Debug] | |
release: ${{ fromJSON(needs.env.outputs.release_json) }} | |
include: | |
# all gcc jobs use g++ | |
- CC: gcc | |
CXX: g++ | |
# all clang jobs use clang++ | |
- CC: clang | |
CXX: clang++ | |
# all clang debug jobs get extra flags | |
- CC: clang | |
CXX: clang++ | |
CMAKE_BUILD_TYPE: Debug | |
CXXFLAGS: -fprofile-instr-generate -fcoverage-mapping | |
# include some configs explicitly (if not yet included) | |
- CC: clang | |
CXX: clang++ | |
CMAKE_BUILD_TYPE: Release | |
release: nightly | |
- CC: clang | |
CXX: clang++ | |
CMAKE_BUILD_TYPE: Release | |
release: 24.04.0-stable | |
- CC: clang | |
CMAKE_BUILD_TYPE: Release | |
release: 24.05.2-stable | |
steps: | |
- name: mmap rnd_bits workaround | |
# https://github.com/actions/runner/issues/3207#issuecomment-2000066889 | |
run: | | |
sudo sysctl -w vm.mmap_rnd_bits=28 | |
- uses: actions/checkout@v4 | |
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.CC }}-${{ matrix.release }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ github.head_ref || github.ref_name }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }} | |
restore-keys: | | |
ccache-${{ matrix.CC }}-${{ matrix.release }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ github.ref_name }}- | |
ccache-${{ matrix.CC }}-${{ matrix.release }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ github.head_ref }}- | |
ccache-${{ matrix.CC }}-${{ matrix.release }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ github.base_ref }}- | |
ccache-${{ matrix.CC }}-${{ matrix.release }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ github.event.merge_group.base_ref }}- | |
ccache-${{ matrix.CC }}-${{ matrix.release }}-${{ matrix.CMAKE_BUILD_TYPE }}- | |
ccache-${{ matrix.CC }}-${{ matrix.release }}- | |
ccache-${{ matrix.CC }}- | |
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@v4 | |
- name: Build and install | |
uses: eic/run-cvmfs-osg-eic-shell@main | |
with: | |
platform-release: "${{ env.platform }}:${{ matrix.release }}" | |
run: | | |
# install this repo | |
CC="${{ matrix.CC }}" CXX="${{ matrix.CXX }}" CXXFLAGS="${{ matrix.CXXFLAGS }}" cmake -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=ON -DUSE_TSAN=OFF -DUSE_UBSAN=ON | |
cmake --build build -j $(getconf _NPROCESSORS_ONLN) --target install | |
ccache --show-stats --verbose | |
- 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/lib:$LD_LIBRARY_PATH | |
for lib in install/lib/*.so install/lib/EICrecon/plugins/*.so ; do | |
readelf -d $lib | |
ldd -r $lib | |
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 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: install-${{ matrix.CC }}-eic-shell-${{ matrix.CMAKE_BUILD_TYPE }}-${{ env.platform }}-${{ matrix.release }} | |
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.CC == env.clang-tidy-iwyu-CC && matrix.CMAKE_BUILD_TYPE == env.clang-tidy-iwyu-CMAKE_BUILD_TYPE | |
run: tar -caf build.tar.zst build/ | |
- name: Upload build directory | |
if: matrix.CC == env.clang-tidy-iwyu-CC && matrix.CMAKE_BUILD_TYPE == env.clang-tidy-iwyu-CMAKE_BUILD_TYPE | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-${{ matrix.CC }}-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-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
filter: "tree:0" | |
- uses: cvmfs-contrib/github-action-cvmfs@v4 | |
- name: Download build artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-${{ env.clang-tidy-iwyu-CC }}-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: 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.yml -extra-arg='-std=c++20' -checks='-*,bugprone-*,-bugprone-narrowing-conversions,-bugprone-macro-parentheses' -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' }} | |
with: | |
platform-release: "${{ env.platform }}:${{ env.release }}" | |
run: | | |
run-clang-tidy -p build -export-fixes clang_tidy_fixes.yml -extra-arg='-std=c++20' | |
- name: Upload clang-tidy fixes as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: clang-tidy-fixes.yml | |
path: clang_tidy_fixes.yml | |
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.yml | |
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 -- -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: 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: ${{ github.event_name == 'pull_request' }} | |
run: git diff --exit-code | |
llvm-cov: | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
statuses: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
filter: "tree:0" | |
- name: Download build artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-${{ env.clang-tidy-iwyu-CC }}-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-15 jq | |
- name: llvm-cov | |
run: | | |
cd build | |
COV_OPTIONS=('--ignore-filename-regex=usr/local/include/eigen3.+') | |
llvm-profdata-15 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-15 report $LIB_PATH \ | |
-instr-profile=src/tests/algorithms_test/algorithms_test.profdata \ | |
"${COV_OPTIONS[@]}" | |
COV_PERCENT=$(llvm-cov-15 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-15 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-latest | |
outputs: | |
hash: ${{ steps.detector-info.outputs.hash }} | |
steps: | |
- uses: cvmfs-contrib/github-action-cvmfs@v4 | |
- name: Get detector info | |
id: detector-info | |
run: | | |
file=/cvmfs/singularity.opensciencegrid.org/eicweb/${{ env.platform }}:${{ env.release }}/etc/jug_info | |
test -f ${file} | |
grep ' epic@' ${file} | |
hash=$(grep ' epic@' ${file} | sha256sum) | |
echo "hash=${hash%% *}" | tee $GITHUB_OUTPUT | |
npsim-gun: | |
runs-on: ubuntu-latest | |
needs: | |
- detector-info | |
strategy: | |
matrix: | |
particle: [pi, e] | |
detector_config: [craterlake] | |
steps: | |
- uses: cvmfs-contrib/github-action-cvmfs@v4 | |
- 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-latest | |
needs: | |
- detector-info | |
strategy: | |
matrix: | |
particle: [e] | |
detector_config: [ip6_extended] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
filter: "tree:0" | |
- uses: cvmfs-contrib/github-action-cvmfs@v4 | |
- 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-latest | |
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@v4 | |
- 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//work/eic2/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-latest | |
needs: | |
- detector-info | |
strategy: | |
matrix: | |
include: | |
- beam: 5x41 | |
detector_config: craterlake_5x41 | |
- beam: 10x100 | |
detector_config: craterlake | |
- beam: 18x275 | |
detector_config: craterlake_18x275 | |
steps: | |
- uses: cvmfs-contrib/github-action-cvmfs@v4 | |
- 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//work/eic2/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-latest | |
needs: | |
- build | |
- npsim-gun | |
strategy: | |
matrix: | |
CC: [gcc] | |
particle: [e] | |
detector_config: [craterlake] | |
steps: | |
- name: mmap rnd_bits workaround | |
# https://github.com/actions/runner/issues/3207#issuecomment-2000066889 | |
run: | | |
sudo sysctl -w vm.mmap_rnd_bits=28 | |
- name: Checkout .github | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: .github | |
- name: Download install directory | |
uses: actions/download-artifact@v4 | |
with: | |
name: install-${{ matrix.CC }}-eic-shell-Release-${{ env.platform }}-${{ env.release }} | |
- name: Unarchive install directory | |
run: tar -xaf install.tar.zst | |
- name: Download simulation input | |
uses: actions/download-artifact@v4 | |
with: | |
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root | |
- name: Setup cvmfs | |
uses: cvmfs-contrib/github-action-cvmfs@v4 | |
- 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 $JANA_OPTIONS -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 $JANA_OPTIONS -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-eicmkplugin: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
- npsim-gun | |
strategy: | |
matrix: | |
CC: [gcc] | |
particle: [e] | |
detector_config: [craterlake] | |
steps: | |
- name: mmap rnd_bits workaround | |
# https://github.com/actions/runner/issues/3207#issuecomment-2000066889 | |
run: | | |
sudo sysctl -w vm.mmap_rnd_bits=28 | |
- name: Checkout .github | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: .github | |
- name: Download install directory | |
uses: actions/download-artifact@v4 | |
with: | |
name: install-${{ matrix.CC }}-eic-shell-Release-${{ env.platform }}-${{ env.release }} | |
- name: Unarchive install directory | |
run: tar -xaf install.tar.zst | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root | |
- uses: cvmfs-contrib/github-action-cvmfs@v4 | |
- 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/eicmkplugin.py MyCustomPlugin | |
cmake -S MyCustomPlugin -B MyCustomPlugin/build -DEICrecon_ROOT=$PWD/install -DUSER_PLUGIN_OUTPUT_DIRECTORY=$PWD/install/lib/EICrecon/plugins | |
cmake --build MyCustomPlugin/build -j $(getconf _NPROCESSORS_ONLN) --target install | |
$PWD/install/bin/eicrecon $JANA_OPTIONS -Pplugins=MyCustomPlugin -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 -Pdump_flags:json=${{ matrix.particle }}_${{ matrix.detector_config }}_flags.json | |
eicrecon-test-plugins: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
- npsim-gun | |
strategy: | |
matrix: | |
CC: [gcc] | |
particle: [e] | |
detector_config: [craterlake] | |
test_plugins: | |
- geometry_navigation_test | |
- tracking_test | |
- track_propagation_test | |
steps: | |
- name: mmap rnd_bits workaround | |
# https://github.com/actions/runner/issues/3207#issuecomment-2000066889 | |
run: | | |
sudo sysctl -w vm.mmap_rnd_bits=28 | |
- name: Checkout .github | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: .github | |
- name: Download install directory | |
uses: actions/download-artifact@v4 | |
with: | |
name: install-${{ matrix.CC }}-eic-shell-Release-${{ env.platform }}-${{ env.release }} | |
- name: Unarchive install directory | |
run: tar -xaf install.tar.zst | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root | |
- uses: cvmfs-contrib/github-action-cvmfs@v4 | |
- 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 $JANA_OPTIONS -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 -Pplugins=dump_flags,janadot -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 }}_${{ 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-latest | |
needs: | |
- build | |
- npsim-gun | |
strategy: | |
matrix: | |
CC: [gcc] | |
particle: [e] | |
detector_config: [craterlake] | |
benchmark_plugins: | |
- EcalBarrelScFiCheck | |
- femc_studies | |
- lfhcal_studies | |
- tof_efficiency | |
- TRACKINGcheck | |
- tracking_efficiency | |
- tracking_occupancy | |
steps: | |
- name: mmap rnd_bits workaround | |
# https://github.com/actions/runner/issues/3207#issuecomment-2000066889 | |
run: | | |
sudo sysctl -w vm.mmap_rnd_bits=28 | |
- name: Checkout .github | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: .github | |
- name: Download install directory | |
uses: actions/download-artifact@v4 | |
with: | |
name: install-${{ matrix.CC }}-eic-shell-Release-${{ env.platform }}-${{ env.release }} | |
- name: Unarchive install directory | |
run: tar -xaf install.tar.zst | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root | |
- uses: cvmfs-contrib/github-action-cvmfs@v4 | |
- 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 $JANA_OPTIONS -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 -Pplugins=dump_flags,janadot -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 }}_${{ 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-latest | |
needs: | |
- build | |
- npsim-gun | |
strategy: | |
matrix: | |
CC: [clang] | |
particle: [pi, e] | |
detector_config: [craterlake] | |
steps: | |
- name: mmap rnd_bits workaround | |
# https://github.com/actions/runner/issues/3207#issuecomment-2000066889 | |
run: | | |
sudo sysctl -w vm.mmap_rnd_bits=28 | |
- name: Checkout .github | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: .github | |
- name: Download install directory | |
uses: actions/download-artifact@v4 | |
with: | |
name: install-${{ matrix.CC }}-eic-shell-Release-${{ env.platform }}-${{ env.release }} | |
- name: Uncompress install directory | |
run: tar -xaf install.tar.zst | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root | |
- uses: cvmfs-contrib/github-action-cvmfs@v4 | |
- 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 $JANA_OPTIONS -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@v6 | |
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-latest | |
needs: | |
- build | |
- npsim-gun-EcalLumiSpec | |
strategy: | |
matrix: | |
CC: [clang] | |
particle: [e] | |
detector_config: [ip6_extended] | |
steps: | |
- name: mmap rnd_bits workaround | |
# https://github.com/actions/runner/issues/3207#issuecomment-2000066889 | |
run: | | |
sudo sysctl -w vm.mmap_rnd_bits=28 | |
- name: Checkout .github | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: .github | |
- name: Download install directory | |
uses: actions/download-artifact@v4 | |
with: | |
name: install-${{ matrix.CC }}-eic-shell-Release-${{ env.platform }}-${{ env.release }} | |
- name: Unarchive install directory | |
run: tar -xaf install.tar.zst | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sim_${{ matrix.particle }}_EcalLumiSpec_${{ matrix.detector_config }}.edm4hep.root | |
- uses: cvmfs-contrib/github-action-cvmfs@v4 | |
- 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 $JANA_OPTIONS -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-latest | |
needs: | |
- build | |
- npsim-dis | |
- npsim-minbias | |
strategy: | |
matrix: | |
include: | |
- CC: clang | |
beam: 5x41 | |
minq2: 0 | |
detector_config: craterlake_5x41 | |
- CC: clang | |
beam: 10x100 | |
minq2: 0 | |
detector_config: craterlake | |
- CC: clang | |
beam: 18x275 | |
minq2: 0 | |
detector_config: craterlake_18x275 | |
- CC: clang | |
beam: 10x100 | |
minq2: 1000 | |
detector_config: craterlake_tracking_only | |
- CC: clang | |
beam: 18x275 | |
minq2: 1000 | |
detector_config: craterlake_18x275 | |
steps: | |
- name: mmap rnd_bits workaround | |
# https://github.com/actions/runner/issues/3207#issuecomment-2000066889 | |
run: | | |
sudo sysctl -w vm.mmap_rnd_bits=28 | |
- name: Checkout .github | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: .github | |
- name: Download install directory | |
uses: actions/download-artifact@v4 | |
with: | |
name: install-${{ matrix.CC }}-eic-shell-Release-${{ env.platform }}-${{ env.release }} | |
- name: Unarchive install directory | |
run: tar -xaf install.tar.zst | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}.edm4hep.root | |
- uses: cvmfs-contrib/github-action-cvmfs@v4 | |
- 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 }}.prmon.json -- \ | |
$PWD/install/bin/eicrecon $JANA_OPTIONS -Ppodio:output_file=rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.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 }}.edm4eic.root | |
path: rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.edm4eic.root | |
if-no-files-found: error | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.prmon.json | |
path: rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ 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_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ 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_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.svg | |
continue-on-error: true | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.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 }} | |
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 }} | |
path: | | |
*.ply | |
if-no-files-found: error | |
- name: Download previous artifact | |
id: download_previous_artifact | |
uses: dawidd6/action-download-artifact@v6 | |
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 }}.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 }}.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 }}.edm4eic.root new/rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.edm4eic.root | |
mv capybara-reports rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }} | |
touch .rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.capy | |
path: | | |
.rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }} | |
rec_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}/ | |
if-no-files-found: error | |
trigger-container: | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name != 'merge_group' && github.event_name != 'schedule' && github.actor != 'dependabot[bot]' }} | |
needs: | |
- eicrecon-gun | |
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-latest | |
needs: | |
- eicrecon-gun | |
- eicrecon-dis | |
steps: | |
- uses: actions/checkout@v4 | |
- 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@v4 | |
with: | |
name: jana.dot | |
path: publishing_docs/dot/ | |
- 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: | |
runs-on: ubuntu-latest | |
outputs: | |
json: ${{ steps.remap.outputs.json }} | |
steps: | |
- uses: octokit/[email protected] | |
id: query | |
with: | |
route: GET /repos/${{ github.repository }}/pulls?state=open | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Remap open PRs | |
id: remap | |
uses: nickofthyme/object-remap@v2 | |
with: | |
__case: snake | |
include.*.pr: ${{ toJSON(fromJSON(steps.query.outputs.data).*.number) }} | |
include.*.head_sha: ${{ toJSON(fromJSON(steps.query.outputs.data).*.head.sha) }} | |
get-docs-from-open-prs: | |
runs-on: ubuntu-latest | |
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@v6 | |
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@v4 | |
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@v6 | |
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@v4 | |
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-latest | |
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@v6 | |
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@v4 | |
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@v6 | |
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@v4 | |
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-latest | |
needs: | |
- get-docs-from-main | |
- get-docs-from-open-prs | |
steps: | |
- name: Merge GitHub Pages staging artifact | |
# FIXME pinned per https://github.com/actions/upload-artifact/issues/485#issuecomment-2271527517 | |
# to avoid https://github.com/eic/EICrecon/actions/runs/10486195490/job/29045183375#step:2:111 | |
uses: actions/upload-artifact/[email protected] | |
with: | |
name: github-pages-staging | |
pattern: | | |
github-pages-staging-* | |
delete-merged: true | |
- name: Download GitHub Pages staging artifact | |
uses: actions/download-artifact@v4 | |
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@v3 | |
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-latest | |
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@v3 | |
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@v4 | |
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@v4 | |
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 |