-
Notifications
You must be signed in to change notification settings - Fork 76
349 lines (321 loc) · 12.8 KB
/
Copy pathci.yaml
File metadata and controls
349 lines (321 loc) · 12.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause
# Note: This name is referred to in the test job, so make sure any changes are sync'd up!
# Further this is referencing a run in the backport branch to fetch old bindings.
name: "CI"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
on:
push:
branches:
- "pull-request/[0-9]+"
- "main"
jobs:
ci-vars:
runs-on: ubuntu-latest
outputs:
CUDA_BUILD_VER: ${{ steps.get-vars.outputs.cuda_build_ver }}
CUDA_PREV_BUILD_VER: ${{ steps.get-vars.outputs.cuda_prev_build_ver }}
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- name: Get CUDA build versions
id: get-vars
run: |
cuda_build_ver=$(yq '.cuda.build.version' ci/versions.yml)
echo "cuda_build_ver=$cuda_build_ver" >> $GITHUB_OUTPUT
cuda_prev_build_ver=$(yq '.cuda.prev_build.version' ci/versions.yml)
echo "cuda_prev_build_ver=$cuda_prev_build_ver" >> $GITHUB_OUTPUT
should-skip:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.get-should-skip.outputs.skip }}
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Compute whether to skip builds and tests
id: get-should-skip
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euxo pipefail
if ${{ startsWith(github.ref_name, 'pull-request/') }}; then
skip="$(gh pr view "$(grep -Po '(\d+)$' <<< '${{ github.ref_name }}')" --json title --jq '.title | contains("[no-ci]")')"
else
skip=false
fi
echo "skip=${skip}" >> "$GITHUB_OUTPUT"
# WARNING: make sure all of the build jobs are in sync
build-linux-64:
needs:
- ci-vars
- should-skip
strategy:
fail-fast: false
matrix:
host-platform:
- linux-64
name: Build ${{ matrix.host-platform }}
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }}
uses: ./.github/workflows/build-wheel.yml
with:
host-platform: ${{ matrix.host-platform }}
cuda-version: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
prev-cuda-version: ${{ needs.ci-vars.outputs.CUDA_PREV_BUILD_VER }}
# WARNING: make sure all of the build jobs are in sync
build-linux-aarch64:
needs:
- ci-vars
- should-skip
strategy:
fail-fast: false
matrix:
host-platform:
- linux-aarch64
name: Build ${{ matrix.host-platform }}
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }}
uses: ./.github/workflows/build-wheel.yml
with:
host-platform: ${{ matrix.host-platform }}
cuda-version: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
prev-cuda-version: ${{ needs.ci-vars.outputs.CUDA_PREV_BUILD_VER }}
# WARNING: make sure all of the build jobs are in sync
build-windows:
needs:
- ci-vars
- should-skip
strategy:
fail-fast: false
matrix:
host-platform:
- win-64
name: Build ${{ matrix.host-platform }}
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }}
uses: ./.github/workflows/build-wheel.yml
with:
host-platform: ${{ matrix.host-platform }}
cuda-version: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
prev-cuda-version: ${{ needs.ci-vars.outputs.CUDA_PREV_BUILD_VER }}
# WARNING: make sure both Linux test jobs are in sync
test-linux-64:
strategy:
fail-fast: false
matrix:
host-platform:
- linux-64
name: Test ${{ matrix.host-platform }}
if: ${{ github.repository_owner == 'nvidia' }}
permissions:
contents: read # This is required for actions/checkout
needs:
- build-linux-64
uses: ./.github/workflows/test-wheel-linux.yml
with:
build-type: pull-request
host-platform: ${{ matrix.host-platform }}
# WARNING: make sure both Linux test jobs are in sync
test-linux-aarch64:
strategy:
fail-fast: false
matrix:
host-platform:
- linux-aarch64
name: Test ${{ matrix.host-platform }}
if: ${{ github.repository_owner == 'nvidia' }}
permissions:
contents: read # This is required for actions/checkout
needs:
- build-linux-aarch64
uses: ./.github/workflows/test-wheel-linux.yml
with:
build-type: pull-request
host-platform: ${{ matrix.host-platform }}
test-windows:
strategy:
fail-fast: false
matrix:
host-platform:
- win-64
name: Test ${{ matrix.host-platform }}
if: ${{ github.repository_owner == 'nvidia' }}
permissions:
contents: read # This is required for actions/checkout
needs:
- build-windows
uses: ./.github/workflows/test-wheel-windows.yml
with:
build-type: pull-request
host-platform: ${{ matrix.host-platform }}
# ============== old CI jobs (ci.yaml & pr.yaml) ==============
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd
with:
extra_args: --all-files --show-diff-on-failure
compute-matrix:
runs-on: ubuntu-latest
outputs:
BUILD_MATRIX: ${{ steps.compute-matrix.outputs.BUILD_MATRIX }}
SIMULATOR_MATRIX: ${{ steps.compute-matrix.outputs.SIMULATOR_MATRIX }}
TEST_MATRIX: ${{ steps.compute-matrix.outputs.TEST_MATRIX }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Compute Matrices
id: compute-matrix
run: |
BUILD_MATRIX="$(yq '.build-matrix' ci/matrix.yml)"
SIMULATOR_MATRIX="$(yq '.simulator-matrix' ci/matrix.yml)"
TEST_MATRIX="$(yq '.test-matrix' ci/matrix.yml)"
{
echo 'BUILD_MATRIX<<EOF'
echo "${BUILD_MATRIX}"
echo 'EOF'
echo 'SIMULATOR_MATRIX<<EOF'
echo "${SIMULATOR_MATRIX}"
echo 'EOF'
echo 'TEST_MATRIX<<EOF'
echo "${TEST_MATRIX}"
echo 'EOF'
} >> "${GITHUB_OUTPUT}"
test-conda:
needs:
- compute-matrix
- should-skip
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }}
uses: ./.github/workflows/conda-python-tests.yaml
with:
build_type: pull-request
script: "ci/test_conda.sh"
run_codecov: false
matrix: ${{ needs.compute-matrix.outputs.TEST_MATRIX }}
test-simulator:
needs:
- compute-matrix
- should-skip
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }}
uses: ./.github/workflows/simulator-test.yaml
with:
build_type: pull-request
script: "ci/test_simulator.sh"
matrix: ${{ needs.compute-matrix.outputs.SIMULATOR_MATRIX }}
test-wheels-deps-wheels:
needs:
- build-linux-64
- compute-matrix
uses: ./.github/workflows/wheels-test.yaml
with:
build_type: pull-request
script: "ci/test_wheel_deps_wheels.sh"
matrix: ${{ needs.compute-matrix.outputs.TEST_MATRIX }}
matrix_filter: map(select(.ARCH == "amd64" and (.CUDA_VER | split(".") | .[0] | tonumber >= 12))) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
test-thirdparty-cudf:
needs:
- build-linux-64
- compute-matrix
uses: ./.github/workflows/wheels-test.yaml
with:
build_type: pull-request
script: "ci/test_thirdparty_cudf.sh"
matrix: ${{ needs.compute-matrix.outputs.TEST_MATRIX }}
# TODO: Enable for CUDA 13 when a supporting version of cuDF is available
matrix_filter: map(select(.ARCH == "amd64" and (.CUDA_VER | split(".") | .[0] | tonumber == 12))) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
test-thirdparty-nvmath:
needs:
- build-linux-64
- compute-matrix
uses: ./.github/workflows/wheels-test.yaml
with:
build_type: pull-request
script: "ci/test_thirdparty_nvmath.sh"
matrix: ${{ needs.compute-matrix.outputs.TEST_MATRIX }}
# TODO: Enable for CUDA 13 when a supporting version of nvmath-python is available
matrix_filter: map(select(.ARCH == "amd64" and (.CUDA_VER | split(".") | .[0] | tonumber == 12))) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
test-thirdparty-awkward:
needs:
- build-linux-64
- compute-matrix
uses: ./.github/workflows/wheels-test.yaml
with:
build_type: pull-request
script: "ci/test_thirdparty_awkward.sh"
matrix: ${{ needs.compute-matrix.outputs.TEST_MATRIX }}
# TODO: Enable for CUDA 13 in future
matrix_filter: map(select(.ARCH == "amd64" and (.CUDA_VER | split(".") | .[0] | tonumber == 12))) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
build-docs:
needs:
- should-skip
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }}
uses: ./.github/workflows/docs-build.yaml
coverage-report:
needs:
- build-linux-64
- compute-matrix
uses: ./.github/workflows/wheels-test.yaml
with:
build_type: pull-request
script: "ci/coverage_report.sh"
matrix: ${{ needs.compute-matrix.outputs.TEST_MATRIX }}
matrix_filter: 'map(select(.ARCH == "amd64" and .CUDA_VER == "12.9.1" and .PY_VER == "3.12")) | .[0:1]'
# =============================================================
checks:
name: Check job status
if: always()
runs-on: ubuntu-latest
needs:
- should-skip
- test-linux-64
- test-linux-aarch64
- test-windows
- pre-commit
- test-conda
- test-simulator
- test-thirdparty-cudf
- test-thirdparty-nvmath
- test-thirdparty-awkward
- build-docs
- coverage-report
steps:
- name: Exit
run: |
# GitHub treats `result == 'skipped'` as success for required
# status checks (see CCCL gate comment + cccl#605). The previous
# `cancelled || failure` predicate let upstream build failures
# propagate as `skipped` on downstream test jobs and silently
# pass this aggregator. Adopt CCCL's `check_result` pattern:
# require an explicit `expected` status per dependency, where
# anything else (including `skipped` from a failed upstream)
# fails the gate. `if: always()` on the job still ensures this
# step runs even when needs are skipped.
if [[ "${{ needs.should-skip.outputs.skip }}" == "true" ]]; then
echo "[no-ci] - skipping aggregator checks"
exit 0
fi
status="success"
check_result() {
name=$1; expected=$2; result=$3
echo "Checking $name: result='$result' (expected '$expected')"
if [[ "$result" != "$expected" ]]; then
echo "::error::$name did not match expected result"
status="failed"
fi
}
check_result "should-skip" "success" "${{ needs.should-skip.result }}"
check_result "test-linux-64" "success" "${{ needs.test-linux-64.result }}"
check_result "test-linux-aarch64" "success" "${{ needs.test-linux-aarch64.result }}"
check_result "test-windows" "success" "${{ needs.test-windows.result }}"
check_result "pre-commit" "success" "${{ needs.pre-commit.result }}"
check_result "test-conda" "success" "${{ needs.test-conda.result }}"
check_result "test-simulator" "success" "${{ needs.test-simulator.result }}"
check_result "test-thirdparty-cudf" "success" "${{ needs.test-thirdparty-cudf.result }}"
check_result "test-thirdparty-nvmath" "success" "${{ needs.test-thirdparty-nvmath.result }}"
check_result "test-thirdparty-awkward" "success" "${{ needs.test-thirdparty-awkward.result }}"
check_result "build-docs" "success" "${{ needs.build-docs.result }}"
check_result "coverage-report" "success" "${{ needs.coverage-report.result }}"
[[ "$status" == "success" ]]