Skip to content

CI: add standalone build+test workflow - #9

Open
gdevenyi wants to merge 1 commit into
BIC-MNI:develop-1.9.18from
gdevenyi:ci-workflow
Open

gdevenyi wants to merge 1 commit into
BIC-MNI:develop-1.9.18from
gdevenyi:ci-workflow

Conversation

@gdevenyi

@gdevenyi gdevenyi commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds .github/workflows/ci.yml: a standalone build + test workflow, so EBTKS is verified on its own rather than only as part of the minc-toolkit-v2 superbuild.

Part of a series adding standalone CI to the BIC-MNI submodule repos (see Context). EBTKS is the happy case — it needed no source changes at all, which is not true of its siblings.

What the workflow does

On every branch push and PR, on three platforms:

  • ubuntu:24.04 container
  • fedora:44 container
  • macOS (arm64)

each job: build libminc from source → configure + build + install EBTKS → run the ctest suite. Mirrors the superbuild CI in minc-toolkit-v2 (same containers, ccache, concurrency cancellation, least-privilege permissions).

Notes on two choices

Why libminc is built from source, rather than installed from a package: it tracks develop-1.9.18, the branch the superbuild pins, so CI tests the combination that actually ships. The workflow falls back to the default branch if that branch is absent.

Why LIBMINC_DIR is passed explicitly: libminc installs LIBMINCConfig.cmake into <prefix>/lib/cmake/, which is not one of the locations find_package searches under CMAKE_PREFIX_PATH (it expects <prefix>/lib/cmake/<name>/). Without the explicit hint, FIND_PACKAGE(LIBMINC REQUIRED) fails:

Could not find a package configuration file provided by "LIBMINC" with any
of the following names: LIBMINCConfig.cmake, libminc-config.cmake

The workflow locates the installed config and passes -DLIBMINC_DIR=, which is the same thing the superbuild does (-DLIBMINC_DIR:PATH=... in its Build*.cmake modules).

Validation

All 3 jobs green: https://github.com/gdevenyi/EBTKS/actions/runs/29537223797

This run builds libminc from BIC-MNI/develop-1.9.18 as it is today — no dependency on any pending PR. Unlike the other repos in this series, EBTKS builds and tests cleanly against an installed libminc as-is.

Context

Part of a series adding standalone build+test CI to the BIC-MNI submodule repos, mirroring the superbuild CI in minc-toolkit-v2. Sibling PRs carry source fixes for bugs their CI exposed — problems the superbuild masks by staging its own dependencies and compiling from the source tree. Related: BIC-MNI/libminc#150 (the keystone: makes the installed libminc package usable outside the superbuild), BIC-MNI/arguments#2.

🤖 Generated with Claude Code

https://claude.ai/code/session_011nEnygr1q87PepYiJobEGW

Copilot AI review requested due to automatic review settings July 16, 2026 20:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a standalone GitHub Actions CI workflow to build and test EBTKS across Linux containers (Ubuntu/Fedora) and macOS, including building the required BIC-MNI dependency (libminc) from source and wiring it into the consumer CMake configure via explicit *_DIR flags.

Changes:

  • Introduces .github/workflows/ci.yml to run configure/build/install/ctest on push and pull_request.
  • Builds libminc from the develop-1.9.18 branch (with fallback) and installs it under /opt/bic-mni.
  • Adds ccache-based compilation caching across all three OS jobs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml Outdated
Comment on lines +71 to +73
name=$(echo "$dep" | tr '[:lower:]-' '[:upper:]_')
cfg=$(find "$DEPS_PREFIX" -name "${name}Config.cmake" -print -quit)
DEP_DIR_FLAGS="${DEP_DIR_FLAGS:-} -D${name}_DIR=$(dirname "$cfg")"
Comment thread .github/workflows/ci.yml Outdated
Comment on lines +137 to +139
name=$(echo "$dep" | tr '[:lower:]-' '[:upper:]_')
cfg=$(find "$DEPS_PREFIX" -name "${name}Config.cmake" -print -quit)
DEP_DIR_FLAGS="${DEP_DIR_FLAGS:-} -D${name}_DIR=$(dirname "$cfg")"
Comment thread .github/workflows/ci.yml Outdated
Comment on lines +197 to +199
name=$(echo "$dep" | tr '[:lower:]-' '[:upper:]_')
cfg=$(find "$DEPS_PREFIX" -name "${name}Config.cmake" -print -quit)
DEP_DIR_FLAGS="${DEP_DIR_FLAGS:-} -D${name}_DIR=$(dirname "$cfg")"
Comment thread .github/workflows/ci.yml
Comment on lines +42 to +43
- name: Allow git to read the workspace owned by the runner user
run: git config --global --add safe.directory '*'
Comment thread .github/workflows/ci.yml
Comment on lines +108 to +109
- name: Allow git to read the workspace owned by the runner user
run: git config --global --add safe.directory '*'
@gdevenyi
gdevenyi force-pushed the ci-workflow branch 2 times, most recently from 98be62f to c6ba392 Compare July 16, 2026 21:36
Configure, build, install and run the test suite on ubuntu:24.04 and
fedora:44 containers plus macOS, for every push and pull request. BIC-MNI
dependencies are built from source from their develop-1.9.18 branches,
matching what the minc-toolkit-v2 superbuild tracks. Mirrors the
superbuild CI in minc-toolkit-v2.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011nEnygr1q87PepYiJobEGW
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.

2 participants