Skip to content

Commit

Permalink
put matrices in their own files
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-b-miller committed Nov 30, 2023
1 parent 4707292 commit 48fcb94
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 40 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build_matrix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright (c) 2023, NVIDIA CORPORATION.

on:
workflow_call:

jobs:
compute-matrix-build:
runs-on: ubuntu-latest
outputs:
MATRIX: ${{ steps.compute-matrix-build.outputs.MATRIX }}
steps:
- name: Compute Build Matrix
id: compute-matrix-build
run: |
set -eo pipefail
export MATRIX="
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.9', LINUX_VER: 'centos7' }
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.10', LINUX_VER: 'centos7' }
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.9', LINUX_VER: 'rockylinux8' }
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.10', LINUX_VER: 'rockylinux8' }
"
echo "MATRIX=$(
yq -n -o json 'env(MATRIX)' | \
jq -c '.' \
)" | tee --append "${GITHUB_OUTPUT}"
42 changes: 2 additions & 40 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,47 +27,9 @@ jobs:
enable_check_generated_files: false
enable_check_pr_job_dependencies: false
compute-matrix-build:
runs-on: ubuntu-latest
outputs:
MATRIX: ${{ steps.compute-matrix-build.outputs.MATRIX }}
steps:
- name: Compute Build Matrix
id: compute-matrix-build
run: |
set -eo pipefail
export MATRIX="
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.9', LINUX_VER: 'centos7' }
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.10', LINUX_VER: 'centos7' }
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.9', LINUX_VER: 'rockylinux8' }
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.10', LINUX_VER: 'rockylinux8' }
"
echo "MATRIX=$(
yq -n -o json 'env(MATRIX)' | \
jq -c '.' \
)" | tee --append "${GITHUB_OUTPUT}"
uses: ./.github/workflows/build_matrix.yml
compute-matrix-test:
runs-on: ubuntu-latest
outputs:
MATRIX: ${{ steps.compute-matrix-test.outputs.MATRIX }}
steps:
- name: Compute Build Matrix
id: compute-matrix-test
run: |
set -eo pipefail
export MATRIX="
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.9', LINUX_VER: 'ubuntu18.04', gpu: 'v100', driver: 'latest' }
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.10', LINUX_VER: 'ubuntu18.04', gpu: 'v100', driver: 'latest' }
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.9', LINUX_VER: 'ubuntu20.04', gpu: 'a100', driver: 'latest' }
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.10', LINUX_VER: 'ubuntu20.04', gpu: 'a100', driver: 'latest' }
"
echo "MATRIX=$(
yq -n -o json 'env(MATRIX)' | \
jq -c '.' \
)" | tee --append "${GITHUB_OUTPUT}"
uses: ./.github/workflows/test_matrix.yml
build-wheels:
needs:
- compute-matrix-build
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/test_matrix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright (c) 2023, NVIDIA CORPORATION.

on:
workflow_call:

jobs:
compute-matrix-test:
runs-on: ubuntu-latest
outputs:
MATRIX: ${{ steps.compute-matrix-test.outputs.MATRIX }}
steps:
- name: Compute Build Matrix
id: compute-matrix-test
run: |
set -eo pipefail
export MATRIX="
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.9', LINUX_VER: 'ubuntu18.04', gpu: 'v100', driver: 'latest' }
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.10', LINUX_VER: 'ubuntu18.04', gpu: 'v100', driver: 'latest' }
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.9', LINUX_VER: 'ubuntu20.04', gpu: 'a100', driver: 'latest' }
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.10', LINUX_VER: 'ubuntu20.04', gpu: 'a100', driver: 'latest' }
"
echo "MATRIX=$(
yq -n -o json 'env(MATRIX)' | \
jq -c '.' \
)" | tee --append "${GITHUB_OUTPUT}"

0 comments on commit 48fcb94

Please sign in to comment.