Skip to content
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ self-hosted-runner:
labels:
- linux-amd64-cpu8
- linux-amd64-gpu-l4-latest-1
- windows-arm64-1xgb10
33 changes: 20 additions & 13 deletions .github/workflows/build-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ on:
required: false
type: boolean
default: true
test-python-version:
description: "Build compiled test artifacts only for this Python version; empty means all"
required: false
type: string
default: ""
baseline-run-id:
required: false
type: string
Expand Down Expand Up @@ -79,6 +84,8 @@ jobs:
(inputs.host-platform == 'linux-aarch64' && 'linux-arm64-cpu8') ||
(inputs.host-platform == 'win-64' && 'windows-2022') ||
(inputs.host-platform == 'win-arm64' && 'windows-11-arm') }}
env:
BUILD_TEST_ARTIFACTS: ${{ inputs.test-python-version == '' || matrix.python-version == inputs.test-python-version }}
steps:
- name: Checkout ${{ github.event.repository.name }}
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
Expand Down Expand Up @@ -485,7 +492,7 @@ jobs:

- name: Set up Python
id: setup-python2
if: ${{ !inputs.single-cuda-major && (inputs.test-bindings || inputs.test-core) }}
if: ${{ env.BUILD_TEST_ARTIFACTS == 'true' && (inputs.test-bindings || inputs.test-core) }}
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -494,17 +501,17 @@ jobs:
allow-prereleases: ${{ startsWith(matrix.python-version, '3.15') }}

- name: Enable Scientific Python Nightly Wheels for Python 3.15
if: ${{ !inputs.single-cuda-major && (inputs.test-bindings || inputs.test-core) && startsWith(matrix.python-version, '3.15') }}
if: ${{ env.BUILD_TEST_ARTIFACTS == 'true' && (inputs.test-bindings || inputs.test-core) && startsWith(matrix.python-version, '3.15') }}
run: |
echo "PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" >> "$GITHUB_ENV"
echo "PIP_ONLY_BINARY=numpy" >> "$GITHUB_ENV"

- name: verify free-threaded build
if: ${{ !inputs.single-cuda-major && (inputs.test-bindings || inputs.test-core) && endsWith(matrix.python-version, 't') }}
if: ${{ env.BUILD_TEST_ARTIFACTS == 'true' && (inputs.test-bindings || inputs.test-core) && endsWith(matrix.python-version, 't') }}
run: python -c 'import sys; assert not sys._is_gil_enabled()'

- name: Set up Python include paths
if: ${{ !inputs.single-cuda-major && (inputs.test-bindings || inputs.test-core) }}
if: ${{ env.BUILD_TEST_ARTIFACTS == 'true' && (inputs.test-bindings || inputs.test-core) }}
run: |
if [[ "${{ inputs.host-platform }}" == linux* ]]; then
echo "CPLUS_INCLUDE_PATH=${Python3_ROOT_DIR}/include/python${{ matrix.python-version }}" >> $GITHUB_ENV
Expand All @@ -515,38 +522,38 @@ jobs:
echo "PY_EXT_SUFFIX=$(python -c "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))")" >> $GITHUB_ENV

