Skip to content

make matrix type configurable#308

Merged
jameslamb merged 7 commits intobranch-25.04from
customize-matrix
Mar 19, 2025
Merged

make matrix type configurable#308
jameslamb merged 7 commits intobranch-25.04from
customize-matrix

Conversation

@jameslamb
Copy link
Copy Markdown
Member

@jameslamb jameslamb commented Mar 18, 2025

Closes rapidsai/build-planning#158

Today, the matrix (combinations of job variants) for testing workflows is determined by the "build_type" (one of "branch", "nightly", or "pull-request").

This proposes:

  • making the matrix selection configurable
    • so you could for example achieve behavior like "run the nightly test matrix in PR CI"
  • adding descriptions on the enum-like inputs, listing the valid values
  • expanding input validation
    • to ensure unexpected values result in an immediate, clear, loud error

Notes for Reviewers

How I tested this

See the comments on this PR I used to test: rapidsai/rmm#1865

@jameslamb jameslamb added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Mar 18, 2025
Comment thread .github/workflows/conda-cpp-build.yaml Outdated
options:
- branch
- nightly
- pull-request
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sad, looks like choice inputs can't be used with the workflow_call trigger

I'd hoped we could use GitHub Actions choice type to implement enum-like behavior (GitHub docs), so that matrix_type and other inputs didn't have to be arbitrary strings.

Looks like that's not possible 😭

The workflow is not valid. In .github/workflows/pr.yaml (Line: 89, Col: 11): Error from called workflow rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@customize-matrix (Line: 6, Col: 15): Unexpected value 'choice' In .github/workflows/pr.yaml (Line: 89, Col: 11): Error from called workflow rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@customize-matrix (Line: 7, Col: 9): Unexpected value 'options'

(run link from RMM test PR)

To be fair, actionlint also reported that but I'd hoped (naively) that it was just wrong or maybe confused because these are shared workflows. Sigh 😭

@jameslamb jameslamb changed the title WIP: make matrix type configurable make matrix type configurable Mar 18, 2025
@jameslamb jameslamb requested review from ajschmidt8 and vyasr March 18, 2025 17:35
@jameslamb jameslamb marked this pull request as ready for review March 18, 2025 17:35
@jameslamb jameslamb requested a review from a team as a code owner March 18, 2025 17:35
Copy link
Copy Markdown
Member

@ajschmidt8 ajschmidt8 left a comment

Choose a reason for hiding this comment

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

I left a comment on .github/workflows/conda-cpp-tests.yaml, but it's relevant to all the test workflow changes.

Comment thread .github/workflows/conda-cpp-tests.yaml
Comment thread .github/workflows/conda-cpp-tests.yaml Outdated
Comment thread .github/workflows/conda-cpp-tests.yaml
Copy link
Copy Markdown
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

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

Logic looks fine to me.

Comment thread .github/workflows/conda-cpp-tests.yaml Outdated
@jameslamb jameslamb merged commit 0c676ba into branch-25.04 Mar 19, 2025
1 check passed
@jameslamb jameslamb deleted the customize-matrix branch March 19, 2025 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add options to workflows to use nightly matrices in PRs

3 participants