Skip to content

Commit 487855a

Browse files
committed
Route independent bindings releases from tagged source configuration
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
1 parent 45ffc98 commit 487855a

10 files changed

Lines changed: 1143 additions & 695 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 & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +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.
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.
2931

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

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

Lines changed: 51 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,33 @@ 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: Harden pip
71+
uses: ./.github/actions/harden-pip
72+
73+
- name: Install CI tool dependencies
74+
run: python -m pip install -e ./ci
4975

5076
- name: Create Release Directory
5177
run: mkdir -p release
@@ -54,44 +80,56 @@ jobs:
5480
run: >
5581
git archive
5682
--format=tar.gz
57-
--prefix="${{ env.ARCHIVE_NAME }}/"
58-
--output="release/${{ env.ARCHIVE_NAME }}.tar.gz"
59-
${{ inputs.git-tag }}
83+
--prefix="$ARCHIVE_NAME/"
84+
--output="release/$ARCHIVE_NAME.tar.gz"
85+
"refs/tags/$RELEASE_GIT_TAG"
6086
6187
- name: Compute Checksum
6288
run: >
63-
sha256sum "release/${{ env.ARCHIVE_NAME }}.tar.gz"
89+
sha256sum "release/$ARCHIVE_NAME.tar.gz"
6490
| awk '{print $1}'
65-
> "release/${{ env.ARCHIVE_NAME }}.tar.gz.sha256sum"
91+
> "release/$ARCHIVE_NAME.tar.gz.sha256sum"
6692
6793
- name: Upload Archive
6894
if: ${{ !inputs.dry-run }}
6995
env:
7096
GH_TOKEN: ${{ github.token }}
7197
run: >
7298
gh release upload
73-
--clobber "${{ inputs.git-tag }}"
74-
--repo "${{ github.repository }}"
99+
--clobber "$RELEASE_GIT_TAG"
100+
--repo "$RELEASE_REPOSITORY"
75101
release/*
76102
77103
- name: Download and Validate Wheels
78104
env:
105+
BINDINGS_PACKAGE: ${{ inputs.bindings-package }}
79106
GH_TOKEN: ${{ github.token }}
80107
run: |
81108
# Use the shared script to download wheels
82-
./ci/tools/download-wheels "${{ inputs.run-id }}" "${{ inputs.component }}" "${{ github.repository }}" "release/wheels"
109+
./ci/tools/download-wheels \
110+
"$RELEASE_RUN_ID" \
111+
"$RELEASE_COMPONENT" \
112+
"$RELEASE_REPOSITORY" \
113+
"release/wheels" \
114+
"$RELEASE_GIT_TAG" \
115+
"$BINDINGS_PACKAGE"
83116
84117
# Validate that release wheels match the expected version from tag.
85-
./ci/tools/validate-release-wheels "${{ inputs.git-tag }}" "${{ inputs.component }}" "release/wheels"
118+
python -m ci.tools.validate_release_wheels \
119+
"$RELEASE_GIT_TAG" \
120+
"$RELEASE_COMPONENT" \
121+
"release/wheels" \
122+
--bindings-package "$BINDINGS_PACKAGE" \
123+
--release-source-root release-source
86124
87125
- name: Upload Wheels
88126
if: ${{ !inputs.dry-run }}
89127
env:
90128
GH_TOKEN: ${{ github.token }}
91129
run: |
92130
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/*
131+
echo "Uploading wheels to release $RELEASE_GIT_TAG"
132+
gh release upload --clobber "$RELEASE_GIT_TAG" --repo "$RELEASE_REPOSITORY" release/wheels/*
95133
fi
96134
97135
- name: Upload dry-run release artifacts

0 commit comments

Comments
 (0)