Skip to content

Commit 0571d8d

Browse files
committed
Merge branch 'rwgk/cb12-on-main-04-ci-builds' into rwgk/cb12-on-main-05-ci-tests-docs
# Conflicts: # .github/workflows/build-docs.yml # .github/workflows/test-wheel-linux.yml # .github/workflows/test-wheel-windows.yml
2 parents 34664b2 + 959ccf4 commit 0571d8d

59 files changed

Lines changed: 1292 additions & 488 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/actionlint.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ paths:
1515
".github/workflows/build-docs.yml":
1616
ignore:
1717
- 'unexpected key "queue" for "concurrency" section'
18+
# GitHub supports self-repository ($/) action references, but the latest
19+
# actionlint release does not yet recognize them (rhysd/actionlint#711).
20+
- 'specifying action "\$/[^"]+" in invalid format because ref is missing'
1821
".github/workflows/cleanup-pr-previews.yml":
1922
ignore:
2023
- 'unexpected key "queue" for "concurrency" section'

‎.github/actions/download-artifact-retry/action.yml‎

Lines changed: 68 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,33 @@
55
name: Download artifact (with retry)
66

77
description: >-
8-
Wrapper around actions/download-artifact that retries once after a short
9-
delay when the first attempt fails. Designed to absorb transient
10-
infrastructure flakes such as "other side closed" without failing the job.
8+
Wrapper around actions/download-artifact that retries up to three times with
9+
exponential backoff when a download fails. Handles both transient TCP errors
10+
such as "other side closed" and storage-layer throttling such as
11+
"HTTP 503: Egress is over the account limit". Accepts either an exact
12+
artifact name or a glob pattern; supply exactly one.
1113
1214
inputs:
1315
name:
14-
description: "Name of the artifact to download"
15-
required: true
16+
description: >-
17+
Exact name of the artifact to download. Mutually exclusive with
18+
'pattern'; supply exactly one of the two.
19+
required: false
20+
default: ""
21+
pattern:
22+
description: >-
23+
Glob pattern matching one or more artifact names. Mutually exclusive
24+
with 'name'; supply exactly one of the two.
25+
required: false
26+
default: ""
27+
merge-multiple:
28+
description: >-
29+
When true and 'pattern' is set, merge files from all matched artifacts
30+
directly into 'path' instead of placing each in its own subdirectory.
31+
required: false
32+
default: "false"
1633
path:
17-
description: "Destination path for the downloaded artifact"
34+
description: "Destination path for the downloaded artifact(s)"
1835
required: true
1936
run-id:
2037
description: >-
@@ -32,39 +49,80 @@ inputs:
3249
required: false
3350
default: ""
3451
retry-delay-seconds:
35-
description: "Seconds to wait between the first failure and the retry"
52+
description: "Seconds to wait between the first failure and the second attempt"
3653
required: false
3754
default: "15"
3855

3956
runs:
4057
using: composite
4158
steps:
59+
- name: Validate inputs
60+
shell: bash --noprofile --norc -euo pipefail {0}
61+
env:
62+
INPUT_NAME: ${{ inputs.name }}
63+
INPUT_PATTERN: ${{ inputs.pattern }}
64+
run: |
65+
if [[ -n "${INPUT_NAME}" && -n "${INPUT_PATTERN}" ]]; then
66+
echo "::error::Specify exactly one of 'name' or 'pattern', not both"
67+
exit 1
68+
fi
69+
if [[ -z "${INPUT_NAME}" && -z "${INPUT_PATTERN}" ]]; then
70+
echo "::error::Specify exactly one of 'name' or 'pattern'"
71+
exit 1
72+
fi
73+
4274
- name: Download artifact (attempt 1)
4375
id: attempt1
4476
continue-on-error: true
4577
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
4678
with:
4779
name: ${{ inputs.name }}
80+
pattern: ${{ inputs.pattern }}
81+
merge-multiple: ${{ inputs.merge-multiple }}
4882
path: ${{ inputs.path }}
4983
run-id: ${{ inputs.run-id }}
5084
github-token: ${{ inputs.github-token }}
5185

