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
+ defaults :
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
63
66
uses : ilammy/msvc-dev-cmd@v1
64
67
65
68
- name : Set environment variables
66
- shell : bash --noprofile --norc -xeuo pipefail {0}
67
69
run : |
68
70
PYTHON_VERSION_FORMATTED=$(echo '${{ matrix.python-version }}' | tr -d '.')
69
71
if [[ "${{ matrix.host-platform }}" == linux* ]]; then
81
83
echo "CIBW_BUILD=${CIBW_BUILD}" >> $GITHUB_ENV
82
84
83
85
- name : Dump environment
84
- shell : bash --noprofile --norc -xeuo pipefail {0}
85
86
run : |
86
87
env
87
88
@@ -110,7 +111,6 @@ jobs:
110
111
output-dir : ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
111
112
112
113
- name : List the cuda.bindings artifacts directory
113
- shell : bash --noprofile --norc -xeuo pipefail {0}
114
114
run : |
115
115
if [[ "${{ matrix.host-platform }}" == win* ]]; then
116
116
export CHOWN=chown
@@ -122,8 +122,8 @@ jobs:
122
122
123
123
# TODO: enable this after NVIDIA/cuda-python#297 is resolved
124
124
# - name: Check cuda.bindings wheel
125
- # shell: bash --noprofile --norc -xeuo pipefail {0}
126
125
# run: |
126
+ # pip install twine
127
127
# twine check ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl
128
128
129
129
- name : Upload cuda.bindings build artifacts
@@ -132,7 +132,36 @@ jobs:
132
132
name : ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}
133
133
path : ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl
134
134
if-no-files-found : error
135
- overwrite : ' true'
135
+
136
+ # upload-artifact's "overwrite: true" option has a race condition among parallel
137
+ # jobs, so we let job 0 do the work
138
+ - name : Build and check cuda-python wheel
139
+ if : ${{ strategy.job-index == 0 }}
140
+ run : |
141
+ pushd cuda_python
142
+ pip wheel -v --no-deps .
143
+ pip install twine # TODO: remove me (see above)
144
+ twine check *.whl
145
+ popd
146
+
147
+ - name : List the cuda-python artifacts directory
148
+ if : ${{ strategy.job-index == 0 }}
149
+ run : |
150
+ if [[ "${{ matrix.host-platform }}" == win* ]]; then
151
+ export CHOWN=chown
152
+ else
153
+ export CHOWN="sudo chown"
154
+ fi
155
+ $CHOWN -R $(whoami) cuda_python/*.whl
156
+ ls -lahR cuda_python
157
+
158
+ - name : Upload cuda-python build artifacts
159
+ if : ${{ strategy.job-index == 0 }}
160
+ uses : actions/upload-artifact@v4
161
+ with :
162
+ name : cuda-python-wheel
163
+ path : cuda_python/*.whl
164
+ if-no-files-found : error
136
165
137
166
- name : Pass environment variables to the next runner
138
167
id : pass_env
@@ -186,9 +215,11 @@ jobs:
186
215
NVIDIA_VISIBLE_DEVICES : ${{ env.NVIDIA_VISIBLE_DEVICES }}
187
216
needs :
188
217
- build
218
+ defaults :
219
+ run :
220
+ shell : bash --noprofile --norc -xeuo pipefail {0}
189
221
steps :
190
222
- name : Ensure GPU is working
191
- shell : bash --noprofile --norc -xeuo pipefail {0}
192
223
run : nvidia-smi
193
224
194
225
- name : Checkout ${{ github.event.repository.name }}
@@ -198,7 +229,6 @@ jobs:
198
229
ref : ${{ github.head_ref || github.ref_name }}
199
230
200
231
- name : Set environment variables
201
- shell : bash --noprofile --norc -xeuo pipefail {0}
202
232
run : |
203
233
PYTHON_VERSION_FORMATTED=$(echo '${{ matrix.python-version }}' | tr -d '.')
204
234
if [[ "${{ matrix.host-platform }}" == linux* ]]; then
@@ -221,14 +251,24 @@ jobs:
221
251
echo "CUDA_BINDINGS_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_bindings/dist")" >> $GITHUB_ENV
222
252
echo "SKIP_CUDA_BINDINGS_TEST=${SKIP_CUDA_BINDINGS_TEST}" >> $GITHUB_ENV
223
253
254
+ - name : Download cuda-python build artifacts
255
+ uses : actions/download-artifact@v4
256
+ with :
257
+ name : cuda-python-wheel
258
+ path : .
259
+
260
+ - name : Display structure of downloaded cuda-python artifacts
261
+ run : |
262
+ pwd
263
+ ls -lahR .
264
+
224
265
- name : Download cuda.bindings build artifacts
225
266
uses : actions/download-artifact@v4
226
267
with :
227
268
name : ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}
228
269
path : ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
229
270
230
271
- name : Display structure of downloaded cuda.bindings artifacts
231
- shell : bash --noprofile --norc -xeuo pipefail {0}
232
272
run : |
233
273
pwd
234
274
ls -lahR $CUDA_BINDINGS_ARTIFACTS_DIR
@@ -251,7 +291,6 @@ jobs:
251
291
252
292
- name : Run cuda.bindings tests
253
293
if : ${{ env.SKIP_CUDA_BINDINGS_TEST == '0' }}
254
- shell : bash --noprofile --norc -xeuo pipefail {0}
255
294
run : |
256
295
pushd "${CUDA_BINDINGS_ARTIFACTS_DIR}"
257
296
if [[ "${{ matrix.local-ctk }}" == 1 ]]; then
@@ -280,6 +319,10 @@ jobs:
280
319
fi
281
320
popd
282
321
322
+ - name : Ensure cuda-python installable
323
+ run : |
324
+ pip install cuda_python*.whl
325
+
283
326
checks :
284
327
name : Check job status
285
328
permissions :
0 commit comments