Skip to content

Commit 9c9757f

Browse files
kkraus14cursoragent
andcommitted
Add --system to all uv pip install/list calls in CI
CI workflows run without a virtual environment, so uv pip requires --system to install into the system Python. Also rebase on latest main to resolve merge conflicts (.gitattributes, .pre-commit-config). Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 0e7e756 commit 9c9757f

File tree

6 files changed

+43
-35
lines changed

6 files changed

+43
-35
lines changed

.github/workflows/build-docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,18 +184,18 @@ jobs:
184184
- name: Install all packages
185185
run: |
186186
pushd cuda_pathfinder
187-
uv pip install *.whl
187+
uv pip install --system *.whl
188188
popd
189189
190190
pushd "${CUDA_BINDINGS_ARTIFACTS_DIR}"
191-
uv pip install *.whl
191+
uv pip install --system *.whl
192192
popd
193193
194194
pushd "${CUDA_CORE_ARTIFACTS_DIR}"
195-
uv pip install *.whl
195+
uv pip install --system *.whl
196196
popd
197197
198-
uv pip install cuda_python*.whl
198+
uv pip install --system cuda_python*.whl
199199
200200
# This step sets the PR_NUMBER/BUILD_LATEST/BUILD_PREVIEW env vars.
201201
- name: Get PR number

.github/workflows/build-wheel.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111

