Skip to content

Commit 2dfa989

Browse files
authored
Merge branch 'main' into add-context7
2 parents 73db51f + 6a7d08c commit 2dfa989

273 files changed

Lines changed: 28000 additions & 11510 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/RELEASE-core.md‎

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -123,38 +123,21 @@ Pushing the tag triggers a CI run automatically. Monitor it in the
123123

124124
## Upload wheels to PyPI
125125

126-
This is a two-stage process: first publish to TestPyPI, verify, then
127-
publish to PyPI.
128-
129-
### Stage 1: TestPyPI
126+
This is a single `CI: Release` workflow run with two sequential stages:
127+
publish to TestPyPI, then publish the same wheel set to PyPI.
130128

131129
1. Go to **Actions > CI: Release** and run the workflow with:
132130
- **Component**: `cuda-core`
133131
- **The release git tag**: `cuda-core-v0.6.0`
134-
- **build-ctk-ver**: the `cuda.build.version` from
135-
[`ci/versions.yml`](../ci/versions.yml) (e.g. `13.1.1`)
136-
- **Which wheel index to publish to**: `testpypi`
132+
137133
The workflow automatically looks up the successful tag-triggered CI run
138134
for the selected release tag.
139135

140-
2. Wait for the workflow to complete.
141-
142-
3. Verify the TestPyPI upload by installing and running tests from a
143-
checked-out copy of the repository:
144-
145-
```bash
146-
pip install -i https://test.pypi.org/simple/ \
147-
--extra-index-url https://pypi.org/simple/ \
148-
cuda-core==0.6.0
149-
cd cuda_core/tests && pytest
150-
```
151-
152-
### Stage 2: PyPI
153-
154-
Once TestPyPI verification passes, rerun the same workflow with:
155-
- **Which wheel index to publish to**: `pypi`
136+
2. Wait for the workflow to complete. It will:
137+
- publish the selected wheels to TestPyPI
138+
- publish the same wheel set to PyPI
156139

157-
After completion, verify:
140+
3. After completion, verify the final PyPI upload:
158141

