Skip to content

Commit

Permalink
update CI matrix selectors (#28)
Browse files Browse the repository at this point in the history
Contributes to rapidsai/build-planning#25.
Contributes to rapidsai/build-planning#3.

This project uses a `jq` filter in its GitHub Actions configuration to
select exactly 1 combination of `(architecture, Python version, CUDA
version)` for each of its CI jobs.

This PR proposes removing string literals referencing specific versions,
so that the configuration won't have to be updated in the future as
RAPIDS changes its supported matrix of Python and CUDA versions.

Credit for this to @bdice / @ajschmidt8 :
rapidsai/build-planning#25 (comment).
I'm just clicking the buttons 😁
  • Loading branch information
jameslamb authored Feb 29, 2024
1 parent c32b927 commit f92bec2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
# Package is pure Python and only ever requires one build.
matrix_filter: map(select(.ARCH == "amd64" and .PY_VER == "3.10" and .CUDA_VER == "12.0.1"))
# This selects "ARCH=amd64 + the latest supported Python + CUDA".
matrix_filter: map(select(.ARCH == "amd64")) | max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]) | [.]
upload-conda:
needs: python-build
secrets: inherit
Expand All @@ -55,7 +56,8 @@ jobs:
date: ${{ inputs.date }}
script: ci/build_wheel.sh
# Package is pure Python and only ever requires one build.
matrix_filter: map(select(.ARCH == "amd64" and .PY_VER == "3.10" and .CUDA_VER == "12.0.1"))
# This selects "ARCH=amd64 + the latest supported Python + CUDA".
matrix_filter: map(select(.ARCH == "amd64")) | max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]) | [.]
wheel-publish:
needs: wheel-build
secrets: inherit
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ jobs:
with:
build_type: pull-request
# Package is pure Python and only ever requires one build.
matrix_filter: map(select(.ARCH == "amd64" and .PY_VER == "3.10" and .CUDA_VER == "12.0.1"))
# This selects "ARCH=amd64 + the latest supported Python + CUDA".
matrix_filter: map(select(.ARCH == "amd64")) | max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]) | [.]
wheel-build:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
# Package is pure Python and only ever requires one build.
matrix_filter: map(select(.ARCH == "amd64" and .PY_VER == "3.10" and .CUDA_VER == "12.0.1"))
# This selects "ARCH=amd64 + the latest supported Python + CUDA".
matrix_filter: map(select(.ARCH == "amd64")) | max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]) | [.]
script: "ci/build_wheel.sh"

0 comments on commit f92bec2

Please sign in to comment.