From e45ba7e38f4160cd0f69b1485e63a0754c859294 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 29 Feb 2024 08:21:48 -0800 Subject: [PATCH] Generalize GHA selectors for pure Python testing (#575) To eliminate hard-coding, generalize the GHA workflow logic to select one build for testing. This should simplify future cuxfilter updates. xref: https://github.com/rapidsai/build-planning/issues/25 Authors: - https://github.com/jakirkham - Ajay Thorve (https://github.com/AjayThorve) Approvers: - Ray Douglass (https://github.com/raydouglass) - Ajay Thorve (https://github.com/AjayThorve) URL: https://github.com/rapidsai/cuxfilter/pull/575 --- .github/workflows/build.yaml | 3 ++- .github/workflows/pr.yaml | 6 ++++-- .github/workflows/test.yaml | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3b8292c9..faae9637 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -66,7 +66,8 @@ jobs: sha: ${{ inputs.sha }} date: ${{ inputs.date }} script: ci/build_wheel.sh - matrix_filter: map(select(.ARCH == "amd64" and .PY_VER == "3.11" and (.CUDA_VER == "11.8.0" or .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 1aaacde0..87e5e75d 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -64,7 +64,8 @@ jobs: with: build_type: pull-request script: ci/build_wheel.sh - matrix_filter: map(select(.ARCH == "amd64" and .PY_VER == "3.11" and (.CUDA_VER == "11.8.0" or .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-tests: needs: wheel-build secrets: inherit @@ -72,4 +73,5 @@ jobs: with: build_type: pull-request script: ci/test_wheel.sh - matrix_filter: map(select(.ARCH == "amd64" and .PY_VER == "3.11" and (.CUDA_VER == "11.8.0" or .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))]) | [.] diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 09294752..31e0c29e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -31,4 +31,5 @@ jobs: date: ${{ inputs.date }} sha: ${{ inputs.sha }} script: ci/test_wheel.sh - matrix_filter: map(select(.ARCH == "amd64" and .PY_VER == "3.11" and (.CUDA_VER == "11.8.0" or .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))]) | [.]