From d02c2b4a10bf09da7ff260f1634f1dbc61497760 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Wed, 28 Feb 2024 17:29:21 -0800 Subject: [PATCH] Generalize GHA selectors for pure Python testing To eliminate hard-coding, generalize the GHA workflow logic to select one build for testing. This should simplify future Dask-CUDA updates. --- .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 f77c3d3f..5e63e62d 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 9fdfccc0..c6338656 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"