159142
```bash
160143
pip install cuda-core==0.6.0

‎.github/copy-pr-bot.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
# https://docs.gha-runners.nvidia.com/apps/copy-pr-bot/
66

77
enabled: true
8-
# always require manual CI triggering, ignoring signed commits
8+
# auto-sync ready PRs so CI starts immediately; keep draft PRs manual
99
auto_sync_draft: false
10-
auto_sync_ready: false
10+
auto_sync_ready: true

‎.github/workflows/backport.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
echo "OLD_BRANCH=${OLD_BRANCH}" >> $GITHUB_ENV
4444
4545
- name: Create backport pull requests
46-
uses: korthout/backport-action@01619ebc9a6e3f6820274221b9956b3e7365000a # v4.1.0
46+
uses: korthout/backport-action@3c06f323a58619da1e8522229ebc8d5de2633e46 # v4.3.0
4747
with:
4848
copy_assignees: true
4949
copy_labels_pattern: true
@@ -67,7 +67,7 @@ jobs:
6767
run: echo "BACKPORT_BRANCH=${{ inputs.backport-branch }}" >> $GITHUB_ENV
6868

6969
- name: Create backport pull requests
70-
uses: korthout/backport-action@01619ebc9a6e3f6820274221b9956b3e7365000a # v4.1.0
70+
uses: korthout/backport-action@3c06f323a58619da1e8522229ebc8d5de2633e46 # v4.3.0
7171
with:
7272
copy_assignees: true
7373
copy_labels_pattern: true

‎.github/workflows/bandit.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2424

2525
- name: Install uv
26-
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
26+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
2727
with:
2828
enable-cache: false
2929

@@ -42,6 +42,6 @@ jobs:
4242
with:
4343
args: "check --select S --ignore ${{ steps.ignore-codes.outputs.codes }} --output-format sarif --output-file results.sarif"
4444
- name: Upload SARIF file
45-
uses: github/codeql-action/upload-sarif@v4.32.5
45+
uses: github/codeql-action/upload-sarif@v4.35.1
4646
with:
4747
sarif_file: results.sarif

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ name: "CI: Build and update docs"
77
on:
88
workflow_call:
99
inputs:
10-
build-ctk-ver:
11-
type: string
12-
required: true
1310
component:
1411
description: "Component(s) to build docs for"
1512
required: false
@@ -47,18 +44,21 @@ jobs:
4744
run:
4845
shell: bash -el {0}
4946
steps:
50-
- name: validate build-ctk
51-
run: |
52-
if [ ! "${{ inputs.build-ctk-ver }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]; then
53-
echo "error: `build-ctk-ver` ${{ inputs.build-ctk-ver }} version does not match MAJOR.MINOR.MICRO" >&2
54-
exit 1
55-
fi
5647
- name: Checkout ${{ github.event.repository.name }}
5748
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5849
with:
5950
fetch-depth: 0
6051
ref: ${{ inputs.git-tag }}
6152

53+
- name: Read build CTK version
54+
run: |
55+
BUILD_CTK_VER=$(yq '.cuda.build.version' ci/versions.yml)
56+
if [[ ! "${BUILD_CTK_VER}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
57+
echo "error: derived CTK build version ${BUILD_CTK_VER} does not match MAJOR.MINOR.MICRO" >&2
58+
exit 1
59+
fi
60+
echo "BUILD_CTK_VER=${BUILD_CTK_VER}" >> "$GITHUB_ENV"
61+
6262
# TODO: This workflow runs on GH-hosted runner and cannot use the proxy cache
6363

6464
- name: Set up miniforge
@@ -82,7 +82,7 @@ jobs:
8282
uses: ./.github/actions/fetch_ctk
8383
with:
8484
host-platform: linux-64
85-
cuda-version: ${{ inputs.build-ctk-ver }}
85+
cuda-version: ${{ env.BUILD_CTK_VER }}
8686

8787
- name: Set environment variables
8888
run: |
@@ -103,13 +103,13 @@ jobs:
103103
echo "CUDA_CORE_ARTIFACT_BASENAME=${CUDA_CORE_ARTIFACT_BASENAME}" >> $GITHUB_ENV
104104
echo "CUDA_CORE_ARTIFACT_NAME=${CUDA_CORE_ARTIFACT_BASENAME}-${FILE_HASH}" >> $GITHUB_ENV
105105
echo "CUDA_CORE_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_core/dist")" >> $GITHUB_ENV
106-
CUDA_BINDINGS_ARTIFACT_BASENAME="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda${{ inputs.build-ctk-ver }}-linux-64"
106+
CUDA_BINDINGS_ARTIFACT_BASENAME="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda${BUILD_CTK_VER}-linux-64"
107107
echo "CUDA_BINDINGS_ARTIFACT_BASENAME=${CUDA_BINDINGS_ARTIFACT_BASENAME}" >> $GITHUB_ENV
108108
echo "CUDA_BINDINGS_ARTIFACT_NAME=${CUDA_BINDINGS_ARTIFACT_BASENAME}-${FILE_HASH}" >> $GITHUB_ENV
109109
echo "CUDA_BINDINGS_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_bindings/dist")" >> $GITHUB_ENV
110110
111111
- name: Download cuda-python build artifacts
112-
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
112+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
113113
with:
114114
name: cuda-python-wheel
115115
path: .
@@ -122,7 +122,7 @@ jobs:
122122
ls -lahR .
123123
124124
- name: Download cuda-pathfinder build artifacts
125-
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
125+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
126126
with:
127127
name: cuda-pathfinder-wheel
128128
path: ./cuda_pathfinder
@@ -136,14 +136,14 @@ jobs:
136136
137137
- name: Download cuda.bindings build artifacts
138138
if: ${{ !inputs.is-release }}
139-
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
139+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
140140
with:
141141
name: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}
142142
path: ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
143143

144144
- name: Download cuda.bindings build artifacts
145145
if: ${{ inputs.is-release }}
146-
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
146+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
147147
with:
148148
pattern: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}
149149
merge-multiple: true
@@ -158,14 +158,14 @@ jobs:
158158
159159
- name: Download cuda.core build artifacts
160160
if: ${{ !inputs.is-release }}
161-
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
161+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
162162
with:
163163
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}
164164
path: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
165165

166166
- name: Download cuda.core build artifacts
167167
if: ${{ inputs.is-release }}
168-
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
168+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
169169
with:
170170
pattern: ${{ env.CUDA_CORE_ARTIFACT_NAME }}
171171
merge-multiple: true

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ jobs:
150150
cuda-version: ${{ inputs.cuda-version }}
151151

152152
- name: Build cuda.bindings wheel
153-
uses: pypa/cibuildwheel@298ed2fb2c105540f5ed055e8a6ad78d82dd3a7e # v3.3.1
153+
uses: pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
154154
with:
155155
package-dir: ./cuda_bindings/
156156
output-dir: ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
@@ -204,7 +204,7 @@ jobs:
204204
if-no-files-found: error
205205

206206
- name: Build cuda.core wheel
207-
uses: pypa/cibuildwheel@298ed2fb2c105540f5ed055e8a6ad78d82dd3a7e # v3.3.1
207+
uses: pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
208208
with:
209209
package-dir: ./cuda_core/
210210
output-dir: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
@@ -383,7 +383,7 @@ jobs:
383383
rmdir $OLD_BASENAME
384384
385385
- name: Build cuda.core wheel
386-
uses: pypa/cibuildwheel@298ed2fb2c105540f5ed055e8a6ad78d82dd3a7e # v3.3.1
386+
uses: pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
387387
with:
388388
package-dir: ./cuda_core/
389389
output-dir: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}

‎.github/workflows/ci.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ jobs:
220220
secrets: inherit
221221
uses: ./.github/workflows/build-docs.yml
222222
with:
223-
build-ctk-ver: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
224223
is-release: ${{ github.ref_type == 'tag' }}
225224

226225
checks:

‎.github/workflows/codeql.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ jobs:
3131
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3232

3333
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@40f0fa95c41fede7b43f035cb47aac899ee0ba0a # v3.31.8
34+
uses: github/codeql-action/init@34950e1b113b30df4edee1a6d3a605242df0c40b # v3.31.8
3535
with:
3636
languages: ${{ matrix.language }}
3737
build-mode: ${{ matrix.build-mode }}
3838
queries: security-extended
3939

4040
- name: Perform CodeQL Analysis
41-
uses: github/codeql-action/analyze@40f0fa95c41fede7b43f035cb47aac899ee0ba0a # v3.31.8
41+
uses: github/codeql-action/analyze@34950e1b113b30df4edee1a6d3a605242df0c40b # v3.31.8
4242
with:
4343
category: "/language:${{matrix.language}}"

‎.github/workflows/coverage.yml‎

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,27 @@ on:
1111

1212
env:
1313
PY_VER: "3.14"
14-
CUDA_VER: "13.1.0"
1514
LOCAL_CTK: "1"
1615
GPU: "a100"
1716
DRIVER: "latest"
1817

1918
jobs:
19+
coverage-vars:
20+
runs-on: ubuntu-latest
21+
outputs:
22+
CUDA_VER: ${{ steps.get-vars.outputs.cuda_ver }}
23+
steps:
24+
- name: Checkout ${{ github.event.repository.name }}
25+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26+
- name: Get CUDA version
27+
id: get-vars
28+
run: |
29+
cuda_ver=$(yq '.cuda.build.version' ci/versions.yml)
30+
echo "cuda_ver=$cuda_ver" >> $GITHUB_OUTPUT
31+
2032
coverage-linux:
2133
name: Coverage (Linux)
34+
needs: [coverage-vars]
2235
runs-on: "linux-amd64-gpu-a100-latest-1"
2336
permissions:
2437
id-token: write
@@ -29,6 +42,7 @@ jobs:
2942
env:
3043
HOST_PLATFORM: "linux-64"
3144
ARCH: "x86_64"
45+
CUDA_VER: ${{ needs.coverage-vars.outputs.CUDA_VER }}
3246
# Our self-hosted runners require a container
3347
# TODO: use a different (nvidia?) container
3448
container:
@@ -164,6 +178,7 @@ jobs:
164178
# Build Windows wheels on GitHub-hosted runner (has VS, no GPU)
165179
build-wheel-windows:
166180
name: Build Wheels (Windows)
181+
needs: [coverage-vars]
167182
runs-on: windows-2022
168183
permissions:
169184
contents: read
@@ -173,6 +188,7 @@ jobs:
173188
env:
174189
HOST_PLATFORM: "win-64"
175190
CUDA_PYTHON_COVERAGE: "1"
191+
CUDA_VER: ${{ needs.coverage-vars.outputs.CUDA_VER }}
176192
steps:
177193
- name: Checkout ${{ github.event.repository.name }}
178194
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -231,7 +247,7 @@ jobs:
231247
# Run coverage tests on self-hosted GPU runner (no VS needed, installs pre-built wheels)
232248
coverage-windows:
233249
name: Coverage (Windows)
234-
needs: [build-wheel-windows]
250+
needs: [coverage-vars, build-wheel-windows]
235251
runs-on: "windows-amd64-gpu-a100-latest-1"
236252
permissions:
237253
id-token: write
@@ -240,6 +256,7 @@ jobs:
240256
HOST_PLATFORM: "win-64"
241257
ARCH: "amd64"
242258
CUDA_PYTHON_COVERAGE: "1"
259+
CUDA_VER: ${{ needs.coverage-vars.outputs.CUDA_VER }}
243260
defaults:
244261
run:
245262
shell: bash --noprofile --norc -xeuo pipefail {0}
@@ -278,7 +295,7 @@ jobs:
278295
cuda-version: ${{ env.CUDA_VER }}
279296

280297
- name: Download Windows wheel artifacts
281-
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
298+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
282299
with:
283300
name: coverage-windows-wheels
284301
path: ./wheels/
@@ -403,19 +420,19 @@ jobs:
403420
pip install coverage[toml] Cython
404421
405422
- name: Download Linux coverage data
406-
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
423+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
407424
with:
408425
name: coverage-data-linux
409426
path: ./
410427

411428
- name: Download cuda source code
412-
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
429+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
413430
with:
414431
name: cuda-source-linux
415432
path: ./cuda/
416433

417434
- name: Download Windows coverage data
418-
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
435+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
419436
with:
420437
name: coverage-data-windows
421438
path: ./

0 commit comments

Comments
 (0)