4646 BUILD_PYTHON : ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.python.needs_build }}
4747 TEST_BINDINGS : ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.bindings.needs_test }}
4848 TEST_CORE : ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.core.needs_test }}
49+ TEST_PYTHON : ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.python.needs_test }}
50+ BUILD_MAINTENANCE_BINDINGS : >-
51+ ${{ !inputs.single-cuda-major &&
52+ (inputs.workplan == '' ||
53+ fromJSON(inputs.workplan).modules.bindings.needs_build ||
54+ fromJSON(inputs.workplan).modules.bindings.needs_test ||
55+ fromJSON(inputs.workplan).modules.core.needs_build ||
56+ fromJSON(inputs.workplan).modules.core.needs_test ||
57+ fromJSON(inputs.workplan).modules.python.needs_build ||
58+ fromJSON(inputs.workplan).modules.python.needs_test) }}
4959 BASELINE_RUN_ID : ${{ inputs.workplan != '' && fromJSON(inputs.workplan).baseline.run_id || '' }}
5060 BASELINE_SHA : ${{ inputs.workplan != '' && fromJSON(inputs.workplan).baseline.sha || '' }}
5161 strategy :
@@ -83,14 +93,14 @@ jobs:
8393 run : echo "::add-matcher::.github/matchers/compiler.json"
8494
8595 - name : Install rapidsai/sccache
86- if : ${{ startsWith(inputs.host-platform, 'linux') && (env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true' || env.TEST_BINDINGS == 'true') }}
96+ if : ${{ startsWith(inputs.host-platform, 'linux') && (env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true' || env.BUILD_MAINTENANCE_BINDINGS == 'true') }}
8797 uses : ./.github/actions/install-sccache
8898
8999 # The runner only exposes these values to actions, not to `run:` steps or
90100 # the cibuildwheel container, so re-export them for sccache's GHA backend.
91101 # xref: https://github.com/orgs/community/discussions/42856#discussioncomment-7678867
92102 - name : Adding addtional GHA cache-related env vars
93- if : ${{ env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true' || env.TEST_BINDINGS == 'true' }}
103+ if : ${{ env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true' || env.BUILD_MAINTENANCE_BINDINGS == 'true' }}
94104 uses : actions/github-script@v9
95105 with :
96106 script : |
@@ -156,7 +166,7 @@ jobs:
156166 run : ./ci/tools/env-vars build
157167
158168 - name : Prepare local maintenance SCM milestone
159- if : ${{ !inputs.single-cuda-major && ( env.BUILD_BINDINGS == 'true' || env.TEST_BINDINGS == 'true') }}
169+ if : ${{ env.BUILD_MAINTENANCE_BINDINGS == 'true' }}
160170 run : |
161171 python -m ci.tools.bindings_scm_version \
162172 --package-root "${MAINTENANCE_BINDINGS_ROOT}" --sha "${{ github.sha }}"
@@ -204,7 +214,7 @@ jobs:
204214 twine check --strict cuda_pathfinder/*.whl
205215
206216 - name : Constrain builds to the local cuda.pathfinder wheel
207- if : ${{ env.BUILD_BINDINGS == 'true' || env.TEST_BINDINGS == 'true' }}
217+ if : ${{ env.BUILD_BINDINGS == 'true' || env.BUILD_MAINTENANCE_BINDINGS == 'true' }}
208218 run : |
209219 pathfinder_wheels=(cuda_pathfinder/cuda_pathfinder-*.whl)
210220 test "${#pathfinder_wheels[@]}" -eq 1
@@ -412,6 +422,23 @@ jobs:
412422 run-id : ${{ env.BASELINE_RUN_ID }}
413423
414424 # We only need/want a single pure python wheel, pick linux-64 index 0.
425+ - name : Build and check maintenance cuda-python wheel
426+ if : ${{ !inputs.single-cuda-major && (env.BUILD_PYTHON == 'true' || env.TEST_PYTHON == 'true') && strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
427+ run : |
428+ pushd cuda_python
429+ CUDA_PYTHON_BUILD_MAJOR="${MAINTENANCE_CUDA_MAJOR}" \
430+ pip wheel -v --no-deps --wheel-dir "dist/cu${MAINTENANCE_CUDA_MAJOR}" .
431+ twine check --strict "dist/cu${MAINTENANCE_CUDA_MAJOR}"/*.whl
432+ popd
433+
434+ - name : Upload maintenance cuda-python wheel
435+ if : ${{ !inputs.single-cuda-major && (env.BUILD_PYTHON == 'true' || env.TEST_PYTHON == 'true') && strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
436+ uses : actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
437+ with :
438+ name : maintenance-python-wheel
439+ path : cuda_python/dist/cu${{ env.MAINTENANCE_CUDA_MAJOR }}/*.whl
440+ if-no-files-found : error
441+
415442 - name : Build and check cuda-python wheel
416443 if : ${{ env.BUILD_PYTHON == 'true' && strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
417444 run : |
@@ -526,7 +553,7 @@ jobs:
526553
527554 # Note: This overwrites CUDA_PATH etc
528555 - name : Set up mini CTK
529- if : ${{ !inputs.single-cuda-major && (env.BUILD_CORE == 'true' || env.TEST_CORE == 'true' || env.BUILD_BINDINGS == 'true' || env.TEST_BINDINGS == 'true') }}
556+ if : ${{ !inputs.single-cuda-major && (env.BUILD_CORE == 'true' || env.TEST_CORE == 'true' || env.BUILD_MAINTENANCE_BINDINGS == 'true') }}
530557 uses : ./.github/actions/fetch_ctk
531558 continue-on-error : false
532559 with :
@@ -552,7 +579,7 @@ jobs:
552579 if-no-files-found : error
553580
554581 - name : Build maintenance cuda.bindings wheel
555- if : ${{ !inputs.single-cuda-major && ( env.BUILD_BINDINGS == 'true' || env.TEST_BINDINGS == 'true') }}
582+ if : ${{ env.BUILD_MAINTENANCE_BINDINGS == 'true' }}
556583 uses : pypa/cibuildwheel@b9e566a2b284570af229f6c2a33673410d0389a3 # v4.3.4
557584 with :
558585 package-dir : ./${{ env.MAINTENANCE_BINDINGS_ROOT }}/
@@ -562,11 +589,11 @@ jobs:
562589 env : *bindings-wheel-env
563590
564591 - name : Check maintenance cuda.bindings wheel
565- if : ${{ !inputs.single-cuda-major && ( env.BUILD_BINDINGS == 'true' || env.TEST_BINDINGS == 'true') }}
592+ if : ${{ env.BUILD_MAINTENANCE_BINDINGS == 'true' }}
566593 run : twine check --strict "${MAINTENANCE_BINDINGS_ARTIFACTS_DIR}"/*.whl
567594
568595 - name : Upload maintenance cuda.bindings wheel
569- if : ${{ !inputs.single-cuda-major && ( env.BUILD_BINDINGS == 'true' || env.TEST_BINDINGS == 'true') }}
596+ if : ${{ env.BUILD_MAINTENANCE_BINDINGS == 'true' }}
570597 uses : actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
571598 with :
572599 name : ${{ env.MAINTENANCE_BINDINGS_ARTIFACT_NAME }}
@@ -592,48 +619,11 @@ jobs:
592619 path : ${{ env.MAINTENANCE_BINDINGS_CYTHON_TESTS_DIR }}/test_*${{ env.PY_EXT_SUFFIX }}
593620 if-no-files-found : error
594621
595- - name : Look up prior-branch cuda.bindings run ID
596- id : prior-bindings
597- if : ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' }}
598- env :
599- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
600- run : |
601- if ! (command -v gh 2>&1 >/dev/null); then
602- # See https://github.com/cli/cli/blob/trunk/docs/install_linux.md#debian-ubuntu-linux-raspberry-pi-os-apt.
603- # gh is needed for lookup-run-id, which calls gh api.
604- mkdir -p -m 755 /etc/apt/keyrings \
605- && out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \
606- && cat $out | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
607- && chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
608- && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
609- && apt update \
610- && apt install gh -y
611- fi
612-
613- OLD_BRANCH=$(yq '.backport_branch' ci/versions.yml)
614- OLD_ARTIFACT_PATTERN="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda*-${{ inputs.host-platform }}-*[0-9a-f]"
615- LATEST_PRIOR_RUN_ID=$(./ci/tools/lookup-run-id \
616- --branch "${OLD_BRANCH}" \
617- --artifact "${OLD_ARTIFACT_PATTERN}" \
618- NVIDIA/cuda-python "CI")
619- echo "run-id=${LATEST_PRIOR_RUN_ID}" >> "${GITHUB_OUTPUT}"
620- echo "artifact-pattern=${OLD_ARTIFACT_PATTERN}" >> "${GITHUB_OUTPUT}"
621-
622- - name : Download prior-branch cuda.bindings build artifacts
623- if : ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' }}
624- uses : $/.github/actions/download-artifact-retry
625- with :
626- pattern : ${{ steps.prior-bindings.outputs.artifact-pattern }}
627- merge-multiple : " true"
628- path : cuda_bindings_13/dist-prev
629- run-id : ${{ steps.prior-bindings.outputs.run-id }}
630- github-token : ${{ secrets.GITHUB_TOKEN }}
631-
632- - name : Constrain previous cuda.core to the downloaded cuda.bindings wheel
622+ - name : Constrain maintenance cuda.core to the same-run cuda.bindings wheel
633623 if : ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' }}
634624 run : |
635625 pathfinder_wheels=(cuda_pathfinder/cuda_pathfinder-*.whl)
636- bindings_wheels=(cuda_bindings_13/dist-prev/ cuda_bindings-"${BUILD_PREV_CUDA_MAJOR }".*.whl)
626+ bindings_wheels=("${MAINTENANCE_BINDINGS_ARTIFACTS_DIR}"/ cuda_bindings-"${MAINTENANCE_CUDA_MAJOR }".*.whl)
637627 test "${#pathfinder_wheels[@]}" -eq 1
638628 test "${#bindings_wheels[@]}" -eq 1
639629 test -f "${pathfinder_wheels[0]}"
@@ -723,6 +713,40 @@ jobs:
723713
724714 ls -lahR ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
725715
716+ - name : Build maintenance cuda.core Cython tests
717+ if : ${{ !inputs.single-cuda-major && env.TEST_CORE == 'true' }}
718+ run : |
719+ # The current package's test extensions were built in this same source tree.
720+ # Remove generated outputs so Cython and the compiler cannot reuse them.
721+ find "${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}" -maxdepth 1 -type f \
722+ \( -name 'test_*.cpp' -o -name 'test_*.so' -o -name 'test_*.pyd' \) -delete
723+ if [[ -d "${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}/build" ]]; then
724+ find "${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}/build" -type f -delete
725+ fi
726+ pip uninstall -y cuda-bindings cuda-core
727+ pip install ${{ env.MAINTENANCE_BINDINGS_ARTIFACTS_DIR }}/*.whl
728+ if ${{ env.BUILD_CORE == 'true' }}; then
729+ core_wheel=$(find "${{ env.CUDA_CORE_ARTIFACTS_DIR }}/cu${MAINTENANCE_CUDA_MAJOR}" -maxdepth 1 -type f -name '*.whl' -print -quit)
730+ else
731+ core_wheel=$(find "${{ env.CUDA_CORE_ARTIFACTS_DIR }}" -maxdepth 1 -type f -name '*.whl' -print -quit)
732+ fi
733+ if [[ -z "${core_wheel}" ]]; then
734+ echo "No cuda.core wheel found" >&2
735+ exit 1
736+ fi
737+ pip install "${core_wheel}" --group ./cuda_core/pyproject.toml:test
738+ pushd ${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}
739+ bash build_tests.sh
740+ popd
741+
742+ - name : Upload maintenance cuda.core Cython tests
743+ if : ${{ !inputs.single-cuda-major && env.TEST_CORE == 'true' }}
744+ uses : actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
745+ with :
746+ name : ${{ env.CUDA_CORE_ARTIFACT_NAME }}-cu${{ env.MAINTENANCE_CUDA_MAJOR }}-tests
747+ path : ${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}/test_*${{ env.PY_EXT_SUFFIX }}
748+ if-no-files-found : error
749+
726750 - name : Merge cuda.core wheels
727751 if : ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' }}
728752 run : |
0 commit comments