Skip to content

Commit ead87d1

Browse files
authored
CI: Fix release workflow - cont'd (#419)
1 parent e4de2b9 commit ead87d1

File tree

7 files changed

+57
-17
lines changed

7 files changed

+57
-17
lines changed

.github/workflows/build-docs.yml

Lines changed: 48 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,23 @@ jobs:
8585
PYTHON_VERSION_FORMATTED="312" # see above
8686
REPO_DIR=$(pwd)
8787
88+
if [[ ${{ inputs.is-release }} == "true" ]]; then
89+
FILE_HASH="*"
90+
COMMIT_HASH="${{ inputs.git-tag }}"
91+
else
92+
FILE_HASH="${{ github.sha }}"
93+
COMMIT_HASH="${{ github.sha }}"
94+
fi
95+
8896
# make outputs from the previous job as env vars
8997
CUDA_CORE_ARTIFACT_BASENAME="cuda-core-python${PYTHON_VERSION_FORMATTED}-linux-64"
98+
echo "COMMIT_HASH=${COMMIT_HASH}" >> $GITHUB_ENV
9099
echo "CUDA_CORE_ARTIFACT_BASENAME=${CUDA_CORE_ARTIFACT_BASENAME}" >> $GITHUB_ENV
91-
echo "CUDA_CORE_ARTIFACT_NAME=${CUDA_CORE_ARTIFACT_BASENAME}-${{ github.sha }}" >> $GITHUB_ENV
100+
echo "CUDA_CORE_ARTIFACT_NAME=${CUDA_CORE_ARTIFACT_BASENAME}-${FILE_HASH}" >> $GITHUB_ENV
92101
echo "CUDA_CORE_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_core/dist")" >> $GITHUB_ENV
93102
CUDA_BINDINGS_ARTIFACT_BASENAME="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda${{ inputs.build-ctk-ver }}-linux-64"
94103
echo "CUDA_BINDINGS_ARTIFACT_BASENAME=${CUDA_BINDINGS_ARTIFACT_BASENAME}" >> $GITHUB_ENV
95-
echo "CUDA_BINDINGS_ARTIFACT_NAME=${CUDA_BINDINGS_ARTIFACT_BASENAME}-${{ github.sha }}" >> $GITHUB_ENV
104+
echo "CUDA_BINDINGS_ARTIFACT_NAME=${CUDA_BINDINGS_ARTIFACT_BASENAME}-${FILE_HASH}" >> $GITHUB_ENV
96105
echo "CUDA_BINDINGS_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_bindings/dist")" >> $GITHUB_ENV
97106
98107
- name: Download cuda-python build artifacts
@@ -101,30 +110,51 @@ jobs:
101110
name: cuda-python-wheel
102111
path: .
103112
run-id: ${{ inputs.run-id }}
113+
github-token: ${{ github.token }}
104114

105115
- name: Display structure of downloaded cuda-python artifacts
106116
run: |
107117
pwd
108118
ls -lahR .
109119
110120
- name: Download cuda.bindings build artifacts
121+
if: ${{ !inputs.is-release }}
111122
uses: actions/download-artifact@v4
112123
with:
113124
name: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}
114125
path: ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
126+
127+
- name: Download cuda.bindings build artifacts
128+
if: ${{ inputs.is-release }}
129+
uses: actions/download-artifact@v4
130+
with:
131+
pattern: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}
132+
merge-multiple: true
133+
path: ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
115134
run-id: ${{ inputs.run-id }}
135+
github-token: ${{ github.token }}
116136

117137
- name: Display structure of downloaded cuda.bindings artifacts
118138
run: |
119139
pwd
120140
ls -lahR $CUDA_BINDINGS_ARTIFACTS_DIR
121141
122142
- name: Download cuda.core build artifacts
143+
if: ${{ !inputs.is-release }}
123144
uses: actions/download-artifact@v4
124145
with:
125146
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}
126147
path: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
148+
149+
- name: Download cuda.core build artifacts
150+
if: ${{ inputs.is-release }}
151+
uses: actions/download-artifact@v4
152+
with:
153+
pattern: ${{ env.CUDA_CORE_ARTIFACT_NAME }}
154+
merge-multiple: true
155+
path: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
127156
run-id: ${{ inputs.run-id }}
157+
github-token: ${{ github.token }}
128158

