Skip to content

Migrate from make to cmake and add GitHub Actions CI workflow#123

Open
slanzi00 wants to merge 12 commits intomainfrom
47-continuous-integration
Open

Migrate from make to cmake and add GitHub Actions CI workflow#123
slanzi00 wants to merge 12 commits intomainfrom
47-continuous-integration

Conversation

@slanzi00
Copy link
Copy Markdown
Member

@slanzi00 slanzi00 commented Feb 27, 2026

This merge resolves #11 and #123.

#11 — CMake migration: The fragile GNU Make build has been replaced with a proper CMake setup. UPS packages are now wrapped in INTERFACE IMPORTED targets (deps::hdf5, deps::genie, etc.), build artifacts are isolated under build/ for out-of-source builds, and the version is derived automatically from git describe --tags. Optional features are exposed as CMake options (ENABLE_TMS, ENABLE_TESTEXE), SANDReco auto-detection is expressed as a proper if(DEFINED ENV{...}) block, and the warning set has been significantly expanded beyond the previous -Wall only.

#123 — CI & fixes: Integrated the CMake build system from branch 11-build-is-very-fragile, added .github/workflows/ci.yml to build on every push and PR using Apptainer + CVMFS inside the fnal-wn-sl7 SL7 container, and fixed a compilation error in SANDRecoBranchFiller.cxx where the no-SAND stub for GetTriggers was missing the bool beamOnly parameter, causing a signature mismatch with the header.

Samuele Lanzi and others added 9 commits February 25, 2026 11:08
Replace Makefile and src/Makefile with a modern CMake build system (≥3.20)
that produces the same artifacts: libND_CAFMaker.so, makeCAF, and optionally
testHDF.
- Version derived from git tags instead of hardcoded
- ROOT uses imported targets (ROOT::*) instead of root-config flags
- find_ups_package() calls expanded to multi-line keyword style
- Add .cmake-format.yaml with find_ups_package() signature
- Extract find_ups_package() helper into cmake/FindUPSPackage.cmake
- Drop the RelWithDebInfo CMAKE_BUILD_TYPE default
- Replace -Wall with a full set of warning flags (-Wextra, -Wpedantic,
  -Wconversion, -Wsign-conversion, -Wshadow, etc.)
- Add ASan + UBSan for Debug builds, with _GLIBCXX_SANITIZE_STD_ALLOCATOR
  on GCC
- Add "Build environment" section documenting the required Singularity
  image (fnal-wn-sl7:latest) and ndcaf_setup.sh step before CMake
Integrate CMake build system from branch 11-build-is-very-fragile.
Resolves conflict by accepting deletion of src/Makefile (superseded by CMake).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@slanzi00 slanzi00 linked an issue Feb 27, 2026 that may be closed by this pull request
@slanzi00 slanzi00 closed this Feb 27, 2026
@slanzi00 slanzi00 reopened this Feb 27, 2026
@slanzi00 slanzi00 requested a review from chenel February 27, 2026 19:15
Copy link
Copy Markdown
Collaborator

@chenel chenel left a comment

Choose a reason for hiding this comment

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

This is brilliant, thanks so much for implementing it. Bravo! 👏🏻

This will be a large-scale breaking change for a number of workflows, so we'll need to make sure we shop it around before merging it. Stakeholders I can think of:

  • 2x2 production
  • ND Reco/Sim production
  • Expert ND_CAFMaker users from ND-LAr/2x2, TMS, SAND

We should start by discussing this at a ND CAFMaker scrum on a Wednesday and discuss the plan there. So I won't approve it yet, not because I think there's anything wrong with it necessarily, but just to make sure nobody accidentally clicks "merge" before we are ready.

Once the CI workflow part of this PR works, I imagine making it a requirement that CI pass before a PR can be merged, which would be a dream come true. (Even more than that, I imagine adding a testing CI workflow to ensure that future changes don't break the output except when we intend to. Etc. But obviously that's not for this PR.)

@slanzi00 slanzi00 changed the title Add GitHub Actions CI workflow Migrate from make to cmake and add GitHub Actions CI workflow Mar 20, 2026
@alexbooth92
Copy link
Copy Markdown
Member

This will be a large-scale breaking change for a number of workflows, so we'll need to make sure we shop it around before merging it. Stakeholders I can think of:

  • 2x2 production
  • ND Reco/Sim production
  • Expert ND_CAFMaker users from ND-LAr/2x2, TMS, SAND

From the ND Prod side, I've made a few changes to the run and install scripts in this (currently draft) PR.

@LiamOS
Copy link
Copy Markdown
Member

LiamOS commented Mar 23, 2026

I just merged the latest TMS changes with this branch and have no issues building and running with CMake. Lovely work!

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.

Continuous integration build is very fragile

4 participants