52-
- name: Wait before retry
86+
- name: Wait before retry (attempt 2)
5387
if: ${{ steps.attempt1.outcome == 'failure' }}
5488
shell: bash --noprofile --norc -euo pipefail {0}
5589
env:
56-
# Pass through env instead of interpolating the input into the shell
57-
# script, so a non-numeric value cannot inject commands.
5890
RETRY_DELAY_SECONDS: ${{ inputs.retry-delay-seconds }}
5991
run: |
6092
echo "::warning::Artifact download failed (attempt 1); retrying in ${RETRY_DELAY_SECONDS}s"
6193
sleep "$RETRY_DELAY_SECONDS"
6294
6395
- name: Download artifact (attempt 2)
96+
id: attempt2
6497
if: ${{ steps.attempt1.outcome == 'failure' }}
98+
continue-on-error: true
99+
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
100+
with:
101+
name: ${{ inputs.name }}
102+
pattern: ${{ inputs.pattern }}
103+
merge-multiple: ${{ inputs.merge-multiple }}
104+
path: ${{ inputs.path }}
105+
run-id: ${{ inputs.run-id }}
106+
github-token: ${{ inputs.github-token }}
107+
108+
- name: Wait before retry (attempt 3)
109+
if: ${{ steps.attempt1.outcome == 'failure' && steps.attempt2.outcome == 'failure' }}
110+
shell: bash --noprofile --norc -euo pipefail {0}
111+
env:
112+
RETRY_DELAY_SECONDS: ${{ inputs.retry-delay-seconds }}
113+
run: |
114+
# Double the delay for the second retry to give egress throttling more time to clear.
115+
RETRY_DELAY_SECONDS=$(( RETRY_DELAY_SECONDS * 2 ))
116+
echo "::warning::Artifact download failed (attempt 2); retrying in ${RETRY_DELAY_SECONDS}s"
117+
sleep "$RETRY_DELAY_SECONDS"
118+
119+
- name: Download artifact (attempt 3)
120+
if: ${{ steps.attempt1.outcome == 'failure' && steps.attempt2.outcome == 'failure' }}
65121
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
66122
with:
67123
name: ${{ inputs.name }}
124+
pattern: ${{ inputs.pattern }}
125+
merge-multiple: ${{ inputs.merge-multiple }}
68126
path: ${{ inputs.path }}
69127
run-id: ${{ inputs.run-id }}
70128
github-token: ${{ inputs.github-token }}

‎.github/workflows/build-docs.yml‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ jobs:
171171
172172
- name: Download cuda-python build artifacts
173173
if: ${{ !inputs.is-release || inputs.component == 'all' || inputs.component == 'cuda-python' }}
174-
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
174+
uses: $/.github/actions/download-artifact-retry
175175
with:
176176
name: ${{ env.CUDA_PYTHON_ARTIFACT_NAME }}
177177
path: .
@@ -186,7 +186,7 @@ jobs:
186186
187187
- name: Download cuda-pathfinder build artifacts
188188
if: ${{ !inputs.is-release || inputs.component == 'all' || inputs.component == 'cuda-pathfinder' || inputs.component == 'cuda-core' }}
189-
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
189+
uses: $/.github/actions/download-artifact-retry
190190
with:
191191
name: cuda-pathfinder-wheel
192192
path: ./cuda_pathfinder
@@ -201,17 +201,17 @@ jobs:
201201
202202
- name: Download cuda.bindings build artifacts
203203
if: ${{ !inputs.is-release }}
204-
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
204+
uses: $/.github/actions/download-artifact-retry
205205
with:
206206
name: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}
207207
path: ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
208208

209209
- name: Download cuda.bindings build artifacts
210210
if: ${{ inputs.is-release && (inputs.component == 'all' || inputs.component == 'cuda-bindings' || inputs.component == 'cuda-core') }}
211-
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
211+
uses: $/.github/actions/download-artifact-retry
212212
with:
213213
pattern: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}
214-
merge-multiple: true
214+
merge-multiple: "true"
215215
path: ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
216216
run-id: ${{ inputs.run-id }}
217217
github-token: ${{ github.token }}
@@ -224,17 +224,17 @@ jobs:
224224
225225
- name: Download cuda.core build artifacts
226226
if: ${{ !inputs.is-release }}
227-
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
227+
uses: $/.github/actions/download-artifact-retry
228228
with:
229229
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}
230230
path: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
231231

232232
- name: Download cuda.core build artifacts
233233
if: ${{ inputs.is-release && (inputs.component == 'all' || inputs.component == 'cuda-core') }}
234-
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
234+
uses: $/.github/actions/download-artifact-retry
235235
with:
236236
pattern: ${{ env.CUDA_CORE_ARTIFACT_NAME }}
237-
merge-multiple: true
237+
merge-multiple: "true"
238238
path: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
239239
run-id: ${{ inputs.run-id }}
240240
github-token: ${{ github.token }}
@@ -417,7 +417,7 @@ jobs:
417417
ref: ${{ inputs.is-release && format('refs/tags/{0}', inputs.git-tag) || inputs.git-tag }}
418418

419419
- name: Download docs deployment payload
420-
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
420+
uses: $/.github/actions/download-artifact-retry
421421
with:
422422
name: ${{ needs.build.outputs.deployment-artifact-name }}
423423
path: artifacts/docs/

‎.github/workflows/build-wheel.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ jobs:
202202
203203
- name: Download reusable cuda.pathfinder wheel
204204
if: ${{ env.BUILD_PATHFINDER != 'true' && env.BASELINE_RUN_ID != '' }}
205-
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
205+
uses: $/.github/actions/download-artifact-retry
206206
with:
207207
name: cuda-pathfinder-wheel
208208
path: cuda_pathfinder
@@ -314,7 +314,7 @@ jobs:
314314

315315
- name: Download reusable cuda.bindings ${{ env.CURRENT_CUDA_MAJOR }} wheel
316316
if: ${{ env.BUILD_BINDINGS_CURRENT != 'true' && env.BASELINE_RUN_ID != '' }}
317-
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
317+
uses: $/.github/actions/download-artifact-retry
318318
with:
319319
name: ${{ env.CURRENT_BINDINGS_ARTIFACT_BASENAME }}-${{ env.BASELINE_SHA }}
320320
path: ${{ env.CURRENT_BINDINGS_ARTIFACTS_DIR }}
@@ -440,7 +440,7 @@ jobs:
440440
441441
- name: Download reusable cuda.core wheel
442442
if: ${{ env.BUILD_CORE != 'true' && env.BASELINE_RUN_ID != '' }}
443-
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
443+
uses: $/.github/actions/download-artifact-retry
444444
with:
445445
name: ${{ env.CUDA_CORE_ARTIFACT_BASENAME }}-${{ env.BASELINE_SHA }}
446446
path: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
@@ -460,7 +460,7 @@ jobs:
460460
461461
- name: Download reusable cuda-python ${{ env.MAINTENANCE_CUDA_MAJOR }} wheel
462462
if: ${{ !inputs.single-cuda-major && env.BUILD_CUDA_PYTHON_MAINTENANCE != 'true' && env.BASELINE_RUN_ID != '' && strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
463-
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
463+
uses: $/.github/actions/download-artifact-retry
464464
with:
465465
name: ${{ env.MAINTENANCE_PYTHON_ARTIFACT_NAME }}
466466
path: cuda_python/dist/${{ env.MAINTENANCE_CUDA_VARIANT }}
@@ -487,7 +487,7 @@ jobs:
487487
488488
- name: Download reusable cuda-python ${{ env.CURRENT_CUDA_MAJOR }} wheel
489489
if: ${{ env.BUILD_CUDA_PYTHON_CURRENT != 'true' && env.BASELINE_RUN_ID != '' && strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
490-
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
490+
uses: $/.github/actions/download-artifact-retry
491491
with:
492492
name: ${{ env.CURRENT_PYTHON_ARTIFACT_NAME }}
493493
path: cuda_python/dist/${{ env.CURRENT_CUDA_VARIANT }}
@@ -682,7 +682,7 @@ jobs:
682682

683683
- name: Download reusable cuda.bindings ${{ env.MAINTENANCE_CUDA_MAJOR }} wheel
684684
if: ${{ !inputs.single-cuda-major && env.BUILD_BINDINGS_MAINTENANCE != 'true' && env.BASELINE_RUN_ID != '' }}
685-
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
685+
uses: $/.github/actions/download-artifact-retry
686686
with:
687687
name: ${{ env.MAINTENANCE_BINDINGS_ARTIFACT_BASENAME }}-${{ env.BASELINE_SHA }}
688688
path: ${{ env.MAINTENANCE_BINDINGS_ARTIFACTS_DIR }}

‎.github/workflows/coverage.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ jobs:
411411
cuda-version: ${{ env.CUDA_VER }}
412412

413413
- name: Download Windows wheel artifacts
414-
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
414+
uses: $/.github/actions/download-artifact-retry
415415
with:
416416
name: coverage-windows-wheels
417417
path: ./wheels/
@@ -518,19 +518,19 @@ jobs:
518518
pip install coverage[toml] Cython
519519
520520
- name: Download Linux coverage data
521-
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
521+
uses: $/.github/actions/download-artifact-retry
522522
with:
523523
name: coverage-data-linux
524524
path: ./
525525

526526
- name: Download cuda source code
527-
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
527+
uses: $/.github/actions/download-artifact-retry
528528
with:
529529
name: cuda-source-linux
530530
path: ./cuda/
531531

532532
- name: Download Windows coverage data
533-
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
533+
uses: $/.github/actions/download-artifact-retry
534534
with:
535535
name: coverage-data-windows
536536
path: ./
@@ -616,7 +616,7 @@ jobs:
616616
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
617617

618618
- name: Download combined coverage results
619-
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
619+
uses: $/.github/actions/download-artifact-retry
620620
with:
621621
name: coverage-combined
622622
path: docs/coverage/

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ jobs:
206206
- name: Download cuda-pathfinder build artifacts
207207
if: ${{ (env.TEST_PATHFINDER == 'true' || env.TEST_BINDINGS == 'true' || env.TEST_CORE == 'true' || env.TEST_PYTHON == 'true') &&
208208
env.PATHFINDER_SOURCE == 'artifact' }}
209-
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
209+
uses: $/.github/actions/download-artifact-retry
210210
with:
211211
name: cuda-pathfinder-wheel
212212
path: ./cuda_pathfinder
@@ -215,7 +215,7 @@ jobs:
215215

216216
- name: Download cuda-python build artifacts
217217
if: ${{ env.TEST_PYTHON == 'true' && env.BINDINGS_SOURCE == 'local' }}
218-
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
218+
uses: $/.github/actions/download-artifact-retry
219219
with:
220220
name: ${{ env.CUDA_PYTHON_ARTIFACT_NAME }}
221221
path: .
@@ -225,7 +225,7 @@ jobs:
225225
- name: Download cuda.bindings build artifacts
226226
if: ${{ (env.TEST_BINDINGS == 'true' || env.TEST_CORE == 'true' || env.TEST_PYTHON == 'true') &&
227227
env.BINDINGS_SOURCE == 'local' }}
228-
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
228+
uses: $/.github/actions/download-artifact-retry
229229
with:
230230
name: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}
231231
path: ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
@@ -247,7 +247,7 @@ jobs:
247247
248248
- name: Download cuda.bindings Cython tests
249249
if: ${{ env.TEST_BINDINGS == 'true' && env.SKIP_CYTHON_TEST == '0' }}
250-
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
250+
uses: $/.github/actions/download-artifact-retry
251251
with:
252252
name: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}-tests
253253
path: ${{ env.CUDA_BINDINGS_CYTHON_TESTS_DIR }}
@@ -262,7 +262,7 @@ jobs:
262262
263263
- name: Download cuda.core build artifacts
264264
if: ${{ env.TEST_CORE == 'true' }}
265-
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
265+
uses: $/.github/actions/download-artifact-retry
266266
with:
267267
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}
268268
path: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
@@ -277,7 +277,7 @@ jobs:
277277
278278
- name: Download cuda.core Cython tests
279279
if: ${{ env.TEST_CORE == 'true' && env.SKIP_CYTHON_TEST == '0' }}
280-
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
280+
uses: $/.github/actions/download-artifact-retry
281281
with:
282282
name: ${{ env.CUDA_CORE_CYTHON_TEST_ARTIFACT_NAME }}
283283
path: ${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}
@@ -292,7 +292,7 @@ jobs:
292292
293293
- name: Download cuda.core test binaries
294294
if: ${{ env.TEST_CORE == 'true' }}
295-
uses: NVIDIA/cuda-python/.github/actions/download-artifact-retry@f20d661666a5c92b757748ca237d3592ac3e942f # introduced in #3037
295+
uses: $/.github/actions/download-artifact-retry
296296
with:
297297
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}-test-binaries
298298
path: ${{ env.CUDA_CORE_TEST_BINARIES_DIR }}

0 commit comments

Comments
 (0)