Skip to content
Merged
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
120 changes: 91 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
CUDA_BUILD_VER: ${{ steps.get-vars.outputs.cuda_build_ver }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- name: Get CUDA build version
Expand All @@ -32,38 +32,116 @@ jobs:
cuda_build_ver=$(jq -r .cuda.build.version ci/versions.json)
echo "cuda_build_ver=$cuda_build_ver" >> $GITHUB_OUTPUT

build:
should-skip:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.get-should-skip.outputs.skip }}
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Compute whether to skip builds and tests
id: get-should-skip
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euxo pipefail
if ${{ startsWith(github.ref_name, 'pull-request/') }}; then
skip="$(gh pr view "$(grep -Po '(\d+)$' <<< '${{ github.ref_name }}')" --json title --jq '.title | contains("[no-ci]")')"
else
skip=false
fi
echo "skip=${skip}" >> "$GITHUB_OUTPUT"

# WARNING: make sure all of the build jobs are in sync
build-linux-64:
needs:
- ci-vars
- should-skip
strategy:
fail-fast: false
matrix:
host-platform:
- linux-64
name: Build ${{ matrix.host-platform }}, CUDA ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }}
secrets: inherit
uses: ./.github/workflows/build-wheel.yml
with:
host-platform: ${{ matrix.host-platform }}
cuda-version: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}

# WARNING: make sure all of the build jobs are in sync
build-linux-aarch64:
needs:
- ci-vars
- should-skip
strategy:
fail-fast: false
matrix:
host-platform:
- linux-aarch64
name: Build ${{ matrix.host-platform }}, CUDA ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }}
secrets: inherit
uses: ./.github/workflows/build-wheel.yml
with:
host-platform: ${{ matrix.host-platform }}
cuda-version: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}

# WARNING: make sure all of the build jobs are in sync
build-windows:
needs:
- ci-vars
- should-skip
strategy:
fail-fast: false
matrix:
host-platform:
- win-64
name: Build ${{ matrix.host-platform }}, CUDA ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
if: ${{ github.repository_owner == 'nvidia' }}
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }}
secrets: inherit
uses: ./.github/workflows/build-wheel.yml
with:
host-platform: ${{ matrix.host-platform }}
cuda-version: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}

test-linux:
# WARNING: make sure both Linux test jobs are in sync
test-linux-64:
strategy:
fail-fast: false
matrix:
host-platform:
- linux-64
name: Test ${{ matrix.host-platform }}
if: ${{ github.repository_owner == 'nvidia' }}
permissions:
contents: read # This is required for actions/checkout
needs:
- ci-vars
- build-linux-64
secrets: inherit
uses: ./.github/workflows/test-wheel-linux.yml
with:
build-type: pull-request
host-platform: ${{ matrix.host-platform }}
build-ctk-ver: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
matrix_filter: "map(select([.CUDA_VER // empty | split(\".\")[] | tonumber] as $v | ($v[0] < 13)))"

# WARNING: make sure both Linux test jobs are in sync
test-linux-aarch64:
strategy:
fail-fast: false
matrix:
host-platform:
- linux-aarch64
name: Test ${{ matrix.host-platform }}
if: ${{ github.repository_owner == 'nvidia' }}
permissions:
contents: read # This is required for actions/checkout
needs:
- ci-vars
- build
- build-linux-aarch64
secrets: inherit
uses: ./.github/workflows/test-wheel-linux.yml
with:
Expand All @@ -84,7 +162,7 @@ jobs:
contents: read # This is required for actions/checkout
needs:
- ci-vars
- build
- build-windows
secrets: inherit
uses: ./.github/workflows/test-wheel-windows.yml
with:
Expand All @@ -93,30 +171,14 @@ jobs:
build-ctk-ver: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
matrix_filter: "map(select([.CUDA_VER // empty | split(\".\")[] | tonumber] as $v | ($v[0] < 13)))"

# doc:
# name: Docs
# if: ${{ github.repository_owner == 'nvidia' }}
# # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
# permissions:
# id-token: write
# contents: write
# pull-requests: write
# needs:
# - ci-vars
# - build
# secrets: inherit
# uses: ./.github/workflows/build-docs.yml
# with:
# build-ctk-ver: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}

checks:
name: Check job status
permissions:
checks: read
runs-on: ubuntu-latest
needs:
- build
- test-linux
- test-linux-64
- test-linux-aarch64
- test-windows
# - doc
secrets: inherit
uses: ./.github/workflows/status-check.yml
# we don't build docs on the backport branch, see #809
steps:
- name: Exit
run: exit 0