129159
- name: Display structure of downloaded cuda.core build artifacts
130160
run: |
@@ -156,12 +186,12 @@ jobs:
156186
157187
- name: Build all docs
158188
if: ${{ inputs.component == 'all' }}
159-
env:
160-
DOC_ACTION: ${{ (inputs.is-release && '') || 'latest-only' }}
161189
run: |
162190
pushd cuda_python/docs/
163-
./build_all_docs.sh $DOC_ACTION
164-
if [[ -z "$DOC_ACTION" ]]; then
191+
if [[ "${{ inputs.is-release }}" == "false" ]]; then
192+
./build_all_docs.sh latest-only
193+
else
194+
./build_all_docs.sh
165195
# At release time, we don't want to update the latest docs
166196
rm -rf build/html/latest
167197
fi
@@ -171,19 +201,25 @@ jobs:
171201
172202
- name: Build component docs
173203
if: ${{ inputs.component != 'all' }}
174-
env:
175-
DOC_ACTION: ${{ (inputs.is-release && '') || 'latest-only' }}
176204
run: |
177205
COMPONENT=$(echo "${{ inputs.component }}" | tr '-' '_')
178206
pushd ${COMPONENT}/docs/
179-
./build_docs.sh $DOC_ACTION
180-
if [[ -z "$DOC_ACTION" ]]; then
207+
if [[ "${{ inputs.is-release }}" == "false" ]]; then
208+
./build_docs.sh latest-only
209+
else
210+
./build_docs.sh
181211
# At release time, we don't want to update the latest docs
182212
rm -rf build/html/latest
183213
fi
184214
ls -l build
185215
popd
186-
mv ${COMPONENT}/docs/build/html/* artifacts/docs/
216+
if [[ "${{ inputs.component }}" != "cuda-python" ]]; then
217+
TARGET="${{ inputs.component }}"
218+
mkdir -p artifacts/docs/${TARGET}
219+
else
220+
TARGET=""
221+
fi
222+
mv ${COMPONENT}/docs/build/html/* artifacts/docs/${TARGET}
187223
188224
# TODO: Consider removing this step?
189225
- name: Upload doc artifacts
@@ -208,5 +244,5 @@ jobs:
208244
git-config-email: [email protected]
209245
folder: artifacts/docs/
210246
target-folder: docs/
211-
commit-message: "Deploy ${{ (inputs.is-release && 'release') || 'latest' }} docs: ${{ github.sha }}"
247+
commit-message: "Deploy ${{ (inputs.is-release && 'release') || 'latest' }} docs: ${{ env.COMMIT_HASH }}"
212248
clean: false

.github/workflows/release-upload.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ jobs:
5656
GH_TOKEN: ${{ github.token }}
5757
run: >
5858
gh release upload
59-
${{ inputs.git-tag }}
60-
release/*
61-
--clobber "${{ github.ref_name }}"
59+
--clobber "${{ inputs.git-tag }}"
6260
--repo "${{ github.repository }}"
61+
release/*

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,11 @@ jobs:
120120
run: |
121121
gh run download ${{ inputs.run-id }} -p "${{ inputs.component }}*" -R ${{ github.repository }}
122122
mkdir dist
123-
for p in "${{ inputs.component }}*"; do
123+
for p in ${{ inputs.component }}*
124+
do
124125
mv ${p}/*.whl dist/
125126
done
126-
rmdir "${{ inputs.component }}*"
127+
rmdir ${{ inputs.component }}*
127128
128129
- name: Publish package distributions to PyPI
129130
if: ${{ inputs.wheel-dst == 'pypi' }}

cuda_bindings/docs/source/release/11.8.6-notes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Released on January 24, 2025.
55

66
## Highlights
77

8+
- Support Python 3.13
89
- Add an optional dependency on the CUDA NVRTC wheel
910
- Enable discovery and loading of shared libraries from CUDA wheels
1011
- `cuda-python` is now a meta package, currently depending only on `cuda-bindings` ([see RFC](https://github.com/NVIDIA/cuda-python/issues/105))

cuda_bindings/docs/source/release/12.8.0-notes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Released on January 24, 2025.
55

66
## Highlights
77

8+
- Support Python 3.13
89
- Add bindings for nvJitLink (requires nvJitLink from CUDA 12.3 or above)
910
- Add optional dependencies on CUDA NVRTC and nvJitLink wheels
1011
- Enable discovery and loading of shared libraries from CUDA wheels

cuda_python/docs/source/release/11.8.6-notes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Released on January 24, 2025.
99

1010
## Highlights
1111

12+
- Support Python 3.13
1213
- Add optional dependencies on the CUDA NVRTC wheel
1314
- Enable discovery and loading of shared libraries from CUDA wheels
1415
- `cuda-python` is now a meta package, currently depending only on `cuda-bindings` ([see RFC](https://github.com/NVIDIA/cuda-python/issues/105))

cuda_python/docs/source/release/12.8.0-notes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Released on January 24, 2025.
99

1010
## Highlights
1111

12+
- Support Python 3.13
1213
- Add bindings for nvJitLink (requires nvJitLink from CUDA 12.3 or above)
1314
- Add optional dependencies on CUDA NVRTC and nvJitLink wheels
1415
- Enable discovery and loading of shared libraries from CUDA wheels

0 commit comments

Comments
 (0)