Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/workflows/build-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -587,20 +587,22 @@ jobs:
OLD_BRANCH=$(yq '.backport_branch' ci/versions.yml)
OLD_BASENAME="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda*-${{ inputs.host-platform }}*"
LATEST_PRIOR_RUN_ID=$(./ci/tools/lookup-run-id --branch "${OLD_BRANCH}" NVIDIA/cuda-python "CI")
PREV_BINDINGS_DIR="cuda_bindings/dist-prev"
PREV_BINDINGS_DIR="${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}"

gh run download $LATEST_PRIOR_RUN_ID -p ${OLD_BASENAME} -R NVIDIA/cuda-python
rm -rf ${OLD_BASENAME}-tests # exclude cython test artifacts
ls -al $OLD_BASENAME
mkdir -p "${PREV_BINDINGS_DIR}"
# Clear any current-CUDA wheel so only the prior wheel is staged.
rm -f "${PREV_BINDINGS_DIR}"/*.whl
mv $OLD_BASENAME/*.whl "${PREV_BINDINGS_DIR}"
rmdir $OLD_BASENAME

- name: Constrain previous cuda.core to the downloaded cuda.bindings wheel
if: ${{ inputs.build-core }}
run: |
pathfinder_wheels=(cuda_pathfinder/cuda_pathfinder-*.whl)
bindings_wheels=(cuda_bindings/dist-prev/cuda_bindings-"${BUILD_PREV_CUDA_MAJOR}".*.whl)
bindings_wheels=("${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}"/cuda_bindings-"${BUILD_PREV_CUDA_MAJOR}".*.whl)
test "${#pathfinder_wheels[@]}" -eq 1
test "${#bindings_wheels[@]}" -eq 1
test -f "${pathfinder_wheels[0]}"
Expand All @@ -618,6 +620,20 @@ jobs:
printf 'cuda-bindings @ %s\n' "${bindings_uri}"
} | tee wheel-constraints/cuda-core-prev.txt

- name: Verify prior cuda.bindings staging
if: ${{ inputs.build-core }}
run: |
# Ensure the staging directory contains exactly one wheel so pip cannot
# accidentally resolve a different cuda.bindings version.
shopt -s nullglob
whl_files=("${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}"/*.whl)
shopt -u nullglob
if [[ "${#whl_files[@]}" -ne 1 ]]; then
echo "Expected exactly one wheel in ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}, found ${#whl_files[@]}:"
ls -la "${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}"
exit 1
fi

- name: Build cuda.core wheel
if: ${{ inputs.build-core }}
uses: pypa/cibuildwheel@4726cd35bb13f7bde50cf2761f2499ac7b3aa32c # v4.1.1
Expand Down
Loading