Skip to content

ci: expand image build matrix and align PR, push, and release workflows#244

Open
plexoos wants to merge 4 commits intomainfrom
pr/update-workflow-matrix
Open

ci: expand image build matrix and align PR, push, and release workflows#244
plexoos wants to merge 4 commits intomainfrom
pr/update-workflow-matrix

Conversation

@plexoos
Copy link
Member

@plexoos plexoos commented Mar 25, 2026

This PR updates the container build workflows to use explicit build variants instead of relying on default Docker build arguments, and aligns image tagging across PR, push, and release jobs.

Why

Previously, the PR workflow only varied target, so builds implicitly depended on Dockerfile defaults for OS, CUDA, and OptiX. This change makes the tested and published build variants explicit, improves tag clarity, and keeps the PR smoke and test jobs aligned with the supported image combinations.

Notes

  • PR release smoke now runs the same variant set as develop test, but on GitHub-hosted Ubuntu since it only builds and does not require GPU execution
  • develop test image tags now include Geant4 so each tested variant is uniquely identified

Copilot AI review requested due to automatic review settings March 25, 2026 23:38
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b53e931a83

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +67 to +70
build-args: |
OS=${{ matrix.os }}
CUDA_VERSION=${{ matrix.cuda_version }}
OPTIX_VERSION=${{ matrix.optix_version }}

Choose a reason for hiding this comment

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

P1 Badge Pass Geant4 version when publishing develop images

The PR workflow now validates the CUDA 13 / Ubuntu 24.04 develop variant with geant4_version: 11.4.1, but this publish step does not pass GEANT4_VERSION, so Docker falls back to the Dockerfile default (11.3.2). As a result, the pushed cuda-13.0.2-.../devel images are built from a different dependency stack than the one exercised in PR CI, which can let regressions ship even when PR checks are green.

Useful? React with 👍 / 👎.

Comment on lines 64 to 66
OS=${{ matrix.os }}
CUDA_VERSION=${{ matrix.cuda_version }}
OPTIX_VERSION=${{ matrix.optix_version }}

Choose a reason for hiding this comment

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

P2 Badge Pin release image toolchain args explicitly

This release build now omits GEANT4_VERSION and CMAKE_VERSION, so versioned release tags are no longer tied to an explicit toolchain and instead drift with future Dockerfile default changes. It also creates an immediate matrix mismatch: PR release-smoke for the same CUDA/OS/OptiX tuple is configured with Geant4 11.4.1, while this release job will currently build with the default 11.3.2.

Useful? React with 👍 / 👎.

Copy link
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

Updates the container build GitHub Actions workflows to make build variants (OS/CUDA/OptiX/Geant4) explicit in PR testing and to standardize image tag structure across PR, branch-push, and release builds.

Changes:

  • Expand the PR workflow into explicit build matrices for a release “smoke build” and develop “build+test” across multiple OS/CUDA/OptiX/Geant4 combinations.
  • Update push/release tagging to include CUDA/OS/OptiX details and add CUDA-major short tags; add a devel alias for the default CUDA major on pushes.
  • Simplify the release workflow by removing explicit Geant4/CMake matrix/build-args (falling back to Dockerfile defaults).

Reviewed changes

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

File Description
.github/workflows/build-pull-request.yaml Adds explicit build variants, a release smoke build, and develop tests with variant-specific tags and caching.
.github/workflows/build-push.yaml Switches from target-based tags to variant tags + CUDA-major short tags; adds devel alias tagging.
.github/workflows/release.yaml Aligns release tags with the new variant-based scheme and removes Geant4/CMake build-args from the release job.

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

Comment on lines +76 to +77
cache-from: type=gha,scope=build-release-smoke-${{ matrix.os }}-cuda-${{ matrix.cuda_version }}-optix-${{ matrix.optix_version }}-geant4-${{ matrix.geant4_version }}
cache-to: type=gha,mode=max,scope=build-release-smoke-${{ matrix.os }}-cuda-${{ matrix.cuda_version }}-optix-${{ matrix.optix_version }}-geant4-${{ matrix.geant4_version }}
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

Using cache-from/cache-to: type=gha requires permissions: actions: write (and contents: read) for the workflow/job; otherwise cache export/import can fail. Also, for PRs from forks the token can’t be granted write perms, so consider guarding cache-to behind a non-fork condition (or skipping export on forks).

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

Comment on lines 61 to 66
tags: |
ghcr.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
docker.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
ghcr.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
ghcr.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG_SHORT }}
docker.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
docker.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG_SHORT }}
target: ${{ matrix.target }}
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

This workflow used to push simple tags like develop/latest (based on the target). With the new tagging, only variant tags plus cuda<major> are pushed, so :develop and :latest won’t be updated anymore. If anything consumes those tags, consider keeping them as additional alias tags (or updating consumers in the same PR).

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Copilot AI commented Mar 26, 2026

@plexoos I've opened a new pull request, #246, to work on those changes. Once the pull request is ready, I'll request review from you.

@plexoos plexoos force-pushed the pr/update-workflow-matrix branch from 00a088e to a8968ce Compare March 26, 2026 23:40
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