Skip to content

Test VecGeom 2.3 in CI and move Docker job to ghcr - #52

Open
esseivaju wants to merge 7 commits into
celeritas-project:mainfrom
esseivaju:ci/vecgeom-2.3-spack
Open

esseivaju wants to merge 7 commits into
celeritas-project:mainfrom
esseivaju:ci/vecgeom-2.3-spack

Conversation

@esseivaju

@esseivaju esseivaju commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

As discussed in celeritas-project/celeritas#2705, this tests G4VG against VecGeom 2.3 with the oldest and newest Geant4 versions Celeritas supports (10.5 and 11.4), and moves the Docker CI image to ghcr.

CI coverage after this PR

Workflow VecGeom Geant4 C++ Notes
build-full (debug, ndebug) 2.2 +cuda 11.3 17 ghcr.io/celeritas-project/ci-cuda:2026-11-12
build-spack 2.3 10.5 17 VecGeom built from source
build-spack 2.3 11.4 20 VecGeom built from source
build-spack 1.2.11 11.3 20 Keeps VecGeom 1.x coverage, which the old Docker image provided

build-full: Docker image moved to ghcr

  • docker.io/celeritas/ci-rocky-cuda12:2024-12-29 → ghcr.io/celeritas-project/ci-cuda:2026-11-12 (Ubuntu 24.04, CUDA 13, VecGeom 2.2 +cuda cuda_arch=80, Geant4 11.3).
  • scripts/cmake-presets/ci-rocky-cuda.json is renamed to ci-ubuntu-cuda.json and builds for sm_80, using a new .cuda-ampere preset in CMakePresets.json. CUDA 13 dropped sm_70, and the image's VecGeom device library is built for sm_80.

build-spack: new workflow

  • VecGeom 2.3 isn't released or in Spack yet, so it's built from a pinned commit (9cb15a8a) of the wip/gpu-portability branch (VecGeom MR 1689). When you start the workflow by hand you can pass another commit, or latest for the branch head. Once 2.3.0 is in spack-packages, the pin can become vecgeom@2.3.
  • Geant4, googletest and the build tools are pulled from the Celeritas Spack buildcache, so in practice only VecGeom 2.3 is built from source.
  • The build uses the new presets file scripts/cmake-presets/ci-ubuntu-github.json (clang-18, -Werror, C++ standard from the matrix).
  • pr.yml and push.yml call the new workflow, and the required all check now depends on it.

Files vendored from Celeritas

These were copied from Celeritas develop at celeritas-project/celeritas@db9a1d4e6. The Spack config must match Celeritas's so that dependencies resolve to the same packages as in its buildcache. Differences from the originals:

Unchanged except for the header comment. The header now says where the file came from and that it must stay in sync:

  • scripts/spack/prefs-build.yaml
  • scripts/spack/ext-ubuntu24.yaml

scripts/spack/reqs-ci.yaml. New header comment, plus G4VG's package requirements appended at the end (cmake@3.21:, geant4@10.5:, googletest@1.10:, vecgeom +gdml, the same as in Celeritas's reqs-celer.yaml).

scripts/ci/setup-spack-ci-env.sh. Renames only:

  • CELER_SOURCE_DIR, CELER_SPACK_OPT and CELER_SPACK_VIEW are renamed to G4VG_*.
  • The header comment documents the environment variables.
  • $@ → $* in a log message. The spack add "$@" call is unchanged.

.github/actions/setup-spack/action.yml. Trimmed, with some behaviour changes:

  • Removed:
    • The buildcache push step: G4VG can't push to the Celeritas buildcache.
    • The add-dependent second-environment step and the no-save input: not used here.
  • Concretization: spack concretize instead of --fresh --non-defaults, so specs already in the buildcache are reused.
  • Install: always --use-buildcache=auto. Celeritas uses only on PRs, which would fail here because VecGeom 2.3 has to be built from source.
  • Install prefix padding: always disabled, since it's only needed when pushing to a buildcache.
  • Environment location: $GITHUB_WORKSPACE/spack-env instead of the repository root.
  • Job summary: the installed-package list is always written there. spack debug report and the buildcache listing are dropped.
  • Unchanged: the spack and spack-packages commits, the lockfile cache, and view activation.

scripts/spack/env-ci-base.yaml is new and G4VG-specific: it only lists cmake, ninja and googletest. Geant4 and VecGeom are added per job.

Bug fixes found by the new Geant4 10.5 job

Testing

All jobs passed on esseivaju#1 (same branch) at b114966, which still included the #54 fix.

🤖 Generated with Claude Code

esseivaju and others added 4 commits December 2, 2026 11:09
- Add a spack-based build-spack workflow testing VecGeom 2.3 (pinned
  wip/gpu-portability commit, overridable via workflow_dispatch) against
  Geant4 10.5 and 11.4, plus VecGeom 1.2.11 against Geant4 11.3. The spack
  setup is adapted from Celeritas so that Geant4 is pulled from the
  Celeritas spack buildcache.
- Move the Docker job to ghcr.io/celeritas-project/ci-cuda:2026-11-12
  (VecGeom 2.2 +cuda, CUDA 13) and build for sm_80.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
G4VG supports C++17 (required for Geant4 10.5), where designated
initializers are a -pedantic error under clang.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
G4PVDivision only overrides GetMultiplicity since Geant4 10.6: before
that the base class returns 1, so only one copy of each division was
placed. Use the number of replicas from the replication data instead.
Found by the new Geant4 10.5 CI job (ZnenvTest.default_options).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@esseivaju
esseivaju requested a review from sethrj December 2, 2026 19:55
@esseivaju esseivaju added documentation Improvements or additions to documentation and/or CI enhancement New feature or request labels Dec 2, 2026

@sethrj sethrj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @esseivaju ! Two comments.

Comment thread src/g4vg_impl/Converter.cc Resolved
Comment thread scripts/spack/env-ci-base.yaml Resolved
esseivaju and others added 2 commits December 3, 2026 08:45
This reverts commit b114966, which will be submitted separately. The
Geant4 10.5 job fails ZnenvTest until that fix is merged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@agheata

agheata commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

@esseivaju Thanks for this. One note on the VecGeom pin: 9cb15a8a is reachable only from wip/gpu-portability and wip/hip-backend. MR 1689 is now split (MR 1689 restructuring, MR 1690 HIP); after MR 1689 is squash-merged and its branch deleted, and MR 1690 is rebased onto master, that commit is on no branch or tag, so Spack will likely fail to fetch it. v2.3.0-rc.1 will be tagged on master right after the merge; could the pin move to that tag then (and to vecgeom@2.3 once it is in Spack)? Until then the pin works as is; the branch head (latest) no longer contains the HIP backend, which G4VG does not need.

🤖 Written with Claude Code (Claude Opus 5.5)

@sethrj

sethrj commented Dec 3, 2026

Copy link
Copy Markdown
Member

@agheata I think then this should wait until the namespace refactor is merged. Then we have an actual commit to test against...

@esseivaju

Copy link
Copy Markdown
Member Author

Yes, let's wait until MR 1689 is merged. Then this PR can test against the merged commit. The follow-up #53 waits until MR 1690 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation and/or CI enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants