Skip to content

Commit 7d6d297

Browse files
committed
Route independent bindings releases from tagged source configuration
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
1 parent 9b8ac76 commit 7d6d297

11 files changed

Lines changed: 1160 additions & 703 deletions

‎.github/ISSUE_TEMPLATE/release_checklist.yml‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,26 @@ body:
1010
- type: markdown
1111
attributes:
1212
value: |
13-
This checklist is for cuda-core releases as well as cuda-bindings patches. Please go through this checklist and ensure all tasks are completed. See [RELEASE-core.md](../RELEASE-core.md) for detailed guidance on each step (cuda.core).
13+
This checklist is for cuda-core releases as well as cuda-bindings patches. See [RELEASE-core.md](../RELEASE-core.md) for cuda.core and [RELEASE-bindings.md](../RELEASE-bindings.md) for bindings release scope, stabilization branches, and validation.
1414
1515
- type: checkboxes
1616
id: subpackage-tasks
1717
attributes:
1818
label: Tasks for cuda-core and cuda-bindings patch release
1919
options:
2020
- label: File an internal nvbug to communicate test plan & release schedule with QA
21-
- label: Ensure all pending PRs are reviewed, tested, and merged
21+
- label: Record the release scope and ensure all PRs selected for this release are reviewed, tested, and merged
2222
- label: Check (or update if needed) the dependency requirements
2323
- label: Sweep deprecations whose stated removal version has arrived (`grep -rn 'deprecated::' cuda_core/cuda`) and remove any that are due
2424
- label: "Finalize the doc update, including release notes (\"Note: Touching docstrings/type annotations in code is OK during code freeze, apply your best judgement!\")"
2525
- label: Update the docs for the new version
26-
- label: Create a public release tag
27-
- label: Wait for the tag-triggered CI run to complete, and use that run ID for release workflows (this will upload the release to PyPI)
26+
- label: Record the exact source commit, workflow control revision, and selected package root before creating the approved public release tag
27+
- label: Wait for the exact tag-triggered CI run to pass and complete a release dry run before approving publication
2828
- label: Publish the release at https://github.com/NVIDIA/cuda-python/releases (this will trigger the conda package update)
2929
- label: Approve the conda-package update PR
3030
- label: Post-release QA
3131
- label: Finalize the announcement update
3232
- label: Send out the announcement internally (on `#swcuda-python`)
3333
- label: Send out the announcement externally (GitHub Release -> Announcement)
34-
- label: For a `cuda-bindings` release, make sure MAJOR and MAJOR-1 releases are made, as well as releases of `cuda-python` for MAJOR and MAJOR-1
34+
- label: For a `cuda-bindings` release, confirm which supported release lines are in scope using `ci/versions.yml`, and release the matching `cuda-python` package for each planned line
35+
- label: For a bindings stabilization or emergency branch, link the PRs returning applicable fixes to `main` and record their applicability to both bindings roots

‎.github/RELEASE-core.md‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@ version, then publishes to PyPI and verifies again before publishing the
2020
GitHub Release without marking it as latest. A failed
2121
docs build prevents asset uploads, package publication, and finalization.
2222

23-
The release-note checker runs from `git-tag`, not the workflow revision.
24-
For Pathfinder, that tag must contain a version
25-
of `ci/tools/check_release_notes.py` that writes `version=<VERSION>` to
26-
`GITHUB_OUTPUT`. The release-notes job rejects an empty version before
27-
documentation, asset uploads, or package publication can start. Pathfinder
28-
package publication also requires successful draft metadata preparation.
29-
Use the retained legacy Pathfinder workflow for older tags without version
30-
output support during the transition; do not move existing tags to add the
31-
updated checker.
23+
The workflow revision supplies the release tools; release notes and the
24+
package registry (`ci/versions.yml`) come from `git-tag`. Current tooling
25+
requires a schema-2 registry in the tagged source. The release-notes job
26+
exports the checked version and rejects an empty version before documentation,
27+
asset uploads, or package publication can start. Pathfinder package
28+
publication also requires successful draft metadata preparation.
29+
For tags that predate the registry, use compatible historical release tooling;
30+
do not move existing tags to add the registry or updated tools.
3231

3332
The default `dry-run` action validates preparation, builds docs, and
3433
collects release artifacts without creating a GitHub Release or publishing

‎.github/workflows/release-cuda-pathfinder.yml‎

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,41 @@ jobs:
6060
echo "version=${version}"
6161
} >> "$GITHUB_OUTPUT"
6262
63-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
63+
- name: Checkout release control plane
64+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
65+
with:
66+
ref: ${{ github.sha }}
67+
68+
- name: Checkout release source
69+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
6470
with:
6571
# The exact tag supplies the SHA for lookup-run-id; no other tags
6672
# or commit history are needed.
6773
fetch-depth: 1
6874
# Resolve only the exact tag ref; checkout fails if the tag does not exist.
6975
ref: refs/tags/${{ steps.vars.outputs.tag }}
76+
path: release-source
77+
78+
- name: Set up Python
79+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
80+
with:
81+
python-version: "3.12"
82+
83+
- name: Install CI tool dependencies
84+
run: python -m pip install -e ./ci
85+
86+
- name: Validate tagged release registry
87+
env:
88+
RELEASE_TAG: ${{ steps.vars.outputs.tag }}
89+
run: |
90+
# Publication can proceed after a docs failure, so reject unsupported
91+
# release sources here before creating a draft or publishing artifacts.
92+
python -m ci.tools.bindings_config \
93+
--release-tag "$RELEASE_TAG" \
94+
--release-source-root release-source
7095
7196
- name: Check release notes exist
97+
working-directory: release-source
7298
env:
7399
VERSION: ${{ steps.vars.outputs.version }}
74100
run: |
@@ -81,11 +107,12 @@ jobs:
81107
82108
- name: Detect CI run ID
83109
id: detect-run
110+
working-directory: release-source
84111
env:
85112
GH_TOKEN: ${{ github.token }}
86113
TAG: ${{ steps.vars.outputs.tag }}
87114
run: |
88-
run_id=$(./ci/tools/lookup-run-id "${TAG}" "${{ github.repository }}")
115+
run_id=$(../ci/tools/lookup-run-id --tag "${TAG}" "${{ github.repository }}")
89116
echo "run-id=${run_id}" >> "$GITHUB_OUTPUT"
90117
91118
- name: Create draft release
@@ -165,7 +192,7 @@ jobs:
165192
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
166193
with:
167194
fetch-depth: 1
168-
ref: ${{ needs.prepare.outputs.tag }}
195+
ref: refs/tags/${{ needs.prepare.outputs.tag }}
169196

170197
- name: Create source archive
171198
run: |
@@ -175,7 +202,7 @@ jobs:
175202
--format=tar.gz \
176203
--prefix="${archive}/" \
177204
--output="release/${archive}.tar.gz" \
178-
"${TAG}"
205+
"refs/tags/${TAG}"
179206
sha256sum "release/${archive}.tar.gz" \
180207
| awk '{print $1}' > "release/${archive}.tar.gz.sha256sum"
181208

‎.github/workflows/release-upload.yml‎

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ on:
2323
type: boolean
2424
required: false
2525
default: false
26+
bindings-package:
27+
description: "Resolved CUDA bindings package JSON"
28+
type: string
29+
required: false
30+
default: ""
2631

2732
concurrency:
2833
# Keep upload locks component-specific and separate from the caller's workflow lock.
@@ -40,12 +45,30 @@ jobs:
4045
runs-on: ubuntu-latest
4146
env:
4247
ARCHIVE_NAME: ${{ github.event.repository.name }}-${{ inputs.git-tag }}
48+
RELEASE_COMPONENT: ${{ inputs.component }}
49+
RELEASE_GIT_TAG: ${{ inputs.git-tag }}
50+
RELEASE_REPOSITORY: ${{ github.repository }}
51+
RELEASE_RUN_ID: ${{ inputs.run-id }}
4352
steps:
44-
- name: Checkout Source
53+
- name: Checkout release control plane
4554
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
4655
with:
4756
fetch-depth: 1
48-
ref: ${{ inputs.git-tag }}
57+
fetch-tags: true
58+
59+
- name: Checkout release source
60+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
61+
with:
62+
ref: refs/tags/${{ inputs.git-tag }}
63+
path: release-source
64+
65+
- name: Set up Python
66+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
67+
with:
68+
python-version: "3.12"
69+
70+
- name: Install CI tool dependencies
71+
run: python -m pip install -e ./ci
4972

5073
- name: Create Release Directory
5174
run: mkdir -p release
@@ -54,44 +77,56 @@ jobs:
5477
run: >
5578
git archive
5679
--format=tar.gz
57-
--prefix="${{ env.ARCHIVE_NAME }}/"
58-
--output="release/${{ env.ARCHIVE_NAME }}.tar.gz"
59-
${{ inputs.git-tag }}
80+
--prefix="$ARCHIVE_NAME/"
81+
--output="release/$ARCHIVE_NAME.tar.gz"
82+
"refs/tags/$RELEASE_GIT_TAG"
6083
6184
- name: Compute Checksum
6285
run: >
63-
sha256sum "release/${{ env.ARCHIVE_NAME }}.tar.gz"
86+
sha256sum "release/$ARCHIVE_NAME.tar.gz"
6487
| awk '{print $1}'
65-
> "release/${{ env.ARCHIVE_NAME }}.tar.gz.sha256sum"
88+
> "release/$ARCHIVE_NAME.tar.gz.sha256sum"
6689
6790
- name: Upload Archive
6891
if: ${{ !inputs.dry-run }}
6992
env:
7093
GH_TOKEN: ${{ github.token }}
7194
run: >
7295
gh release upload
73-
--clobber "${{ inputs.git-tag }}"
74-
--repo "${{ github.repository }}"
96+
--clobber "$RELEASE_GIT_TAG"
97+
--repo "$RELEASE_REPOSITORY"
7598
release/*
7699
77100
- name: Download and Validate Wheels
78101
env:
102+
BINDINGS_PACKAGE: ${{ inputs.bindings-package }}
79103
GH_TOKEN: ${{ github.token }}
80104
run: |
81105
# Use the shared script to download wheels
82-
./ci/tools/download-wheels "${{ inputs.run-id }}" "${{ inputs.component }}" "${{ github.repository }}" "release/wheels"
106+
./ci/tools/download-wheels \
107+
"$RELEASE_RUN_ID" \
108+
"$RELEASE_COMPONENT" \
109+
"$RELEASE_REPOSITORY" \
110+
"release/wheels" \
111+
"$RELEASE_GIT_TAG" \
112+
"$BINDINGS_PACKAGE"
83113
84114
# Validate that release wheels match the expected version from tag.
85-
./ci/tools/validate-release-wheels "${{ inputs.git-tag }}" "${{ inputs.component }}" "release/wheels"
115+
python -m ci.tools.validate_release_wheels \
116+
"$RELEASE_GIT_TAG" \
117+
"$RELEASE_COMPONENT" \
118+
"release/wheels" \
119+
--bindings-package "$BINDINGS_PACKAGE" \
120+
--release-source-root release-source
86121
87122
- name: Upload Wheels
88123
if: ${{ !inputs.dry-run }}
89124
env:
90125
GH_TOKEN: ${{ github.token }}
91126
run: |
92127
if [[ -d "release/wheels" && $(ls -A release/wheels 2>/dev/null | wc -l) -gt 0 ]]; then
93-
echo "Uploading wheels to release ${{ inputs.git-tag }}"
94-
gh release upload --clobber "${{ inputs.git-tag }}" --repo "${{ github.repository }}" release/wheels/*
128+
echo "Uploading wheels to release $RELEASE_GIT_TAG"
129+
gh release upload --clobber "$RELEASE_GIT_TAG" --repo "$RELEASE_REPOSITORY" release/wheels/*
95130
fi
96131
97132
- name: Upload dry-run release artifacts

0 commit comments

Comments
 (0)