Skip to content

Commit c2097eb

Browse files
bharatr21mdboom
andauthored
ci: Replace CI JSON files with YAML (#1304)
* ci: Replace CI JSON files with YAML Signed-off-by: Bharat Raghunathan <bharatrgatech@gmail.com> * Apply suggestion from @mdboom --------- Signed-off-by: Bharat Raghunathan <bharatrgatech@gmail.com> Co-authored-by: Michael Droettboom <mdboom@gmail.com>
1 parent f04df74 commit c2097eb

7 files changed

Lines changed: 80 additions & 85 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ jobs:
3030
- name: Get CUDA build versions
3131
id: get-vars
3232
run: |
33-
cuda_build_ver=$(jq -r .cuda.build.version ci/versions.json)
33+
cuda_build_ver=$(yq '.cuda.build.version' ci/versions.yml)
3434
echo "cuda_build_ver=$cuda_build_ver" >> $GITHUB_OUTPUT
3535
36-
cuda_prev_build_ver=$(jq -r .cuda.prev_build.version ci/versions.json)
36+
cuda_prev_build_ver=$(yq '.cuda.prev_build.version' ci/versions.yml)
3737
echo "cuda_prev_build_ver=$cuda_prev_build_ver" >> $GITHUB_OUTPUT
3838
3939
should-skip:

.github/workflows/test-wheel-linux.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,17 @@ jobs:
5353
MATRIX_TYPE="nightly"
5454
fi
5555
56-
# Read base matrix from JSON file for the specific architecture
57-
TEST_MATRIX=$(jq --arg arch "$ARCH" --arg matrix_type "$MATRIX_TYPE" '
58-
.linux[$matrix_type] |
59-
map(select(.ARCH == $arch))
60-
' ci/test-matrix.json)
56+
# Read base matrix from YAML file for the specific architecture
57+
TEST_MATRIX=$(yq -o json ".linux[\"${MATRIX_TYPE}\"] | map(select(.ARCH == \"${ARCH}\"))" ci/test-matrix.yml)
6158
6259
# Add special runner for amd64 if applicable
6360
if [[ "${ARCH}" == "amd64" ]]; then
64-
SPECIAL_RUNNERS=$(jq '
65-
.linux.special_runners.amd64
66-
' ci/test-matrix.json)
67-
TEST_MATRIX=$(jq --argjson special "$SPECIAL_RUNNERS" '. + $special' <<< "$TEST_MATRIX")
61+
SPECIAL_RUNNERS=$(yq -o json '.linux.special_runners.amd64' ci/test-matrix.yml)
62+
TEST_MATRIX=$(echo "$TEST_MATRIX" | yq -o json ". + $SPECIAL_RUNNERS")
6863
fi
6964
70-
MATRIX="$(
71-
jq -c '${{ inputs.matrix_filter }} | if (. | length) > 0 then {include: .} else "Error: Empty matrix\n" | halt_error(1) end' <<< "$TEST_MATRIX"
72-
)"
65+
# Apply matrix filter and wrap in include structure
66+
MATRIX=$(echo "$TEST_MATRIX" | jq -c '${{ inputs.matrix_filter }} | if (. | length) > 0 then {include: .} else "Error: Empty matrix\n" | halt_error(1) end')
7367
7468
echo "MATRIX=${MATRIX}" | tee --append "${GITHUB_OUTPUT}"
7569

.github/workflows/test-wheel-windows.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,11 @@ jobs:
5050
MATRIX_TYPE="nightly"
5151
fi
5252
53-
# Read base matrix from JSON file for the specific architecture
54-
TEST_MATRIX=$(jq --arg arch "$ARCH" --arg matrix_type "$MATRIX_TYPE" '
55-
.windows[$matrix_type] |
56-
map(select(.ARCH == $arch))
57-
' ci/test-matrix.json)
58-
59-
MATRIX="$(
60-
jq -c '${{ inputs.matrix_filter }} | if (. | length) > 0 then {include: .} else "Error: Empty matrix\n" | halt_error(1) end' <<< "$TEST_MATRIX"
61-
)"
53+
# Read base matrix from YAML file for the specific architecture
54+
TEST_MATRIX=$(yq -o json ".windows[\"${MATRIX_TYPE}\"] | map(select(.ARCH == \"${ARCH}\"))" ci/test-matrix.yml)
55+
56+
# Apply matrix filter and wrap in include structure
57+
MATRIX=$(echo "$TEST_MATRIX" | jq -c '${{ inputs.matrix_filter }} | if (. | length) > 0 then {include: .} else "Error: Empty matrix\n" | halt_error(1) end')
6258
6359
echo "MATRIX=${MATRIX}" | tee --append "${GITHUB_OUTPUT}"
6460

ci/test-matrix.json

Lines changed: 0 additions & 52 deletions
This file was deleted.

ci/test-matrix.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# Test matrix configurations for CUDA Python CI workflows. This file consolidates
5+
# the test matrices that were previously hardcoded in the workflow files. All GPU
6+
# and ARCH values are hard-coded for each architecture: l4 GPU for amd64, a100 GPU
7+
# for arm64.
8+
#
9+
# Please keep the matrices sorted in ascending order by the following:
10+
#
11+
# [ARCH, PY_VER, CUDA_VER, LOCAL_CTK, GPU, DRIVER]
12+
#
13+
# Windows entries also include DRIVER_MODE.
14+
#
15+
# Notes:
16+
# - DRIVER: 'earliest' does not work with CUDA 12.9.1
17+
18+
linux:
19+
pull-request:
20+
- { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'v100', DRIVER: 'latest' }
21+
- { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'l4', DRIVER: 'latest' }
22+
- { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'rtxpro6000', DRIVER: 'latest' }
23+
- { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'l4', DRIVER: 'latest' }
24+
- { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'l4', DRIVER: 'latest' }
25+
- { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'l4', DRIVER: 'latest' }
26+
- { ARCH: 'amd64', PY_VER: '3.13', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'v100', DRIVER: 'latest' }
27+
- { ARCH: 'amd64', PY_VER: '3.13', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'rtxpro6000', DRIVER: 'latest' }
28+
- { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'l4', DRIVER: 'latest' }
29+
- { ARCH: 'amd64', PY_VER: '3.14t', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'l4', DRIVER: 'latest' }
30+
- { ARCH: 'arm64', PY_VER: '3.10', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'a100', DRIVER: 'latest' }
31+
- { ARCH: 'arm64', PY_VER: '3.10', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'a100', DRIVER: 'latest' }
32+
- { ARCH: 'arm64', PY_VER: '3.11', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'a100', DRIVER: 'latest' }
33+
- { ARCH: 'arm64', PY_VER: '3.11', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'a100', DRIVER: 'latest' }
34+
- { ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'a100', DRIVER: 'latest' }
35+
- { ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'a100', DRIVER: 'latest' }
36+
- { ARCH: 'arm64', PY_VER: '3.13', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'a100', DRIVER: 'latest' }
37+
- { ARCH: 'arm64', PY_VER: '3.13', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'a100', DRIVER: 'latest' }
38+
- { ARCH: 'arm64', PY_VER: '3.14', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'a100', DRIVER: 'latest' }
39+
- { ARCH: 'arm64', PY_VER: '3.14t', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'a100', DRIVER: 'latest' }
40+
nightly: []
41+
special_runners:
42+
amd64:
43+
- { ARCH: 'amd64', PY_VER: '3.13', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'H100', DRIVER: 'latest' }
44+
45+
windows:
46+
pull-request:
47+
- { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'rtx2080', DRIVER: 'latest', DRIVER_MODE: 'WDDM' }
48+
- { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'rtxpro6000', DRIVER: 'latest', DRIVER_MODE: 'TCC' }
49+
- { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'v100', DRIVER: 'latest', DRIVER_MODE: 'MCDM' }
50+
- { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'rtx4090', DRIVER: 'latest', DRIVER_MODE: 'WDDM' }
51+
- { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'l4', DRIVER: 'latest', DRIVER_MODE: 'MCDM' }
52+
- { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'a100', DRIVER: 'latest', DRIVER_MODE: 'TCC' }
53+
- { ARCH: 'amd64', PY_VER: '3.13', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'l4', DRIVER: 'latest', DRIVER_MODE: 'TCC' }
54+
- { ARCH: 'amd64', PY_VER: '3.13', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'rtxpro6000', DRIVER: 'latest', DRIVER_MODE: 'MCDM' }
55+
- { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'v100', DRIVER: 'latest', DRIVER_MODE: 'TCC' }
56+
- { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'l4', DRIVER: 'latest', DRIVER_MODE: 'MCDM' }
57+
- { ARCH: 'amd64', PY_VER: '3.14t', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'l4', DRIVER: 'latest', DRIVER_MODE: 'TCC' }
58+
- { ARCH: 'amd64', PY_VER: '3.14t', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'a100', DRIVER: 'latest', DRIVER_MODE: 'MCDM' }
59+
nightly: []

ci/versions.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

ci/versions.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
cuda:
5+
build:
6+
version: "13.0.2"
7+
prev_build:
8+
version: "12.9.1"

0 commit comments

Comments
 (0)