From 6be9df925c0024bc83619b39b185379a9ca35a52 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 29 Feb 2024 15:48:36 -0800 Subject: [PATCH] Generalize GHA selectors for pure Python testing (#1318) To eliminate hard-coding, generalize the GHA workflow logic to select one build for testing. This should simplify future Dask-CUDA updates. xref: https://github.com/rapidsai/build-planning/issues/25 Authors: - https://github.com/jakirkham Approvers: - AJ Schmidt (https://github.com/ajschmidt8) - Ray Douglass (https://github.com/raydouglass) URL: https://github.com/rapidsai/dask-cuda/pull/1318 --- .github/workflows/build.yaml | 3 ++- .github/workflows/pr.yaml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f77c3d3fe..5e63e62d4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -67,7 +67,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.11" and .CUDA_VER == "12.2.2")) + # 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 diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 9fdfccc0c..c63386567 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -50,5 +50,6 @@ 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.11" and .CUDA_VER == "12.2.2")) + # 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"