Skip to content

Commit 6018239

Browse files
committed
move cuda_core test requirements to pyproject.toml optional dependencies as well
Signed-off-by: Keith Kraus <keith.j.kraus@gmail.com>
1 parent 23d48a9 commit 6018239

File tree

6 files changed

+10
-19
lines changed

6 files changed

+10
-19
lines changed

.github/workflows/test-wheel-linux.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,13 +318,12 @@ jobs:
318318
pushd "${CUDA_BINDINGS_ARTIFACTS_DIR}"
319319
if [[ "${{ matrix.LOCAL_CTK }}" == 1 ]]; then
320320
ls $CUDA_PATH
321-
pip install *.whl
321+
pip install *.whl[test]
322322
else
323-
pip install $(ls *.whl)[all]
323+
pip install $(ls *.whl)[all,test]
324324
fi
325325
popd
326326
327-
pip install $(ls *.whl)[test]
328327
pushd ./cuda_bindings
329328
${SANITIZER_CMD} pytest -rxXs -v tests/
330329
@@ -356,11 +355,10 @@ jobs:
356355
fi
357356
TEST_CUDA_MAJOR="$(cut -d '.' -f 1 <<< ${{ matrix.CUDA_VER }})"
358357
pushd "${CUDA_CORE_ARTIFACTS_DIR}"
359-
pip install $(ls *.whl)["cu${TEST_CUDA_MAJOR}"]
358+
pip install $(ls *.whl)["cu${TEST_CUDA_MAJOR}","test-cu${TEST_CUDA_MAJOR}"]
360359
popd
361360
362361
pushd ./cuda_core
363-
pip install -r "tests/requirements-cu${TEST_CUDA_MAJOR}.txt"
364362
${SANITIZER_CMD} pytest -rxXs -v tests/
365363
366364
# It is a bit convoluted to run the Cython tests against CTK wheels,

.github/workflows/test-wheel-windows.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,13 +246,12 @@ jobs:
246246
if ('${{ matrix.LOCAL_CTK }}' -eq '1') {
247247
Get-ChildItem $env:CUDA_PATH
248248
echo $PATH
249-
pip install (Get-ChildItem -Filter *.whl).FullName
249+
pip install "$((Get-ChildItem -Filter *.whl).FullName)[test]"
250250
} else {
251-
pip install "$((Get-ChildItem -Filter *.whl).FullName)[all]"
251+
pip install "$((Get-ChildItem -Filter *.whl).FullName)[all,test]"
252252
}
253253
Pop-Location
254254
255-
pip install "$((Get-ChildItem -Filter *.whl).FullName)[test]"
256255
Push-Location ./cuda_bindings
257256
pytest -rxXs -v tests/
258257
# skip Cython tests for now (NVIDIA/cuda-python#466)
@@ -273,11 +272,10 @@ jobs:
273272
}
274273
$TEST_CUDA_MAJOR = '${{ matrix.CUDA_VER }}' -split '\.' | Select-Object -First 1
275274
Push-Location $env:CUDA_CORE_ARTIFACTS_DIR
276-
pip install "$((Get-ChildItem -Filter *.whl).FullName)[cu${TEST_CUDA_MAJOR}]"
275+
pip install "$((Get-ChildItem -Filter *.whl).FullName)[cu${TEST_CUDA_MAJOR},test-cu${TEST_CUDA_MAJOR}]"
277276
Pop-Location
278277
279278
Push-Location ./cuda_core
280-
pip install -r "tests/requirements-cu${TEST_CUDA_MAJOR}.txt"
281279
pytest -rxXs -v tests/
282280
Pop-Location
283281

cuda_bindings/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ all = [
3737
"nvidia-nvjitlink-cu12>=12.3",
3838
]
3939

40-
tests = [
40+
test = [
4141
"numpy>=1.21.1",
4242
"pytest>=6.2.4",
4343
"pytest-benchmark>=3.4.1",

cuda_core/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ dependencies = [
4848
[project.optional-dependencies]
4949
cu11 = ["cuda-bindings==11.8.*"]
5050
cu12 = ["cuda-bindings==12.*"]
51+
test = ["pytest>=6.2.4"]
52+
test-cu11 = ["cuda-core[test]", "cupy-cuda11x", "nvidia-cuda-runtime-cu11"] # runtime headers needed by CuPy
53+
test-cu12 = ["cuda-core[test]", "cupy-cuda12x", "nvidia-cuda-runtime-cu12"] # runtime headers needed by CuPy
5154

5255
[project.urls]
5356
homepage = "https://nvidia.github.io/cuda-python/"

cuda_core/tests/requirements-cu11.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

cuda_core/tests/requirements-cu12.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)