@@ -182,7 +182,6 @@ jobs:
182
182
# Note: this is for test-time only.
183
183
- " 12.6.2"
184
184
- " 12.0.1"
185
- # FIXME: cannot run cuda.bindings 12.x with CTK 11.x
186
185
- " 11.8.0"
187
186
runner :
188
187
- default
@@ -232,7 +231,7 @@ jobs:
232
231
233
232
BUILD_CUDA_MAJOR="$(cut -d '.' -f 1 <<< ${{ needs.build.outputs.BUILD_CTK_VER }})"
234
233
TEST_CUDA_MAJOR="$(cut -d '.' -f 1 <<< ${{ matrix.cuda-version }})"
235
- if [[ $BUILD_CUDA_MAJOR -gt $TEST_CUDA_MAJOR ]]; then
234
+ if [[ $BUILD_CUDA_MAJOR != $TEST_CUDA_MAJOR ]]; then
236
235
SKIP_CUDA_BINDINGS_TEST=1
237
236
else
238
237
SKIP_CUDA_BINDINGS_TEST=0
@@ -306,18 +305,18 @@ jobs:
306
305
if [[ ${{ matrix.python-version }} == "3.13" ]]; then
307
306
echo "Python 3.13 + cuda-python ${{ matrix.cuda-version }} is not supported, skipping the test..."
308
307
exit 0
309
- else
310
- pip install "cuda-python==$(cut -d '.' -f 1,2 <<< ${{ matrix.cuda-version }}).*"
311
308
fi
312
309
fi
313
310
311
+ # If build/test majors match: cuda.bindings is installed in the previous step.
312
+ # If mismatch: cuda.bindings is installed from PyPI.
313
+ TEST_CUDA_MAJOR="$(cut -d '.' -f 1 <<< ${{ matrix.cuda-version }})"
314
314
pushd "${CUDA_CORE_ARTIFACTS_DIR}"
315
- pip install *.whl
315
+ pip install $(ls *.whl)["cu${TEST_CUDA_MAJOR}"]
316
316
popd
317
317
318
318
pushd ./cuda_core
319
319
# TODO: add requirements.txt for test deps?
320
- # TODO: add cupy as an optional test dep?
321
- pip install pytest
320
+ pip install pytest "cupy-cuda${TEST_CUDA_MAJOR}x"
322
321
pytest -rxXs tests/
323
322
popd
0 commit comments