42
42
# (matrix.host-platform == 'win-64' && 'windows-amd64-cpu8') }}
43
43
outputs :
44
44
BUILD_CTK_VER : ${{ steps.pass_env.outputs.CUDA_VERSION }}
45
+ default :
46
+ run :
47
+ shell : bash --noprofile --norc -xeuo pipefail {0}
45
48
steps :
46
49
- name : Checkout ${{ github.event.repository.name }}
47
50
uses : actions/checkout@v4
62
65
uses : ilammy/msvc-dev-cmd@v1
63
66
64
67
- name : Set environment variables
65
- shell : bash --noprofile --norc -xeuo pipefail {0}
66
68
run : |
67
69
PYTHON_VERSION_FORMATTED=$(echo '${{ matrix.python-version }}' | tr -d '.')
68
70
if [[ "${{ matrix.host-platform }}" == linux* ]]; then
82
84
echo "CIBW_BUILD=${CIBW_BUILD}" >> $GITHUB_ENV
83
85
84
86
- name : Dump environment
85
- shell : bash --noprofile --norc -xeuo pipefail {0}
86
87
run : |
87
88
env
88
89
97
98
output-dir : ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
98
99
99
100
- name : List the cuda.core artifacts directory
100
- shell : bash --noprofile --norc -xeuo pipefail {0}
101
101
run : |
102
102
if [[ "${{ matrix.host-platform }}" == win* ]]; then
103
103
export CHOWN=chown
@@ -108,7 +108,6 @@ jobs:
108
108
ls -lahR ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
109
109
110
110
- name : Check cuda.core wheel
111
- shell : bash --noprofile --norc -xeuo pipefail {0}
112
111
run : |
113
112
pip install twine
114
113
twine check ${{ env.CUDA_CORE_ARTIFACTS_DIR }}/*.whl
@@ -146,7 +145,6 @@ jobs:
146
145
output-dir : ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
147
146
148
147
- name : List the cuda.bindings artifacts directory
149
- shell : bash --noprofile --norc -xeuo pipefail {0}
150
148
run : |
151
149
if [[ "${{ matrix.host-platform }}" == win* ]]; then
152
150
export CHOWN=chown
@@ -158,7 +156,6 @@ jobs:
158
156
159
157
# TODO: enable this after NVIDIA/cuda-python#297 is resolved
160
158
# - name: Check cuda.bindings wheel
161
- # shell: bash --noprofile --norc -xeuo pipefail {0}
162
159
# run: |
163
160
# twine check ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl
164
161
@@ -170,6 +167,31 @@ jobs:
170
167
if-no-files-found : error
171
168
overwrite : ' true'
172
169
170
+ - name : Build and check cuda-python wheel
171
+ run : |
172
+ pushd cuda_python
173
+ pip wheel -v --no-deps .
174
+ twine check *.whl
175
+ popd
176
+
177
+ - name : List the cuda-python artifacts directory
178
+ run : |
179
+ if [[ "${{ matrix.host-platform }}" == win* ]]; then
180
+ export CHOWN=chown
181
+ else
182
+ export CHOWN="sudo chown"
183
+ fi
184
+ $CHOWN -R $(whoami) cuda_python/*.whl
185
+ ls -lahR cuda_python
186
+
187
+ - name : Upload cuda.bindings build artifacts
188
+ uses : actions/upload-artifact@v4
189
+ with :
190
+ name : cuda-python-wheel
191
+ path : cuda_python/*.whl
192
+ if-no-files-found : error
193
+ overwrite : ' true'
194
+
173
195
- name : Pass environment variables to the next runner
174
196
id : pass_env
175
197
run : |
@@ -221,9 +243,11 @@ jobs:
221
243
NVIDIA_VISIBLE_DEVICES : ${{ env.NVIDIA_VISIBLE_DEVICES }}
222
244
needs :
223
245
- build
246
+ default :
247
+ run :
248
+ shell : bash --noprofile --norc -xeuo pipefail {0}
224
249
steps :
225
250
- name : Ensure GPU is working
226
- shell : bash --noprofile --norc -xeuo pipefail {0}
227
251
run : nvidia-smi
228
252
229
253
- name : Checkout ${{ github.event.repository.name }}
@@ -232,7 +256,6 @@ jobs:
232
256
fetch-depth : 0
233
257
234
258
- name : Set environment variables
235
- shell : bash --noprofile --norc -xeuo pipefail {0}
236
259
run : |
237
260
PYTHON_VERSION_FORMATTED=$(echo '${{ matrix.python-version }}' | tr -d '.')
238
261
if [[ "${{ matrix.host-platform }}" == linux* ]]; then
@@ -257,14 +280,24 @@ jobs:
257
280
echo "CUDA_BINDINGS_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_bindings/dist")" >> $GITHUB_ENV
258
281
echo "SKIP_CUDA_BINDINGS_TEST=${SKIP_CUDA_BINDINGS_TEST}" >> $GITHUB_ENV
259
282
283
+ - name : Download cuda-python build artifacts
284
+ uses : actions/download-artifact@v4
285
+ with :
286
+ name : cuda-python-wheel
287
+ path : .
288
+
289
+ - name : Display structure of downloaded cuda-python artifacts
290
+ run : |
291
+ pwd
292
+ ls -lahR .
293
+
260
294
- name : Download cuda.bindings build artifacts
261
295
uses : actions/download-artifact@v4
262
296
with :
263
297
name : ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}
264
298
path : ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
265
299
266
300
- name : Display structure of downloaded cuda.bindings artifacts
267
- shell : bash --noprofile --norc -xeuo pipefail {0}
268
301
run : |
269
302
pwd
270
303
ls -lahR $CUDA_BINDINGS_ARTIFACTS_DIR
@@ -276,7 +309,6 @@ jobs:
276
309
path : ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
277
310
278
311
- name : Display structure of downloaded cuda.core build artifacts
279
- shell : bash --noprofile --norc -xeuo pipefail {0}
280
312
run : |
281
313
pwd
282
314
ls -lahR $CUDA_CORE_ARTIFACTS_DIR
@@ -295,7 +327,6 @@ jobs:
295
327
296
328
- name : Run cuda.bindings tests
297
329
if : ${{ env.SKIP_CUDA_BINDINGS_TEST == '0' }}
298
- shell : bash --noprofile --norc -xeuo pipefail {0}
299
330
run : |
300
331
ls $CUDA_PATH
301
332
@@ -311,7 +342,6 @@ jobs:
311
342
popd
312
343
313
344
- name : Run cuda.core tests
314
- shell : bash --noprofile --norc -xeuo pipefail {0}
315
345
run : |
316
346
if [[ ${{ matrix.python-version }} == "3.13" ]]; then
317
347
# TODO: remove this hack once cuda-python has a cp313 build
@@ -333,6 +363,10 @@ jobs:
333
363
pytest -rxXs tests/
334
364
popd
335
365
366
+ - name : Ensure cuda-python installable
367
+ run : |
368
+ pip install cuda_python*.whl
369
+
336
370
doc :
337
371
name : Docs
338
372
# The build stage could fail but we want the CI to keep moving.
0 commit comments