@@ -158,14 +158,17 @@ jobs:
158158 cuda-version :
159159 # Note: this is for test-time only.
160160 - " 11.8.0"
161+ local-ctk :
162+ - 1 # use mini CTK
163+ - 0 # use CTK wheels
161164 runner :
162165 - default
163166 include :
164167 - host-platform : linux-64
165168 python-version : " 3.12"
166169 cuda-version : " 11.8.0"
167170 runner : H100
168- name : Test (${{ matrix.host-platform }}, Python ${{ matrix.python-version }}, CUDA ${{ matrix.cuda-version }}, Runner ${{ matrix.runner }})
171+ name : Test (${{ matrix.host-platform }}, Python ${{ matrix.python-version }}, CUDA ${{ matrix.cuda-version }}, Runner ${{ matrix.runner }}, ${{ (matrix.local-ctk == '1' && 'local CTK') || 'CTK wheels' }} )
169172 # The build stage could fail but we want the CI to keep moving.
170173 if : ${{ github.repository_owner == 'nvidia' && always() }}
171174 permissions :
@@ -239,6 +242,7 @@ jobs:
239242 AGENT_TOOLSDIRECTORY : " /opt/hostedtoolcache"
240243
241244 - name : Set up mini CTK
245+ if : ${{ matrix.local-ctk == '1' }}
242246 uses : ./.github/actions/fetch_ctk
243247 continue-on-error : false
244248 with :
@@ -249,24 +253,31 @@ jobs:
249253 if : ${{ env.SKIP_CUDA_BINDINGS_TEST == '0' }}
250254 shell : bash --noprofile --norc -xeuo pipefail {0}
251255 run : |
252- ls $CUDA_PATH
253-
254256 pushd "${CUDA_BINDINGS_ARTIFACTS_DIR}"
255- pip install *.whl
257+ if [[ "${{ matrix.local-ctk }}" == 1 ]]; then
258+ ls $CUDA_PATH
259+ pip install *.whl
260+ else
261+ pip install $(ls *.whl)[all]
262+ fi
256263 popd
257264
258265 pushd ./cuda_bindings
259266 pip install -r requirements.txt
260267 pytest -rxXs tests/
261- if [[ "${{ matrix.host-platform }}" == linux* ]]; then
262- # cython tests require gcc
263- apt install -y build-essential
264- bash tests_cython/build_tests.sh
265- elif [[ "${{ matrix.host-platform }}" == win* ]]; then
266- # TODO: enable this once win-64 runners are up
267- exit 1
268- fi
269- pytest -rxXs tests_cython
268+ # It is a bit convoluted to run the Cython tests against CTK wheels,
269+ # so let's just skip them.
270+ if [[ "${{ matrix.local-ctk }}" == 1 ]]; then
271+ if [[ "${{ matrix.host-platform }}" == linux* ]]; then
272+ # cython tests require gcc
273+ apt install -y build-essential
274+ bash tests_cython/build_tests.sh
275+ elif [[ "${{ matrix.host-platform }}" == win* ]]; then
276+ # TODO: enable this once win-64 runners are up
277+ exit 1
278+ fi
279+ pytest -rxXs tests_cython
280+ fi
270281 popd
271282
272283 checks :
0 commit comments