Skip to content

Commit 09cbb42

Browse files
committed
CI: Integrate cuda-pathfinder into the shared release workflow
Summary Refs #3012. Integrate Pathfinder’s automated release process into release.yml, sharing documentation and artifact-upload jobs while preserving the release process for other products. - Preserve Pathfinder’s release-note checks, successful tag-triggered CI requirement, draft metadata, checkout-free publishing, and installation verification on TestPyPI and PyPI. - Require successful documentation before uploading assets or publishing packages. Finalize the Pathfinder GitHub release only after successful uploads and PyPI verification, without marking it as latest. - Reuse release-upload.yml for source archives, checksums, and validated wheels. Load Pathfinder validation tools from the workflow revision so older release tags remain supported. - Reduce duplication with YAML anchors for publishing and verification steps. - Preserve Pathfinder release serialization and default-branch enforcement for full releases, while supporting the shared dry-run mode. - Keep other products’ publishing behavior, upload concurrency, and manual GitHub release finalization unchanged. Rollout The existing release-cuda-pathfinder.yml remains unchanged during migration. Pathfinder’s trusted publishers on both PyPI and TestPyPI must authorize release.yml before its first full release. Retire the legacy workflow and publisher registrations afterward. Validation Workflow linting passes. Live workflow-dispatch and trusted-publishing validation remain outstanding.
1 parent 4c893de commit 09cbb42

3 files changed

Lines changed: 368 additions & 37 deletions

File tree

‎.github/RELEASE-core.md‎

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,31 @@
66
This document covers the `cuda.core` release process. For other packages:
77
`cuda-bindings` and `cuda-python` involve a private repository and are not
88
documented here; `cuda-pathfinder` is largely automated by the
9-
[release-cuda-pathfinder.yml](workflows/release-cuda-pathfinder.yml)
9+
[CI: Release](workflows/release.yml)
1010
workflow.
1111

12+
To release `cuda-pathfinder`, dispatch **CI: Release** from the default
13+
branch with `component` set to `cuda-pathfinder`, `release-action` set
14+
to `full-release`, and `git-tag` set to the existing
15+
`cuda-pathfinder-v<VERSION>` tag. The workflow finds the successful
16+
tag-triggered CI run, checks release notes, creates or reuses a draft,
17+
builds and deploys versioned docs, and uploads the source archive, checksum,
18+
and wheels. It publishes to TestPyPI and PyPI, verifies each installation,
19+
then publishes the GitHub Release without marking it as latest. A failed
20+
docs build prevents asset uploads, package publication, and finalization.
21+
22+
The default `dry-run` action validates preparation, builds docs, and
23+
collects release artifacts without creating a GitHub Release or publishing
24+
packages. It can be dispatched from a development branch; use
25+
`dry-run-docs-branch` only when a preview deployment is needed.
26+
27+
Before the first Pathfinder release through this workflow, its trusted
28+
publishers on **both PyPI and TestPyPI** must authorize `release.yml`.
29+
Until that migration is complete, `release-cuda-pathfinder.yml` remains
30+
available. Keep its existing publisher
31+
registrations during the transition; retire the old workflow and its
32+
registrations after the consolidated workflow is authorized on both indexes.
33+
1234
Each section below provides detailed guidance for a step in the
1335
[Release Checklist](ISSUE_TEMPLATE/release_checklist.yml). To start a
1436
release, create a new issue from that template and work through it item by

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

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,10 @@ on:
2525
default: false
2626

2727
concurrency:
28-
# Concurrency group that uses the workflow name and PR number if available
29-
# or commit SHA as a fallback. If a new build is triggered under that
30-
# concurrency group while a previous build is running it will be canceled.
31-
# Repeated pushes to a PR will cancel all previous builds, while multiple
32-
# merges to main will not cancel.
33-
group: ${{ github.workflow }}-${{ github.ref_name || github.sha }}
34-
cancel-in-progress: true
28+
# Pathfinder releases are serialized by the caller. Keep their uploads out
29+
# of the other components' existing cancellation group.
30+
group: ${{ inputs.component == 'cuda-pathfinder' && format('release-upload-cuda-pathfinder-{0}', github.run_id) || format('{0}-{1}', github.workflow, github.ref_name || github.sha) }}
31+
cancel-in-progress: ${{ inputs.component != 'cuda-pathfinder' }}
3532

3633
permissions:
3734
contents: write
@@ -51,6 +48,16 @@ jobs:
5148
fetch-depth: 1
5249
ref: ${{ inputs.git-tag }}
5350

51+
- name: Checkout Pathfinder Release Tools
52+
if: ${{ inputs.component == 'cuda-pathfinder' }}
53+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
54+
with:
55+
# Older Pathfinder tags may predate release-wheel validation tooling.
56+
ref: ${{ github.workflow_sha }}
57+
path: .release-tools
58+
sparse-checkout: ci/tools
59+
persist-credentials: false
60+
5461
- name: Create Release Directory
5562
run: mkdir -p release
5663

@@ -69,7 +76,7 @@ jobs:
6976
> "release/${{ env.ARCHIVE_NAME }}.tar.gz.sha256sum"
7077
7178
- name: Upload Archive
72-
if: ${{ !inputs.dry-run }}
79+
if: ${{ !inputs.dry-run && inputs.component != 'cuda-pathfinder' }}
7380
env:
7481
GH_TOKEN: ${{ github.token }}
7582
run: >
@@ -81,19 +88,24 @@ jobs:
8188
- name: Download and Validate Wheels
8289
env:
8390
GH_TOKEN: ${{ github.token }}
91+
RELEASE_TOOLS_DIR: ${{ inputs.component == 'cuda-pathfinder' && '.release-tools/ci/tools' || 'ci/tools' }}
8492
run: |
8593
# Use the shared script to download wheels
86-
./ci/tools/download-wheels "${{ inputs.run-id }}" "${{ inputs.component }}" "${{ github.repository }}" "release/wheels"
94+
"${RELEASE_TOOLS_DIR}/download-wheels" "${{ inputs.run-id }}" "${{ inputs.component }}" "${{ github.repository }}" "release/wheels"
8795
8896
# Validate that release wheels match the expected version from tag.
89-
./ci/tools/validate-release-wheels "${{ inputs.git-tag }}" "${{ inputs.component }}" "release/wheels"
97+
"${RELEASE_TOOLS_DIR}/validate-release-wheels" "${{ inputs.git-tag }}" "${{ inputs.component }}" "release/wheels"
9098
91-
- name: Upload Wheels
99+
- name: Upload Wheels and Pathfinder Archive
92100
if: ${{ !inputs.dry-run }}
93101
env:
94102
GH_TOKEN: ${{ github.token }}
103+
COMPONENT: ${{ inputs.component }}
95104
run: |
96-
if [[ -d "release/wheels" && $(ls -A release/wheels 2>/dev/null | wc -l) -gt 0 ]]; then
105+
if [[ "${COMPONENT}" == "cuda-pathfinder" ]]; then
106+
gh release upload --clobber "${{ inputs.git-tag }}" --repo "${{ github.repository }}" \
107+
release/*.tar.gz release/*.sha256sum release/wheels/*.whl
108+
elif [[ -d "release/wheels" && $(ls -A release/wheels 2>/dev/null | wc -l) -gt 0 ]]; then
97109
echo "Uploading wheels to release ${{ inputs.git-tag }}"
98110
gh release upload --clobber "${{ inputs.git-tag }}" --repo "${{ github.repository }}" release/wheels/*
99111
fi

0 commit comments

Comments
 (0)