Skip to content

Commit 2d0c7f7

Browse files
committed
Merge branch 'main' into core-null-stream-default-token
Signed-off-by: Vyron Vasileiadis <[email protected]>
2 parents 2a33c03 + 57b2709 commit 2d0c7f7

169 files changed

Lines changed: 7991 additions & 4641 deletions

File tree

Some content is hidden

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

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
## Description
22

3-
<!-- Every PR should have a corresponding issue that describes and motivates the work done in the PR -->
3+
<!-- Link the relevant issue, if any. -->
44
closes <!-- Link issue here -->
55

66
<!-- Provide a standalone description of changes in this PR. -->
77

88
<!-- Note: The pull request title will be included in the CHANGELOG. -->
99

1010
## Checklist
11-
<!-- TODO: - [ ] I am familiar with the [Contributing Guidelines](). -->
11+
- [ ] I have read the [Contributing Guidelines](https://github.com/NVIDIA/cuda-python/blob/main/CONTRIBUTING.md#coordinate-before-implementing).
1212
- [ ] New or existing tests cover these changes.
1313
- [ ] The documentation is up to date with these changes.

‎.github/actionlint.yaml‎

Lines changed: 15 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'
@@ -32,3 +35,15 @@ paths:
3235
".github/workflows/test-wheel-windows.yml":
3336
ignore:
3437
- 'specifying action "\$/[^"]+" in invalid format because ref is missing'
38+
".github/workflows/build-wheel.yml":
39+
ignore:
40+
- 'specifying action "\$/[^"]+" in invalid format because ref is missing'
41+
".github/workflows/pre-commit.yml":
42+
ignore:
43+
- 'specifying action "\$/[^"]+" in invalid format because ref is missing'
44+
".github/workflows/test-sdist-windows.yml":
45+
ignore:
46+
- 'specifying action "\$/[^"]+" in invalid format because ref is missing'
47+
".github/workflows/coverage.yml":
48+
ignore:
49+
- 'specifying action "\$/[^"]+" in invalid format because ref is missing'

‎.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/actions/harden-pip/action.yml‎

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: Install pinned rapidsai/sccache
6+
description: Download, verify, and install a pinned rapidsai/sccache binary on Linux
7+
8+
# Regenerate hashes when bumping SCCACHE_VERSION:
9+
# for arch in x86_64 aarch64; do
10+
# curl -fsSL "https://github.com/rapidsai/sccache/releases/download/<tag>/sccache-${arch}-unknown-linux-musl.tar.gz" | sha256sum
11+
# done
12+
# Cross-check against the `.sha256` files published on the GitHub release.
13+
#
14+
# Security note (eMudhra/emSign CA incident):
15+
# - Every version bump MUST repeat the embedded-roots check on the extracted
16+
# `sccache` binary:
17+
# grep -ac 'ISRG Root X1' sccache # >0 means a root list is embedded
18+
# grep -ac 'emSign ECC Root CA - G3' sccache # must be 0
19+
# Pass criteria: either no embedded root list (both return 0; binary defers
20+
# to the OS trust store via `rustls-platform-verifier`, as verified for
21+
# `rapidsai/sccache` v0.18.0-rapids.7), or an embedded `webpki-roots` list
22+
# at 1.0.10+ where `ISRG Root X1` matches and `emSign ECC Root CA - G3`
23+
# returns 0. Match the full root name: 1.0.10 removes only that emSign root
24+
# and still ships other emSign roots.
25+
# - Do NOT switch to or bump `mozilla/sccache` to v0.19.0 (or later without
26+
# repeating the roots check): `mozilla/sccache` v0.19.0 re-embeds
27+
# `webpki-roots` 1.0.5, which still trusts `emSign ECC Root CA - G3`.
28+
29+
runs:
30+
using: composite
31+
steps:
32+
- name: Install pinned rapidsai/sccache
33+
shell: bash --noprofile --norc -xeuo pipefail {0}
34+
env:
35+
SCCACHE_VERSION: v0.18.0-rapids.7
36+
run: |
37+
if [[ "$(uname -s)" != "Linux" ]]; then
38+
echo "::error::install-sccache only supports Linux (got $(uname -s))" >&2
39+
exit 1
40+
fi
41+
42+
arch="$(uname -m)"
43+
case "${arch}" in
44+
x86_64)
45+
expected_sha256="44106a2e01aeff99767e66b1a5ae6be074306c518458b367f75287de4532974c"
46+
;;
47+
aarch64)
48+
expected_sha256="1bad10208481786f2c2e943d7cca8006eaa7e620d122859ef2d61861a733d3d1"
49+
;;
50+
*)
51+
echo "::error::Unsupported architecture for install-sccache: ${arch}" >&2
52+
exit 1
53+
;;
54+
esac
55+
56+
tarball="sccache-${arch}-unknown-linux-musl.tar.gz"
57+
url="https://github.com/rapidsai/sccache/releases/download/${SCCACHE_VERSION}/${tarball}"
58+
59+
tmp_dir="$(mktemp -d)"
60+
trap 'rm -rf "${tmp_dir}"' EXIT
61+
62+
curl -fsSL -o "${tmp_dir}/${tarball}" "${url}"
63+
(
64+
cd "${tmp_dir}"
65+
echo "${expected_sha256} ${tarball}" | sha256sum --check --strict -
66+
)
67+
68+
if [[ "$(id -u)" -eq 0 ]]; then
69+
tar -C /usr/local/bin -xvzf "${tmp_dir}/${tarball}" --wildcards --strip-components=1 -x '*/sccache'
70+
else
71+
sudo tar -C /usr/local/bin -xvzf "${tmp_dir}/${tarball}" --wildcards --strip-components=1 -x '*/sccache'
72+
fi
73+
74+
echo "SCCACHE_PATH=/usr/local/bin/sccache" >> "${GITHUB_ENV}"
75+
/usr/local/bin/sccache --version

‎.github/actions/lychee-links/action.yml‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ outputs:
2626
description: "Whether the current PR label explicitly enables the HTTP 429 override"
2727
value: ${{ steps.lychee-policy.outputs.allow-429 }}
2828

29-
# Callers provide Python and the checked-out repository; the build of any
30-
# rendered documentation must already be complete.
29+
# Callers provide Python through setup-hardened-python and the checked-out
30+
# repository; the build of any rendered documentation must already be complete.
3131
runs:
3232
using: composite
3333
steps:
@@ -113,9 +113,6 @@ runs:
113113
printf '[Open the cache refresh workflow](%s).\n' "$WORKFLOW_URL"
114114
} >> "$GITHUB_STEP_SUMMARY"
115115
116-
- name: Harden pip
117-
uses: ./.github/actions/harden-pip
118-
119116
- name: Check links through the configured pre-commit hook
120117
shell: bash --noprofile --norc -euo pipefail {0}
121118
env:

0 commit comments

Comments
 (0)