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 :
@@ -88,14 +98,14 @@ jobs:
8898 run : echo "::add-matcher::.github/matchers/compiler.json"
8999
90100 - name : Install rapidsai/sccache
91- if : ${{ startsWith(inputs.host-platform, 'linux') && (env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true' || env.TEST_BINDINGS == 'true') }}
101+ if : ${{ startsWith(inputs.host-platform, 'linux') && (env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true' || env.BUILD_MAINTENANCE_BINDINGS == 'true') }}
92102 uses : ./.github/actions/install-sccache
93103
94104 # The runner only exposes these values to actions, not to `run:` steps or
95105 # the cibuildwheel container, so re-export them for sccache's GHA backend.
96106 # xref: https://github.com/orgs/community/discussions/42856#discussioncomment-7678867
97107 - name : Adding addtional GHA cache-related env vars
98- if : ${{ env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true' || env.TEST_BINDINGS == 'true' }}
108+ if : ${{ env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true' || env.BUILD_MAINTENANCE_BINDINGS == 'true' }}
99109 uses : actions/github-script@v9.0.0
100110 with :
101111 script : |
@@ -203,7 +213,7 @@ jobs:
203213 twine check --strict cuda_pathfinder/*.whl
204214
205215 - name : Constrain builds to the local cuda.pathfinder wheel
206- if : ${{ env.BUILD_BINDINGS == 'true' || env.TEST_BINDINGS == 'true' }}
216+ if : ${{ env.BUILD_BINDINGS == 'true' || env.BUILD_MAINTENANCE_BINDINGS == 'true' }}
207217 run : |
208218 pathfinder_wheels=(cuda_pathfinder/cuda_pathfinder-*.whl)
209219 test "${#pathfinder_wheels[@]}" -eq 1
@@ -419,6 +429,23 @@ jobs:
419429 run-id : ${{ env.BASELINE_RUN_ID }}
420430
421431 # We only need/want a single pure python wheel, pick linux-64 index 0.
432+ - name : Build and check maintenance cuda-python wheel
433+ if : ${{ !inputs.single-cuda-major && (env.BUILD_PYTHON == 'true' || env.TEST_PYTHON == 'true') && strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
434+ run : |
435+ pushd cuda_python
436+ CUDA_PYTHON_BUILD_MAJOR="${MAINTENANCE_CUDA_MAJOR}" \
437+ pip wheel -v --no-deps --wheel-dir "dist/cu${MAINTENANCE_CUDA_MAJOR}" .
438+ twine check --strict "dist/cu${MAINTENANCE_CUDA_MAJOR}"/*.whl
439+ popd
440+
441+ - name : Upload maintenance cuda-python wheel
442+ if : ${{ !inputs.single-cuda-major && (env.BUILD_PYTHON == 'true' || env.TEST_PYTHON == 'true') && strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
443+ uses : actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
444+ with :
445+ name : maintenance-python-wheel
446+ path : cuda_python/dist/cu${{ env.MAINTENANCE_CUDA_MAJOR }}/*.whl
447+ if-no-files-found : error
448+
422449 - name : Build and check cuda-python wheel
423450 if : ${{ env.BUILD_PYTHON == 'true' && strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
424451 run : |
@@ -533,7 +560,7 @@ jobs:
533560
534561 # Note: This overwrites CUDA_PATH etc
535562 - name : Set up mini CTK
536- if : ${{ !inputs.single-cuda-major && (env.BUILD_CORE == 'true' || env.TEST_CORE == 'true' || env.BUILD_BINDINGS == 'true' || env.TEST_BINDINGS == 'true') }}
563+ if : ${{ !inputs.single-cuda-major && (env.BUILD_CORE == 'true' || env.TEST_CORE == 'true' || env.BUILD_MAINTENANCE_BINDINGS == 'true') }}
537564 uses : ./.github/actions/fetch_ctk
538565 continue-on-error : false
539566 with :
@@ -558,12 +585,8 @@ jobs:
558585 ${{ env.CUDA_CORE_TEST_BINARIES_DIR }}/*.lib
559586 if-no-files-found : error
560587
561- - name : Install GitHub CLI
562- if : ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' }}
563- uses : ./.github/actions/install-gh-cli
564-
565588 - name : Build maintenance cuda.bindings wheel
566- if : ${{ !inputs.single-cuda-major && ( env.BUILD_BINDINGS == 'true' || env.TEST_BINDINGS == 'true') }}
589+ if : ${{ env.BUILD_MAINTENANCE_BINDINGS == 'true' }}
567590 uses : pypa/cibuildwheel@f9b966cfadf4109556cadc5bb39ddb72d0ce664e # v4.3.5
568591 with :
569592 package-dir : ./${{ env.MAINTENANCE_BINDINGS_ROOT }}/
@@ -573,11 +596,11 @@ jobs:
573596 env : *bindings-wheel-env
574597
575598 - name : Check maintenance cuda.bindings wheel
576- if : ${{ !inputs.single-cuda-major && ( env.BUILD_BINDINGS == 'true' || env.TEST_BINDINGS == 'true') }}
599+ if : ${{ env.BUILD_MAINTENANCE_BINDINGS == 'true' }}
577600 run : twine check --strict "${MAINTENANCE_BINDINGS_ARTIFACTS_DIR}"/*.whl
578601
579602 - name : Upload maintenance cuda.bindings wheel
580- if : ${{ !inputs.single-cuda-major && ( env.BUILD_BINDINGS == 'true' || env.TEST_BINDINGS == 'true') }}
603+ if : ${{ env.BUILD_MAINTENANCE_BINDINGS == 'true' }}
581604 uses : actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
582605 with :
583606 name : ${{ env.MAINTENANCE_BINDINGS_ARTIFACT_NAME }}
@@ -603,36 +626,11 @@ jobs:
603626 path : ${{ env.MAINTENANCE_BINDINGS_CYTHON_TESTS_DIR }}/test_*${{ env.PY_EXT_SUFFIX }}
604627 if-no-files-found : error
605628
606- - name : Look up prior-branch cuda.bindings run ID
607- id : prior-bindings
608- if : ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' }}
609- env :
610- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
611- run : |
612- OLD_BRANCH=$(yq '.backport_branch' ci/versions.yml)
613- OLD_ARTIFACT_PATTERN="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda*-${{ inputs.host-platform }}-*[0-9a-f]"
614- LATEST_PRIOR_RUN_ID=$(./ci/tools/lookup-run-id \
615- --branch "${OLD_BRANCH}" \
616- --artifact "${OLD_ARTIFACT_PATTERN}" \
617- NVIDIA/cuda-python "CI")
618- echo "run-id=${LATEST_PRIOR_RUN_ID}" >> "${GITHUB_OUTPUT}"
619- echo "artifact-pattern=${OLD_ARTIFACT_PATTERN}" >> "${GITHUB_OUTPUT}"
620-
621- - name : Download prior-branch cuda.bindings build artifacts
622- if : ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' }}
623- uses : $/.github/actions/download-artifact-retry
624- with :
625- pattern : ${{ steps.prior-bindings.outputs.artifact-pattern }}
626- merge-multiple : " true"
627- path : cuda_bindings_13/dist-prev
628- run-id : ${{ steps.prior-bindings.outputs.run-id }}
629- github-token : ${{ secrets.GITHUB_TOKEN }}
630-
631- - name : Constrain previous cuda.core to the downloaded cuda.bindings wheel
629+ - name : Constrain maintenance cuda.core to the same-run cuda.bindings wheel
632630 if : ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' }}
633631 run : |
634632 pathfinder_wheels=(cuda_pathfinder/cuda_pathfinder-*.whl)
635- bindings_wheels=(cuda_bindings_13/dist-prev/ cuda_bindings-"${BUILD_PREV_CUDA_MAJOR }".*.whl)
633+ bindings_wheels=("${MAINTENANCE_BINDINGS_ARTIFACTS_DIR}"/ cuda_bindings-"${MAINTENANCE_CUDA_MAJOR }".*.whl)
636634 test "${#pathfinder_wheels[@]}" -eq 1
637635 test "${#bindings_wheels[@]}" -eq 1
638636 test -f "${pathfinder_wheels[0]}"
@@ -726,6 +724,40 @@ jobs:
726724
727725 ls -lahR ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
728726
727+ - name : Build maintenance cuda.core Cython tests
728+ if : ${{ !inputs.single-cuda-major && env.TEST_CORE == 'true' }}
729+ run : |
730+ # The current package's test extensions were built in this same source tree.
731+ # Remove generated outputs so Cython and the compiler cannot reuse them.
732+ find "${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}" -maxdepth 1 -type f \
733+ \( -name 'test_*.cpp' -o -name 'test_*.so' -o -name 'test_*.pyd' \) -delete
734+ if [[ -d "${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}/build" ]]; then
735+ find "${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}/build" -type f -delete
736+ fi
737+ pip uninstall -y cuda-bindings cuda-core
738+ pip install ${{ env.MAINTENANCE_BINDINGS_ARTIFACTS_DIR }}/*.whl
739+ if ${{ env.BUILD_CORE == 'true' }}; then
740+ core_wheel=$(find "${{ env.CUDA_CORE_ARTIFACTS_DIR }}/cu${MAINTENANCE_CUDA_MAJOR}" -maxdepth 1 -type f -name '*.whl' -print -quit)
741+ else
742+ core_wheel=$(find "${{ env.CUDA_CORE_ARTIFACTS_DIR }}" -maxdepth 1 -type f -name '*.whl' -print -quit)
743+ fi
744+ if [[ -z "${core_wheel}" ]]; then
745+ echo "No cuda.core wheel found" >&2
746+ exit 1
747+ fi
748+ pip install "${core_wheel}" --group ./cuda_core/pyproject.toml:test
749+ pushd ${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}
750+ bash build_tests.sh
751+ popd
752+
753+ - name : Upload maintenance cuda.core Cython tests
754+ if : ${{ !inputs.single-cuda-major && env.TEST_CORE == 'true' }}
755+ uses : actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
756+ with :
757+ name : ${{ env.CUDA_CORE_ARTIFACT_NAME }}-cu${{ env.MAINTENANCE_CUDA_MAJOR }}-tests
758+ path : ${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}/test_*${{ env.PY_EXT_SUFFIX }}
759+ if-no-files-found : error
760+
729761 - name : Merge cuda.core wheels
730762 if : ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' }}
731763 run : |
0 commit comments