Skip to content

ci: add npsim and eicrecon benchmark jobs#253

Merged
wdconinc merged 3 commits intomasterfrom
capybara
Apr 25, 2026
Merged

ci: add npsim and eicrecon benchmark jobs#253
wdconinc merged 3 commits intomasterfrom
capybara

Conversation

@wdconinc
Copy link
Copy Markdown
Contributor

Summary

Add four benchmark jobs to the CI workflow that run after the eic-manifest job inside the freshly-built eic_ci container:

Job Description
npsim-gun Particle gun simulation: π, e × epic_craterlake
npsim-dis DIS simulation: 5 beam/minQ² combos × epic_craterlake
eicrecon-gun Reconstruction of gun simulation output
eicrecon-dis Reconstruction of DIS simulation output

The file matrix matches the epic repository capybara benchmarks (not the larger EICrecon set). No simulation caching — every run regenerates artifacts fresh.

Technical details

  • Container image: ghcr.io/eic/eic_ci:pipeline-${{ github.run_id }} (the image built in the same CI run)
  • Shell: bash --login -eo pipefail to source /etc/profile.d/z21_epic_main.sh and set $DETECTOR_PATH, $DETECTOR, $DETECTOR_CONFIG
  • Artifacts uploaded: sim_*.edm4hep.root / rec_*.edm4eic.root per job matrix entry

Follow-up

A second PR (branch capybara-compare) adds capybara bara comparison steps and a merge-capybara report job on top of this branch, to be opened after this PR merges.

Add four benchmark jobs to the build-push workflow that run inside
the freshly-built eic_ci container to validate that container image
changes do not silently alter physics output:

- npsim-gun: particle gun simulation (pi, e × epic_craterlake)
- npsim-dis: DIS simulation (5 beam/minQ2 combos × epic_craterlake)
- eicrecon-gun: reconstruction of gun sim output
- eicrecon-dis: reconstruction of DIS sim output

All jobs run after eic-manifest using the pipeline-tagged eic_ci image,
use a login shell (bash --login) to source profile.d detector setup, and
upload artifacts for use in the follow-up capybara comparison PR.

File matrix matches epic (not the larger EICrecon set). No caching.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 23, 2026 23:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds CI benchmark coverage for EPIC’s capybara-style workflows by running npsim simulations and EICrecon reconstruction inside the freshly built eic_ci container image produced in the same workflow run.

Changes:

  • Add npsim-gun and npsim-dis matrix jobs to generate small simulation outputs.
  • Add eicrecon-gun and eicrecon-dis matrix jobs to reconstruct the corresponding simulation artifacts.
  • Upload/download EDM4hep/EDM4eic ROOT artifacts between jobs.

Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
The z21_epic_main.sh workaround uses eval to export only 4 env vars,
missing LD_LIBRARY_PATH additions from thisepic.sh. This causes
epic_FileLoader to not be found when npsim parses the compact XML.

Explicitly source /opt/detector/epic-main/bin/thisepic.sh before
running npsim and eicrecon in all four benchmark jobs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 24, 2026 00:11
@wdconinc wdconinc requested a review from veprbl April 24, 2026 00:12
Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
Copilot AI review requested due to automatic review settings April 24, 2026 00:16
@wdconinc wdconinc enabled auto-merge (squash) April 24, 2026 00:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.

Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
* ci: add capybara artifact comparisons to benchmark jobs

For each of the four benchmark jobs (npsim-gun, npsim-dis, eicrecon-gun,
eicrecon-dis), add after the artifact upload:

1. Download the previous artifact from the base branch using
   dawidd6/action-download-artifact@v20
2. Run 'capybara bara' to compare current output against the reference
3. Upload a .capy artifact containing the comparison reports

Add a merge-capybara job that combines all *.capy artifacts into a
single capybara-report artifact for easy consumption.

This PR should be opened after the npsim/eicrecon benchmarks PR merges
to master, so that the base-branch artifacts exist as reference.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* ci: trigger benchmarks on pull_request to any branch

Remove the 'branches: [master]' filter from the pull_request trigger
so that the benchmark jobs (including capybara comparisons) also fire
on PRs targeting capybara or any other branch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 24, 2026 17:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 8 comments.

Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
Comment thread .github/workflows/build-push.yml
@wdconinc wdconinc merged commit f0ff156 into master Apr 25, 2026
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants