Skip to content

ENH: Add platform-specific package install inputs and OS selection#125

Open
hjmjohnson wants to merge 1 commit intov5.4.6from
add-apt-packages-input
Open

ENH: Add platform-specific package install inputs and OS selection#125
hjmjohnson wants to merge 1 commit intov5.4.6from
add-apt-packages-input

Conversation

@hjmjohnson
Copy link
Copy Markdown
Member

@hjmjohnson hjmjohnson commented Apr 3, 2026

Summary

Add four optional inputs to the CXX build reusable workflow so that remote
modules with external system-library or platform dependencies can keep using
the standard reusable workflow instead of rolling their own:

  • apt-packages — system packages installed via apt-get on Linux runners
  • brew-packages — system packages installed via brew on macOS runners
  • choco-packages — system packages installed via choco on Windows runners
  • os-list — JSON array of runner OS labels to build on (lets modules
    disable platforms that can't work, e.g., macOS for a CUDA module)

Motivation

Modules like ITKIOOpenSlide
require system libraries (e.g., libopenslide-dev) that are not available
on standard GitHub Actions runners. Previously, these modules had to either:

With this change, they can simply pass
apt-packages: 'libopenslide-dev' (plus the matching brew-packages /
choco-packages where applicable) to the reusable workflow.

Usage

jobs:
  cxx-build-workflow:
    uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@v5.4.6
    with:
      apt-packages: 'libopenslide-dev'
      brew-packages: 'openslide'
      os-list: '["ubuntu-22.04", "macos-15-intel", "macos-15"]'

Multiple packages can be space-separated:
apt-packages: 'libopenslide-dev libfftw3-dev'.

Details

  • Packages are installed via sudo apt-get install -y -qq (Linux),
    brew install (macOS), or choco install -y (Windows)
  • The install step is skipped on runners that don't match the input's
    platform (e.g., apt-packages is a no-op on macOS/Windows)
  • The step is skipped entirely when the corresponding input is not
    provided — no impact on existing modules
  • README's short "Example Usage" block now documents the explicit
    secrets: pypi_password: ${{ secrets.pypi_password }} whitelist
    form, matching the detailed breakdown later in the same README and
    following the principle of least privilege rather than
    secrets: inherit

Test plan

🤖 Generated with Claude Code

Copy link
Copy Markdown
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

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

Looks good.

Copy link
Copy Markdown
Member

@thewtex thewtex left a comment

Choose a reason for hiding this comment

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

@hjmjohnson thanks!!

A change requested inline.

@hjmjohnson hjmjohnson force-pushed the add-apt-packages-input branch 2 times, most recently from d346e0c to c60f9d2 Compare April 10, 2026 22:24
@hjmjohnson hjmjohnson changed the title ENH: Add apt-packages input for installing system dependencies ENH: Add platform-specific package install inputs and OS selection Apr 10, 2026
Add optional inputs to the CXX build workflow:

- apt-packages: Install system packages on Linux (apt-get)
- brew-packages: Install system packages on macOS (brew)
- choco-packages: Install system packages on Windows (choco)
- os-list: JSON array of runner OS labels to build on, allowing
  modules to disable platforms that cannot work

Update README with:
- Short "Example Usage" block showing the typical jobs section,
  preserving the pre-existing explicit secrets whitelist form
  (secrets: pypi_password: ${{ secrets.pypi_password }}) as the
  documented default
- Example for modules with external system dependencies
- Updated workflow ref from @main to @v5.4.6

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hjmjohnson hjmjohnson force-pushed the add-apt-packages-input branch from c60f9d2 to f121f5a Compare April 10, 2026 22:36
@hjmjohnson hjmjohnson requested a review from thewtex April 10, 2026 22:38
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