Skip to content

Commit 9711fe3

Browse files
authored
Fix Windows workflow bug and harden CI workflows with --only-binary=:all: (#1493)
Fix bug in Windows workflow where pip install used '.' directory instead of wheel files, causing setuptools-scm to build from source in shallow clones and produce invalid fallback versions (0.1.dev...). The bug was noticed because pathfinder was first built with an invalid version number due to the shallow clone, and only then replaced with a wheel in a subsequent step. Changes: - Windows: Change 'pip install .' to 'pip install ./*.whl' to prevent source builds - Linux: Already had the correct pattern, but add --only-binary=:all: - Both workflows: Systematically add --only-binary=:all: to all pip install commands to make intent explicit and guard against accidental source builds This ensures CI tests the exact artifacts that would be distributed.
1 parent 264524b commit 9711fe3

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,17 +269,15 @@ jobs:
269269
- name: Ensure cuda-python installable
270270
run: |
271271
if [[ "${{ matrix.LOCAL_CTK }}" == 1 ]]; then
272-
pip install cuda_python*.whl
272+
pip install --only-binary=:all: cuda_python*.whl
273273
else
274-
pip install $(ls cuda_python*.whl)[all]
274+
pip install --only-binary=:all: $(ls cuda_python*.whl)[all]
275275
fi
276276
277277
- name: Install cuda.pathfinder extra wheels for testing
278278
run: |
279279
set -euo pipefail
280280
pushd cuda_pathfinder
281-
# Install pathfinder from the pre-built wheel, since building from
282-
# source won't work in this context (we don't have a git checkout).
283281
pip install --only-binary=:all: -v ./*.whl --group "test-cu${TEST_CUDA_MAJOR}"
284282
pip list
285283
popd

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,16 +236,16 @@ jobs:
236236
- name: Ensure cuda-python installable
237237
run: |
238238
if ('${{ matrix.LOCAL_CTK }}' -eq '1') {
239-
pip install (Get-ChildItem -Filter cuda_python*.whl).FullName
239+
pip install --only-binary=:all: (Get-ChildItem -Filter cuda_python*.whl).FullName
240240
} else {
241-
pip install "$((Get-ChildItem -Filter cuda_python*.whl).FullName)[all]"
241+
pip install --only-binary=:all: "$((Get-ChildItem -Filter cuda_python*.whl).FullName)[all]"
242242
}
243243
244244
- name: Install cuda.pathfinder extra wheels for testing
245245
shell: bash --noprofile --norc -xeuo pipefail {0}
246246
run: |
247247
pushd cuda_pathfinder
248-
pip install --only-binary=:all: -v . --group "test-cu${TEST_CUDA_MAJOR}"
248+
pip install --only-binary=:all: -v ./*.whl --group "test-cu${TEST_CUDA_MAJOR}"
249249
pip list
250250
popd
251251

0 commit comments

Comments
 (0)