Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/actions/compute-matrix/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Compute matrix

outputs:
MATRIX:
value: ${{ steps.compute-matrix.outputs.MATRIX }}

runs:
using: composite
steps:
- name: Compute matrix
id: compute-matrix
shell: bash
run: |
set -eo pipefail


# please keep the matrices sorted in ascending order by the following:
#
# [ARCH, PY_VER, CUDA_VER, LINUX_VER]
#
export MATRIX="
# amd64
- { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '11.8.0', LINUX_VER: 'rockylinux8' }
- { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '12.8.0', LINUX_VER: 'rockylinux8' }
- { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '11.8.0', LINUX_VER: 'rockylinux8' }
- { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '12.8.0', LINUX_VER: 'rockylinux8' }
- { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '11.8.0', LINUX_VER: 'rockylinux8' }
- { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '12.8.0', LINUX_VER: 'rockylinux8' }
# arm64
- { ARCH: 'arm64', PY_VER: '3.10', CUDA_VER: '11.8.0', LINUX_VER: 'rockylinux8' }
- { ARCH: 'arm64', PY_VER: '3.10', CUDA_VER: '12.8.0', LINUX_VER: 'rockylinux8' }
- { ARCH: 'arm64', PY_VER: '3.11', CUDA_VER: '11.8.0', LINUX_VER: 'rockylinux8' }
- { ARCH: 'arm64', PY_VER: '3.11', CUDA_VER: '12.8.0', LINUX_VER: 'rockylinux8' }
- { ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '11.8.0', LINUX_VER: 'rockylinux8' }
- { ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '12.8.0', LINUX_VER: 'rockylinux8' }
"

MATRIX="$(
yq -n -o json 'env(MATRIX)' | \
jq -c "${MATRIX_FILTER} | if (. | length) > 0 then {include: .} else \"Error: Empty matrix\n\" | halt_error(1) end"
)"

echo "MATRIX=${MATRIX}" | tee --append "${GITHUB_OUTPUT}"
24 changes: 20 additions & 4 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ concurrency:
jobs:
pr-builder:
needs:
- checks
- compute-matrix
- build
- test-conda-nightly-env
secrets: inherit
Expand All @@ -23,17 +25,31 @@ jobs:
with:
fetch-depth: 1
- uses: pre-commit/action@v3.0.1
compute-matrix:
runs-on: ubuntu-latest
outputs:
BUILD_MATRIX: ${{ steps.compute-matrix.outputs.BUILD_MATRIX }}
TEST_MATRIX: ${{ steps.compute-matrix.outputs.TEST_MATRIX }}
steps:
- uses: actions/checkout@v4
- name: Compute Build Matrix
id: compute-matrix
uses: ./.github/actions/compute-matrix
build:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-25.06
with:
build_type: pull-request
test-conda-nightly-env:
needs: checks
name: "Test conda nightly env: ${{ matrix.CUDA_VER }}, ${{ matrix.PY_VER }}, ${{ matrix.ARCH }}, ${{ matrix.LINUX_VER }}"
needs: [checks, compute-matrix]
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.compute-matrix.outputs.MATRIX) }}
runs-on: "linux-${{ matrix.ARCH }}-cpu8"
secrets: inherit
# We use a build workflow so that we get CPU jobs and high matrix coverage
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-25.06
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.06
with:
build_type: pull-request
script: "ci/test_conda_nightly_env.sh"
run_script: "ci/test_conda_nightly_env.sh"