112112
- name: Install twine
113113
run: |
114-
uv pip install twine
114+
uv pip install --system twine
115115
116116
# To keep the build workflow simple, all matrix jobs will build a wheel for later use within this workflow.
117117
- name: Build and check cuda.pathfinder wheel
@@ -320,11 +320,11 @@ jobs:
320320
321321
- name: Install cuda.pathfinder (required for next step)
322322
run: |
323-
uv pip install cuda_pathfinder/dist/*.whl
323+
uv pip install --system cuda_pathfinder/dist/*.whl
324324
325325
- name: Build cuda.bindings Cython tests
326326
run: |
327-
uv pip install ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl
327+
uv pip install --system ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl
328328
uv sync --package cuda-bindings --only-group test --no-install-project
329329
pushd ${{ env.CUDA_BINDINGS_CYTHON_TESTS_DIR }}
330330
bash build_tests.sh
@@ -339,7 +339,7 @@ jobs:
339339

340340
- name: Build cuda.core Cython tests
341341
run: |
342-
uv pip install ${{ env.CUDA_CORE_ARTIFACTS_DIR }}/"cu${BUILD_CUDA_MAJOR}"/*.whl
342+
uv pip install --system ${{ env.CUDA_CORE_ARTIFACTS_DIR }}/"cu${BUILD_CUDA_MAJOR}"/*.whl
343343
uv sync --package cuda-core --only-group test --no-install-project
344344
pushd ${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}
345345
bash build_tests.sh
@@ -454,7 +454,7 @@ jobs:
454454
455455
- name: Merge cuda.core wheels
456456
run: |
457-
uv pip install wheel
457+
uv pip install --system wheel
458458
python ci/tools/merge_cuda_core_wheels.py \
459459
"${{ env.CUDA_CORE_ARTIFACTS_DIR }}"/cu"${BUILD_CUDA_MAJOR}"/cuda_core*.whl \
460460
"${{ env.CUDA_CORE_ARTIFACTS_DIR }}"/cu"${BUILD_PREV_CUDA_MAJOR}"/cuda_core*.whl \

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,18 +282,18 @@ jobs:
282282
- name: Ensure cuda-python installable
283283
run: |
284284
if [[ "${{ matrix.LOCAL_CTK }}" == 1 ]]; then
285-
uv pip install cuda_python*.whl
285+
uv pip install --system cuda_python*.whl
286286
else
287-
uv pip install $(ls cuda_python*.whl)[all]
287+
uv pip install --system $(ls cuda_python*.whl)[all]
288288
fi
289289
290290
- name: Install cuda.pathfinder extra wheels for testing
291291
run: |
292292
set -euo pipefail
293293
pushd cuda_pathfinder
294-
uv pip install -v ./*.whl
294+
uv pip install --system -v ./*.whl
295295
uv sync --package cuda-pathfinder --only-group "test-cu${TEST_CUDA_MAJOR}" --no-install-project
296-
uv pip list
296+
uv pip list --system
297297
popd
298298
299299
- name: Run cuda.pathfinder tests with all_must_work

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,18 +260,18 @@ jobs:
260260
shell: bash --noprofile --norc -xeuo pipefail {0}
261261
run: |
262262
if [[ "${{ matrix.LOCAL_CTK }}" == 1 ]]; then
263-
uv pip install cuda_python*.whl
263+
uv pip install --system cuda_python*.whl
264264
else
265-
uv pip install $(ls cuda_python*.whl)[all]
265+
uv pip install --system $(ls cuda_python*.whl)[all]
266266
fi
267267
268268
- name: Install cuda.pathfinder extra wheels for testing
269269
shell: bash --noprofile --norc -xeuo pipefail {0}
270270
run: |
271271
pushd cuda_pathfinder
272-
uv pip install -v ./*.whl
272+
uv pip install --system -v ./*.whl
273273
uv sync --package cuda-pathfinder --only-group "test-cu${TEST_CUDA_MAJOR}" --no-install-project
274-
uv pip list
274+
uv pip list --system
275275
popd
276276
277277
- name: Run cuda.pathfinder tests with all_must_work

.pre-commit-config.yaml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,12 @@ repos:
5555
- id: check-yaml
5656
- id: debug-statements
5757
- id: end-of-file-fixer
58+
exclude: &gen_exclude '^(?:cuda_python/README\.md|cuda_bindings/cuda/bindings/.*\.in?|cuda_bindings/docs/source/module/.*\.rst?)$'
5859
- id: mixed-line-ending
5960
- id: trailing-whitespace
61+
exclude: *gen_exclude
6062

63+
# Checking for common mistakes
6164
- repo: https://github.com/pre-commit/pygrep-hooks
6265
rev: "3a6eb0fadf60b3cccfd80bad9dbb6fae7e47b316" # frozen: v1.10.0
6366
hooks:
@@ -66,22 +69,27 @@ repos:
6669
- id: rst-inline-touching-normal
6770

6871
- repo: https://github.com/pre-commit/mirrors-mypy
69-
rev: "3fa3bf0572b3af5e0b2fba0b6e76a1e0c4e1fdee" # frozen: v1.16.1
72+
rev: a66e98df7b4aeeb3724184b332785976d062b92e # frozen: v1.19.1
7073
hooks:
71-
- id: mypy
72-
name: mypy-pathfinder
73-
args: ["--config-file=cuda_pathfinder/pyproject.toml"]
74-
files: "^cuda_pathfinder/"
75-
exclude: "^cuda_pathfinder/tests/"
74+
- id: mypy
75+
name: mypy-pathfinder
76+
files: ^cuda_pathfinder/cuda/.*\.py$ # Exclude tests directory
77+
args: [--config-file=cuda_pathfinder/pyproject.toml]
7678

7779
- repo: https://github.com/rhysd/actionlint
78-
rev: "a1bcb27e3e8727e0b92d7d36c5a6f4b076b32b34" # frozen: v1.7.7
80+
rev: "0933c147c9d6587653d45fdcb4c497c57a65f9af" # frozen: v1.7.10
7981
hooks:
8082
- id: actionlint
81-
name: Lint GitHub Actions workflow files
83+
args: ["-shellcheck="]
84+
exclude: ^\.github/workflows/coverage.yml$
8285

8386
- repo: https://github.com/MarcoGorelli/cython-lint
84-
rev: "48ca7bf3eb3d0bba6c3e76ba43b0a9e0a1f9bcc9" # frozen: v0.16.6
87+
rev: "d9ff7ce99ef4f2ae8fba93079ca9d76c4651d4ac" # frozen: v0.18.0
8588
hooks:
86-
- id: cython-lint
87-
args: ['--max-line-length=320']
89+
- id: cython-lint
90+
args: [--no-pycodestyle]
91+
exclude: ^cuda_bindings/
92+
93+
94+
default_language_version:
95+
python: python3

ci/tools/run-tests

Lines changed: 7 additions & 7 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-
uv pip install ./*.whl
27+
uv pip install --system ./*.whl
2828
uv sync --package cuda-pathfinder --only-group test --no-install-project
2929
popd
3030

@@ -42,9 +42,9 @@ elif [[ "${test_module}" == "bindings" ]]; then
4242
echo "Installing bindings wheel"
4343
pushd ./cuda_bindings
4444
if [[ "${LOCAL_CTK}" == 1 ]]; then
45-
uv pip install "${CUDA_BINDINGS_ARTIFACTS_DIR}"/*.whl
45+
uv pip install --system "${CUDA_BINDINGS_ARTIFACTS_DIR}"/*.whl
4646
else
47-
uv pip install $(ls "${CUDA_BINDINGS_ARTIFACTS_DIR}"/*.whl)[all]
47+
uv pip install --system $(ls "${CUDA_BINDINGS_ARTIFACTS_DIR}"/*.whl)[all]
4848
fi
4949
uv sync --package cuda-bindings --only-group test --no-install-project
5050
echo "Running bindings tests"
@@ -59,9 +59,9 @@ elif [[ "${test_module}" == "core" ]]; then
5959
if [[ "${SKIP_CUDA_BINDINGS_TEST}" == 1 ]]; then
6060
echo "Installing bindings wheel"
6161
if [[ "${LOCAL_CTK}" == 1 ]]; then
62-
uv pip install "${CUDA_BINDINGS_ARTIFACTS_DIR}"/*.whl
62+
uv pip install --system "${CUDA_BINDINGS_ARTIFACTS_DIR}"/*.whl
6363
else
64-
uv pip install $(ls "${CUDA_BINDINGS_ARTIFACTS_DIR}"/*.whl)[all]
64+
uv pip install --system $(ls "${CUDA_BINDINGS_ARTIFACTS_DIR}"/*.whl)[all]
6565
fi
6666
fi
6767
TEST_CUDA_MAJOR="$(cut -d '.' -f 1 <<< ${CUDA_VER})"
@@ -76,9 +76,9 @@ elif [[ "${test_module}" == "core" ]]; then
7676
if [[ "${LOCAL_CTK}" == 1 ]]; then
7777
# We already installed cuda-bindings, and all CTK components exist locally,
7878
# so just install the test dependencies.
79-
uv pip install "${CUDA_CORE_ARTIFACTS_DIR}"/*.whl
79+
uv pip install --system "${CUDA_CORE_ARTIFACTS_DIR}"/*.whl
8080
else
81-
uv pip install $(ls "${CUDA_CORE_ARTIFACTS_DIR}"/*.whl)["cu${TEST_CUDA_MAJOR}"]
81+
uv pip install --system $(ls "${CUDA_CORE_ARTIFACTS_DIR}"/*.whl)["cu${TEST_CUDA_MAJOR}"]
8282
fi
8383
uv sync --package cuda-core --only-group "test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}" --no-install-project
8484
echo "Running core tests"

0 commit comments

Comments
 (0)