- name: Install cuda.pathfinder (required for next step)
if: ${{ !inputs.single-cuda-major && (inputs.test-bindings || inputs.test-core) }}
if: ${{ env.BUILD_TEST_ARTIFACTS == 'true' && (inputs.test-bindings || inputs.test-core) }}
run: |
pip install cuda_pathfinder/*.whl

- name: Hide GNU link.exe so Meson finds MSVC link.exe
if: ${{ !inputs.single-cuda-major && startsWith(inputs.host-platform, 'win') && (inputs.test-bindings || inputs.test-core) }}
if: ${{ env.BUILD_TEST_ARTIFACTS == 'true' && startsWith(inputs.host-platform, 'win') && (inputs.test-bindings || inputs.test-core) }}
run: |
if [ -f "/c/Program Files/Git/usr/bin/link.exe" ]; then
mv "/c/Program Files/Git/usr/bin/link.exe" "/c/Program Files/Git/usr/bin/link.exe.bak"
fi

- name: Build cuda.bindings Cython tests
if: ${{ !inputs.single-cuda-major && inputs.test-bindings }}
if: ${{ env.BUILD_TEST_ARTIFACTS == 'true' && inputs.test-bindings }}
run: |
pip install ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl --group ./cuda_bindings/pyproject.toml:test
pushd ${{ env.CUDA_BINDINGS_CYTHON_TESTS_DIR }}
bash build_tests.sh
popd

- name: Upload cuda.bindings Cython tests
if: ${{ !inputs.single-cuda-major && inputs.test-bindings }}
if: ${{ env.BUILD_TEST_ARTIFACTS == 'true' && inputs.test-bindings }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}-tests
path: ${{ env.CUDA_BINDINGS_CYTHON_TESTS_DIR }}/test_*${{ env.PY_EXT_SUFFIX }}
if-no-files-found: error

- name: Build cuda.core Cython tests
if: ${{ !inputs.single-cuda-major && inputs.test-core }}
if: ${{ env.BUILD_TEST_ARTIFACTS == 'true' && inputs.test-core }}
run: |
pip install ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl
if ${{ inputs.build-core }}; then
if ${{ inputs.build-core && !inputs.single-cuda-major }}; then
core_wheel=$(find "${{ env.CUDA_CORE_ARTIFACTS_DIR }}/cu${BUILD_CUDA_MAJOR}" -maxdepth 1 -type f -name '*.whl' -print -quit)
else
core_wheel=$(find "${{ env.CUDA_CORE_ARTIFACTS_DIR }}" -maxdepth 1 -type f -name '*.whl' -print -quit)
Expand All @@ -561,7 +568,7 @@ jobs:
popd

- name: Upload cuda.core Cython tests
if: ${{ !inputs.single-cuda-major && inputs.test-core }}
if: ${{ env.BUILD_TEST_ARTIFACTS == 'true' && inputs.test-core }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}-tests
Expand All @@ -579,13 +586,13 @@ jobs:
cuda-path: "./cuda_toolkit_prev"

- name: Build cuda.core test binaries
if: ${{ !inputs.single-cuda-major && inputs.test-core }}
if: ${{ env.BUILD_TEST_ARTIFACTS == 'true' && inputs.test-core }}
run: |
nvcc --version
python "${{ env.CUDA_CORE_TEST_BINARIES_DIR }}/build_test_binaries.py"

- name: Upload cuda.core test binaries
if: ${{ !inputs.single-cuda-major && inputs.test-core }}
if: ${{ env.BUILD_TEST_ARTIFACTS == 'true' && inputs.test-core }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}-test-binaries
Expand Down
28 changes: 26 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ jobs:
cuda-channel: ${{ needs.ci-vars.outputs.CUDA_BUILD_CHANNEL }}
prev-cuda-version: ${{ needs.ci-vars.outputs.CUDA_PREV_BUILD_VER }}
single-cuda-major: true
test-python-version: '3.13'

# NOTE: test-sdist jobs are split by platform (mirroring build-* and test-wheel-*)
# so platform-specific sources (e.g. cuda_bindings/*_windows.pyx selected by
Expand Down Expand Up @@ -538,6 +539,25 @@ jobs:
nruns: ${{ (github.event_name == 'schedule' && 5) || 1}}
test-bindings: ${{ fromJSON(needs.detect-changes.outputs.test_bindings) }}

test-windows-arm64:
name: Test win-arm64
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.doc-only) && needs.ci-vars.outputs.CUDA_BUILD_CHANNEL == 'prerelease' }}
permissions:
actions: read
contents: read # This is required for actions/checkout
needs:
- ci-vars
- should-skip
- build-linux-64
- build-windows-arm64
uses: ./.github/workflows/test-wheel-windows.yml
with:
build-type: pull-request
host-platform: win-arm64
build-ctk-ver: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
build-ctk-channel: ${{ needs.ci-vars.outputs.CUDA_BUILD_CHANNEL }}
test-bindings-ptds: true

doc:
name: Docs
if: ${{ github.repository_owner == 'nvidia' }}
Expand Down Expand Up @@ -601,6 +621,7 @@ jobs:
- test-linux-64
- test-linux-aarch64
- test-windows
- test-windows-arm64
- doc
- precommit-windows
steps:
Expand Down Expand Up @@ -639,12 +660,12 @@ jobs:
check_result "doc" "success" "${{ needs.doc.result }}"
check_result "precommit-windows" "success" "${{ needs.precommit-windows.result }}"

# [doc-only] skips all builds and tests. Windows preview wheel builds
# run, but GPU tests remain skipped until suitable runners are available.
# [doc-only] skips all builds and tests.
if [[ "$doc_only" == "true" ]]; then
linux_expected="skipped"
windows_build_expected="skipped"
windows_arm_build_expected="skipped"
windows_arm_test_expected="skipped"
windows_sdist_expected="skipped"
windows_test_expected="skipped"
else
Expand All @@ -653,14 +674,17 @@ jobs:
windows_sdist_expected="success"
if [[ "$cuda_build_channel" == "prerelease" ]]; then
windows_arm_build_expected="success"
windows_arm_test_expected="success"
windows_test_expected="skipped"
else
windows_arm_build_expected="skipped"
windows_arm_test_expected="skipped"
windows_test_expected="success"
fi
fi
check_result "build-windows" "$windows_build_expected" "${{ needs.build-windows.result }}"
check_result "build-windows-arm64" "$windows_arm_build_expected" "${{ needs.build-windows-arm64.result }}"
check_result "test-windows-arm64" "$windows_arm_test_expected" "${{ needs.test-windows-arm64.result }}"
check_result "test-sdist-linux" "$linux_expected" "${{ needs.test-sdist-linux.result }}"
check_result "test-sdist-windows" "$windows_sdist_expected" "${{ needs.test-sdist-windows.result }}"
check_result "test-linux-64" "$linux_expected" "${{ needs.test-linux-64.result }}"
Expand Down
Loading
Loading