Skip to content

Commit 0471e44

Browse files
committed
Merge branch 'main' into merge_wheel
2 parents b5cc2ff + 1e7dcf2 commit 0471e44

12 files changed

Lines changed: 54 additions & 61 deletions

File tree

.github/workflows/build-wheel.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ jobs:
254254
255255
- name: Build cuda.bindings Cython tests
256256
run: |
257-
pip install $(ls ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl)[test]
257+
pip install ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl --group ./cuda_bindings/pyproject.toml:test
258258
pushd ${{ env.CUDA_BINDINGS_CYTHON_TESTS_DIR }}
259259
bash build_tests.sh
260260
popd
@@ -268,7 +268,7 @@ jobs:
268268

269269
- name: Build cuda.core Cython tests
270270
run: |
271-
pip install $(ls ${{ env.CUDA_CORE_ARTIFACTS_DIR }}/"cu${BUILD_CUDA_MAJOR}"/*.whl)[test]
271+
pip install ${{ env.CUDA_CORE_ARTIFACTS_DIR }}/"cu${BUILD_CUDA_MAJOR}"/*.whl --group ./cuda_core/pyproject.toml:test
272272
pushd ${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}
273273
bash build_tests.sh
274274
popd

.github/workflows/ci.yml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,38 @@ jobs:
3636
cuda_prev_build_ver=$(jq -r .cuda.prev_build.version ci/versions.json)
3737
echo "cuda_prev_build_ver=$cuda_prev_build_ver" >> $GITHUB_OUTPUT
3838
39+
should-skip:
40+
runs-on: ubuntu-latest
41+
outputs:
42+
skip: ${{ steps.get-should-skip.outputs.skip }}
43+
steps:
44+
- name: Checkout repository
45+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
46+
- name: Compute whether to skip builds and tests
47+
id: get-should-skip
48+
env:
49+
GH_TOKEN: ${{ github.token }}
50+
run: |
51+
set -euxo pipefail
52+
if ${{ startsWith(github.ref_name, 'pull-request/') }}; then
53+
skip="$(gh pr view "$(grep -Po '(\d+)$' <<< '${{ github.ref_name }}')" --json title --jq '.title | contains("[no-ci]")')"
54+
else
55+
skip=false
56+
fi
57+
echo "skip=${skip}" >> "$GITHUB_OUTPUT"
58+
3959
# WARNING: make sure all of the build jobs are in sync
4060
build-linux-64:
4161
needs:
4262
- ci-vars
63+
- should-skip
4364
strategy:
4465
fail-fast: false
4566
matrix:
4667
host-platform:
4768
- linux-64
4869
name: Build ${{ matrix.host-platform }}, CUDA ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
49-
if: ${{ github.repository_owner == 'nvidia' }}
70+
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }}
5071
secrets: inherit
5172
uses: ./.github/workflows/build-wheel.yml
5273
with:
@@ -58,13 +79,14 @@ jobs:
5879
build-linux-aarch64:
5980
needs:
6081
- ci-vars
82+
- should-skip
6183
strategy:
6284
fail-fast: false
6385
matrix:
6486
host-platform:
6587
- linux-aarch64
6688
name: Build ${{ matrix.host-platform }}, CUDA ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
67-
if: ${{ github.repository_owner == 'nvidia' }}
89+
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }}
6890
secrets: inherit
6991
uses: ./.github/workflows/build-wheel.yml
7092
with:
@@ -76,13 +98,14 @@ jobs:
7698
build-windows:
7799
needs:
78100
- ci-vars
101+
- should-skip
79102
strategy:
80103
fail-fast: false
81104
matrix:
82105
host-platform:
83106
- win-64
84107
name: Build ${{ matrix.host-platform }}, CUDA ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
85-
if: ${{ github.repository_owner == 'nvidia' }}
108+
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }}
86109
secrets: inherit
87110
uses: ./.github/workflows/build-wheel.yml
88111
with:
@@ -170,15 +193,12 @@ jobs:
170193

171194
checks:
172195
name: Check job status
173-
permissions:
174-
checks: read
196+
runs-on: ubuntu-latest
175197
needs:
176-
- build-linux-64
177198
- test-linux-64
178-
- build-linux-aarch64
179199
- test-linux-aarch64
180-
- build-windows
181200
- test-windows
182201
- doc
183-
secrets: inherit
184-
uses: ./.github/workflows/status-check.yml
202+
steps:
203+
- name: Exit
204+
run: exit 0

.github/workflows/status-check.yml

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ jobs:
284284
run: |
285285
set -euo pipefail
286286
pushd cuda_pathfinder
287-
pip install --only-binary=:all: -v ".[test_nvidia_wheels_cu${TEST_CUDA_MAJOR},test_nvidia_wheels_host]"
287+
pip install --only-binary=:all: -v . --group "test_nvidia_wheels_cu${TEST_CUDA_MAJOR}" --group test_nvidia_wheels_host
288288
pip list
289289
popd
290290

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ jobs:
257257
shell: bash --noprofile --norc -xeuo pipefail {0}
258258
run: |
259259
pushd cuda_pathfinder
260-
pip install --only-binary=:all: -v ".[test_nvidia_wheels_cu${TEST_CUDA_MAJOR},test_nvidia_wheels_host]"
260+
pip install --only-binary=:all: -v . --group "test_nvidia_wheels_cu${TEST_CUDA_MAJOR}" --group test_nvidia_wheels_host
261261
pip list
262262
popd
263263

ci/tools/run-tests

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ test_module=${1}
2424
# (it is a direct dependency of bindings, and a transitive dependency of core)
2525
pushd ./cuda_pathfinder
2626
echo "Installing pathfinder wheel"
27-
pip install $(ls *.whl)[test]
27+
pip install ./*.whl --group test
2828
popd
2929

3030
if [[ "${test_module}" == "pathfinder" ]]; then
@@ -38,15 +38,13 @@ if [[ "${test_module}" == "pathfinder" ]]; then
3838
echo "Number of \"INFO test_\" lines: $line_count"
3939
popd
4040
elif [[ "${test_module}" == "bindings" ]]; then
41-
pushd "${CUDA_BINDINGS_ARTIFACTS_DIR}"
4241
echo "Installing bindings wheel"
42+
pushd ./cuda_bindings
4343
if [[ "${LOCAL_CTK}" == 1 ]]; then
44-
pip install $(ls *.whl)[test]
44+
pip install "${CUDA_BINDINGS_ARTIFACTS_DIR}"/*.whl --group test
4545
else
46-
pip install $(ls *.whl)[all,test]
46+
pip install $(ls "${CUDA_BINDINGS_ARTIFACTS_DIR}"/*.whl)[all] --group test
4747
fi
48-
popd
49-
pushd ./cuda_bindings
5048
echo "Running bindings tests"
5149
${SANITIZER_CMD} pytest -rxXs -v tests/
5250
if [[ "${SKIP_CYTHON_TEST}" == 0 ]]; then
@@ -57,33 +55,29 @@ elif [[ "${test_module}" == "core" ]]; then
5755
# If build/test majors match: cuda.bindings is installed in the previous step.
5856
# If mismatch: cuda.bindings is installed from the backport branch.
5957
if [[ "${SKIP_CUDA_BINDINGS_TEST}" == 1 ]]; then
60-
pushd "${CUDA_BINDINGS_ARTIFACTS_DIR}"
6158
echo "Installing bindings wheel"
6259
if [[ "${LOCAL_CTK}" == 1 ]]; then
63-
pip install *.whl
60+
pip install "${CUDA_BINDINGS_ARTIFACTS_DIR}"/*.whl
6461
else
65-
pip install $(ls *.whl)[all]
62+
pip install $(ls "${CUDA_BINDINGS_ARTIFACTS_DIR}"/*.whl)[all]
6663
fi
67-
popd
6864
fi
6965
TEST_CUDA_MAJOR="$(cut -d '.' -f 1 <<< ${CUDA_VER})"
70-
pushd "${CUDA_CORE_ARTIFACTS_DIR}"
7166
echo "Installing core wheel"
7267

7368
FREE_THREADING=""
7469
if python -c 'import sys; assert not sys._is_gil_enabled()' 2> /dev/null; then
7570
FREE_THREADING+="-ft"
7671
fi
7772

73+
pushd ./cuda_core
7874
if [[ "${LOCAL_CTK}" == 1 ]]; then
7975
# We already installed cuda-bindings, and all CTK components exist locally,
8076
# so just install the test dependencies.
81-
pip install $(ls *.whl)["test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}"]
77+
pip install "${CUDA_CORE_ARTIFACTS_DIR}"/*.whl --group "test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}"
8278
else
83-
pip install $(ls *.whl)["cu${TEST_CUDA_MAJOR}","test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}"]
79+
pip install $(ls "${CUDA_CORE_ARTIFACTS_DIR}"/*.whl)["cu${TEST_CUDA_MAJOR}"] --group "test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}"
8480
fi
85-
popd
86-
pushd ./cuda_core
8781
echo "Running core tests"
8882
${SANITIZER_CMD} pytest -rxXs -v tests/
8983
# Currently our CI always installs the latest bindings (from either major version).

cuda_bindings/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3-
43
[build-system]
54
requires = ["setuptools>=77.0.0", "cython>=3.1,<3.2", "pyclibrary>=0.1.7"]
65
build-backend = "setuptools.build_meta"
@@ -36,6 +35,7 @@ all = [
3635
"cuda-toolkit[cufile]==13.*; sys_platform == 'linux'",
3736
]
3837

38+
[dependency-groups]
3939
test = [
4040
"cython>=3.1,<3.2",
4141
"setuptools>=77.0.0",

cuda_core/pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,9 @@ dependencies = [
4949
[project.optional-dependencies]
5050
cu12 = ["cuda-bindings[all]==12.*"]
5151
cu13 = ["cuda-bindings[all]==13.*"]
52-
# TODO: these should all be in development dependencies; optional dependencies
53-
# are for features exposed to *users*, not a dumping ground for all tooling
54-
# needed to build and test the project
55-
test = ["cython>=3.1", "setuptools", "pytest>=6.2.4"]
52+
53+
[dependency-groups]
54+
test = ["cython>=3.0", "setuptools", "pytest>=6.2.4"]
5655
test-cu12 = ["cuda-core[test]", "cupy-cuda12x; python_version < '3.14'", "cuda-toolkit[cudart]==12.*"] # runtime headers needed by CuPy
5756
test-cu13 = ["cuda-core[test]", "cupy-cuda13x; python_version < '3.14'", "cuda-toolkit[cudart]==13.*"] # runtime headers needed by CuPy
5857
# free threaded build, cupy doesn't support free-threaded builds yet, so avoid installing it for now

cuda_pathfinder/DESCRIPTION.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ cuda-pathfinder: Utilities for locating CUDA components
1111

1212
`cuda.pathfinder <https://nvidia.github.io/cuda-python/cuda-pathfinder/>`_
1313
aims to be a one-stop solution for locating CUDA components. Currently
14-
it supports locating and loading dynamic libraries (``.so``, ``.dll``);
15-
support for headers and other artifacts is in progress.
14+
it supports locating and loading dynamic libraries (``.so``, ``.dll``), and
15+
locating CTK header directories. Support for other artifacts is in progress.
1616

1717
* `Documentation <https://nvidia.github.io/cuda-python/cuda-pathfinder/>`_
1818
* `Releases <https://nvidia.github.io/cuda-python/cuda-pathfinder/latest/release.html>`_

cuda_pathfinder/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ requires-python = ">=3.9"
1010
dynamic = ["version", "readme"]
1111
dependencies = []
1212

13-
[project.optional-dependencies]
13+
[dependency-groups]
1414
test = [
1515
"pytest>=6.2.4",
1616
]

0 commit comments

Comments
 (0)