From 4e902b85fe78d2765f43784ec682c291f134d67c Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Wed, 1 Oct 2025 12:28:14 -0400 Subject: [PATCH 1/3] ci: replace single gating check with vanilla skipping (#1008) --- .github/workflows/ci.yml | 135 ++++++++++++++++++++++++++++++--------- 1 file changed, 105 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bd1833ef1..d5d7624950 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -32,30 +32,107 @@ 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 }} + + # 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' }} @@ -63,14 +140,13 @@ jobs: 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: 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)))" test-windows: strategy: @@ -84,39 +160,38 @@ 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: 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)))" -# 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 }} + 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-linux-64 + 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 + - doc + steps: + - name: Exit + run: exit 0 From 73a4e2082f5564f5a8d6b6532bbf4388b629bf91 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Wed, 1 Oct 2025 12:56:38 -0400 Subject: [PATCH 2/3] ci: remove docs --- .github/workflows/ci.yml | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5d7624950..f3ae9cbee0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -168,22 +168,6 @@ jobs: host-platform: ${{ matrix.host-platform }} build-ctk-ver: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }} - 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-linux-64 - secrets: inherit - uses: ./.github/workflows/build-docs.yml - with: - build-ctk-ver: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }} - checks: name: Check job status runs-on: ubuntu-latest @@ -191,7 +175,7 @@ jobs: - test-linux-64 - test-linux-aarch64 - test-windows - - doc + # we don't build docs on the backport branch, see #809 steps: - name: Exit run: exit 0 From 7cf0a8c787d717774cb12bb5ae8ad8e6011baa43 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Wed, 1 Oct 2025 12:58:39 -0400 Subject: [PATCH 3/3] ci: add back matrix filter --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3ae9cbee0..c2f4981b8b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,6 +126,7 @@ jobs: 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: @@ -147,6 +148,7 @@ jobs: 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)))" test-windows: strategy: @@ -167,6 +169,7 @@ jobs: 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)))" checks: name: Check job status