Skip to content

Commit c562e9b

Browse files
committed
ci: simplify local wheel selection
1 parent 428ea82 commit c562e9b

2 files changed

Lines changed: 16 additions & 42 deletions

File tree

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

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -390,26 +390,16 @@ jobs:
390390
if ${{ inputs.test-bindings || inputs.test-core }}; then
391391
dependency_args=(--no-deps)
392392
else
393-
pathfinder_wheels=(./cuda_pathfinder/cuda_pathfinder-*.whl)
394-
bindings_wheels=("${CUDA_BINDINGS_ARTIFACTS_DIR}"/cuda_bindings-*.whl)
395-
test "${#pathfinder_wheels[@]}" -eq 1
396-
test "${#bindings_wheels[@]}" -eq 1
397-
test -f "${pathfinder_wheels[0]}"
398-
test -f "${bindings_wheels[0]}"
399-
if [[ "${{ matrix.LOCAL_CTK }}" == 1 ]]; then
400-
dependency_args=("${pathfinder_wheels[0]}" "${bindings_wheels[0]}")
401-
else
402-
dependency_args=("${pathfinder_wheels[0]}" "${bindings_wheels[0]}[all]")
403-
fi
393+
dependency_args=(
394+
./cuda_pathfinder/cuda_pathfinder-*.whl
395+
"${CUDA_BINDINGS_ARTIFACTS_DIR}"/cuda_bindings-*.whl
396+
)
404397
fi
405-
python_wheels=(cuda_python*.whl)
406-
test "${#python_wheels[@]}" -eq 1
407-
test -f "${python_wheels[0]}"
408-
if [[ "${{ matrix.LOCAL_CTK }}" == 1 ]]; then
409-
pip install --only-binary=:all: "${dependency_args[@]}" "${python_wheels[0]}"
410-
else
411-
pip install --only-binary=:all: "${dependency_args[@]}" "${python_wheels[0]}[all]"
398+
python_requirements=(cuda_python*.whl)
399+
if [[ "${{ matrix.LOCAL_CTK }}" != 1 ]]; then
400+
python_requirements=("${python_requirements[@]/%/[all]}")
412401
fi
402+
pip install --only-binary=:all: "${dependency_args[@]}" "${python_requirements[@]}"
413403
414404
- name: Install cuda.pathfinder extra wheels for testing
415405
if: ${{ inputs.test-mode == 'standard' && inputs.test-pathfinder }}

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

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -360,32 +360,16 @@ jobs:
360360
if ('${{ inputs.test-bindings || inputs.test-core }}' -eq 'true') {
361361
$dependencyArgs = @('--no-deps')
362362
} else {
363-
$pathfinderWheels = @(Get-ChildItem -Path ./cuda_pathfinder -Filter cuda_pathfinder-*.whl -File)
364-
$bindingsWheels = @(Get-ChildItem -Path $env:CUDA_BINDINGS_ARTIFACTS_DIR -Filter cuda_bindings-*.whl -File)
365-
if ($pathfinderWheels.Count -ne 1) {
366-
throw "Expected exactly one cuda-pathfinder wheel, found $($pathfinderWheels.Count)"
367-
}
368-
if ($bindingsWheels.Count -ne 1) {
369-
throw "Expected exactly one cuda-bindings wheel, found $($bindingsWheels.Count)"
370-
}
371-
$pathfinderWheel = $pathfinderWheels[0].FullName
372-
$bindingsWheel = $bindingsWheels[0].FullName
373-
if ('${{ matrix.LOCAL_CTK }}' -eq '1') {
374-
$dependencyArgs = @($pathfinderWheel, $bindingsWheel)
375-
} else {
376-
$dependencyArgs = @($pathfinderWheel, "${bindingsWheel}[all]")
377-
}
378-
}
379-
$pythonWheels = @(Get-ChildItem -Filter cuda_python*.whl -File)
380-
if ($pythonWheels.Count -ne 1) {
381-
throw "Expected exactly one cuda-python wheel, found $($pythonWheels.Count)"
363+
$dependencyArgs = @(
364+
(Get-Item ./cuda_pathfinder/cuda_pathfinder-*.whl).FullName
365+
(Get-Item "$env:CUDA_BINDINGS_ARTIFACTS_DIR/cuda_bindings-*.whl").FullName
366+
)
382367
}
383-
$pythonWheel = $pythonWheels[0].FullName
384-
if ('${{ matrix.LOCAL_CTK }}' -eq '1') {
385-
pip install --only-binary=:all: @dependencyArgs $pythonWheel
386-
} else {
387-
pip install --only-binary=:all: @dependencyArgs "${pythonWheel}[all]"
368+
$pythonRequirements = @((Get-Item ./cuda_python*.whl).FullName)
369+
if ('${{ matrix.LOCAL_CTK }}' -ne '1') {
370+
$pythonRequirements = @($pythonRequirements | ForEach-Object { "$($_)[all]" })
388371
}
372+
pip install --only-binary=:all: @dependencyArgs @pythonRequirements
389373
390374
- name: Install cuda.pathfinder extra wheels for testing
391375
if: ${{ inputs.test-mode == 'standard' && inputs.test-pathfinder }}

0 commit comments

Comments
 (0)