diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b2bb241ff..cfe8bc7a63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,17 +32,38 @@ jobs: cuda_build_ver=$(jq -r .cuda.build.version ci/versions.json) echo "cuda_build_ver=$cuda_build_ver" >> $GITHUB_OUTPUT + 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' }} + if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }} secrets: inherit uses: ./.github/workflows/build-wheel.yml with: @@ -53,13 +74,14 @@ jobs: 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' }} + if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }} secrets: inherit uses: ./.github/workflows/build-wheel.yml with: @@ -70,13 +92,14 @@ jobs: 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: @@ -163,15 +186,12 @@ jobs: checks: name: Check job status - permissions: - checks: read + runs-on: ubuntu-latest needs: - - build-linux-64 - test-linux-64 - - build-linux-aarch64 - test-linux-aarch64 - - build-windows - test-windows - doc - secrets: inherit - uses: ./.github/workflows/status-check.yml + steps: + - name: Exit + run: exit 0 diff --git a/.github/workflows/status-check.yml b/.github/workflows/status-check.yml deleted file mode 100644 index f8d3e0f608..0000000000 --- a/.github/workflows/status-check.yml +++ /dev/null @@ -1,20 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# -# SPDX-License-Identifier: Apache-2.0 - -name: "CI: Summary" - -on: - workflow_call: - -jobs: - checks: - name: Check job status - runs-on: ubuntu-latest - steps: - - name: GitHub Checks - uses: poseidon/wait-for-status-checks@899c768d191b56eef585c18f8558da19e1f3e707 # v0.6.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - match_pattern: "CI*" - ignore_pattern: ".*Check job status.*" # ignore self