From 69b9a8d895ab39aedf159e5e654cf8afe256e7e9 Mon Sep 17 00:00:00 2001 From: isVoid <13521008+isVoid@users.noreply.github.com> Date: Mon, 16 Nov 2026 20:52:11 +0000 Subject: [PATCH 1/2] Select the latest main commit for nightly WoA validation Signed-off-by: isVoid <13521008+isVoid@users.noreply.github.com> --- .github/workflows/woa-main-ci.yml | 44 ++++++++++--------------------- 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/.github/workflows/woa-main-ci.yml b/.github/workflows/woa-main-ci.yml index f20c6fc70de..ac9b3340cc4 100644 --- a/.github/workflows/woa-main-ci.yml +++ b/.github/workflows/woa-main-ci.yml @@ -3,7 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 name: "WoA main CI" -run-name: "WoA main CI for ${{ inputs.public_run_id || 'latest successful public main CI run' }}" +run-name: "WoA main CI for ${{ inputs.public_run_id || 'latest main commit' }}" on: schedule: @@ -12,7 +12,7 @@ on: workflow_dispatch: inputs: public_run_id: - description: Eligible public main CI run; leave empty to find the latest successful main CI run + description: Eligible public main CI run; leave empty to use the latest main commit required: false type: string @@ -30,23 +30,12 @@ jobs: permissions: actions: read contents: read - checks: read outputs: - dispatch: ${{ steps.select.outputs.dispatch || 'false' }} + dispatch: ${{ steps.resolve.outputs.eligible || 'false' }} correlation-id: ${{ steps.resolve.outputs.correlation_id }} public-run-id: ${{ steps.resolve.outputs.public_run_id }} public-sha: ${{ steps.resolve.outputs.public_sha }} steps: - - name: Checkout CI selection helpers - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - ref: ${{ github.sha }} - persist-credentials: false - sparse-checkout: | - ci/tools/lookup-run-id - ci/tools/select-woa-batch - sparse-checkout-cone-mode: false - - name: Resolve exact public build id: resolve env: @@ -62,15 +51,18 @@ jobs: exit 0 } - echo "Resolving public CI run: ${PUBLIC_RUN_ID:-latest successful main push}." + echo "Resolving public CI run: ${PUBLIC_RUN_ID:-latest main commit}." public_sha='' if [[ -z "$PUBLIC_RUN_ID" ]]; then - lookup_output=$(./ci/tools/lookup-run-id --branch main --event push --head-sha NVIDIA/cuda-python CI) - mapfile -t lookup_result <<< "$lookup_output" - [[ ${#lookup_result[@]} == 2 ]] - PUBLIC_RUN_ID=${lookup_result[0]} - public_sha=${lookup_result[1]} + public_sha=$(gh api repos/NVIDIA/cuda-python/commits/main --jq .sha) [[ "$public_sha" =~ ^[0-9a-f]{40}$ ]] + PUBLIC_RUN_ID=$(gh api --method GET \ + repos/NVIDIA/cuda-python/actions/workflows/ci.yml/runs \ + -f branch=main -f event=push -f head_sha="$public_sha" -F per_page=100 \ + --jq '.workflow_runs | max_by(.id) | .id // empty') + if [[ -z "$PUBLIC_RUN_ID" ]]; then + skip_resolution "No push CI run exists for latest main commit $public_sha; no older commit will be selected." + fi fi [[ "$PUBLIC_RUN_ID" =~ ^[1-9][0-9]*$ ]] run=$(gh api \ @@ -87,7 +79,8 @@ jobs: event: (.event == "push"), branch: (.head_branch == "main"), status_and_conclusion: ((.status == "in_progress" and .conclusion == null) or - (.status == "completed" and .conclusion == "success")), + (.status == "completed" and + (.conclusion == "success" or .conclusion == "failure"))), expected_sha: ($sha == "" or .head_sha == $sha), sha_format: ((.head_sha // "") | test("^[0-9a-f]{40}$")) } @@ -119,15 +112,6 @@ jobs: echo "Resolved public run \`$PUBLIC_RUN_ID\` at commit \`$public_sha\`." } >> "$GITHUB_STEP_SUMMARY" - - name: Select public batch - if: ${{ steps.resolve.outputs.eligible == 'true' }} - id: select - env: - GH_TOKEN: ${{ github.token }} - PUBLIC_RUN_ID: ${{ steps.resolve.outputs.public_run_id }} - PUBLIC_SHA: ${{ steps.resolve.outputs.public_sha }} - run: bash ./ci/tools/select-woa-batch - dispatch-private-validation: needs: resolve-public-build if: ${{ needs.resolve-public-build.outputs.dispatch == 'true' }} From 4b26fb74c85449bd3330b8ca04824e963d78877c Mon Sep 17 00:00:00 2001 From: isVoid <13521008+isVoid@users.noreply.github.com> Date: Mon, 16 Nov 2026 21:51:43 +0000 Subject: [PATCH 2/2] Dispatch WoA using nightly CI wheel selection Signed-off-by: isVoid <13521008+isVoid@users.noreply.github.com> --- .github/workflows/ci-nightly.yml | 16 +++++++++++- .github/workflows/woa-main-ci.yml | 42 ++++++++++++++++++------------- 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci-nightly.yml b/.github/workflows/ci-nightly.yml index 78a1f0f8215..67d1f789616 100644 --- a/.github/workflows/ci-nightly.yml +++ b/.github/workflows/ci-nightly.yml @@ -132,6 +132,18 @@ jobs: echo "run_id=$RUN_ID" >> $GITHUB_OUTPUT echo "head_sha=$HEAD_SHA" >> $GITHUB_OUTPUT + dispatch-woa: + name: Dispatch WoA integration + if: ${{ github.repository == 'NVIDIA/cuda-python' && github.ref == 'refs/heads/main' }} + needs: find-wheels + permissions: + actions: read + contents: read + secrets: inherit + uses: ./.github/workflows/woa-main-ci.yml + with: + public_run_id: ${{ needs.find-wheels.outputs.RUN_ID }} + # ── PyTorch interop tests ── test-pytorch-linux: @@ -350,6 +362,7 @@ jobs: - documentation-links - test-ci-tools-for-release - find-wheels + - dispatch-woa - test-pytorch-linux - test-pytorch-linux-aarch64 - test-pytorch-windows @@ -385,7 +398,8 @@ jobs: if ${{ needs.documentation-links.result != 'success' || needs.test-ci-tools-for-release.result == 'cancelled' || needs.test-ci-tools-for-release.result == 'failure' || - needs.find-wheels.result != 'success' }}; then + needs.find-wheels.result != 'success' || + needs.dispatch-woa.result != 'success' }}; then exit 1 fi if ${{ needs.test-pytorch-linux.result == 'cancelled' || diff --git a/.github/workflows/woa-main-ci.yml b/.github/workflows/woa-main-ci.yml index ac9b3340cc4..bb1277599de 100644 --- a/.github/workflows/woa-main-ci.yml +++ b/.github/workflows/woa-main-ci.yml @@ -3,16 +3,19 @@ # SPDX-License-Identifier: Apache-2.0 name: "WoA main CI" -run-name: "WoA main CI for ${{ inputs.public_run_id || 'latest main commit' }}" +run-name: "WoA main CI for ${{ inputs.public_run_id || 'latest successful public main CI run' }}" on: - schedule: - # 03:17 UTC daily, offset from the other nightly workflows. - - cron: "17 3 * * *" + workflow_call: + inputs: + public_run_id: + description: Public CI run selected by the nightly find-wheels job + required: true + type: string workflow_dispatch: inputs: public_run_id: - description: Eligible public main CI run; leave empty to use the latest main commit + description: Eligible public main CI run; leave empty to find the latest successful main CI run required: false type: string @@ -36,6 +39,15 @@ jobs: public-run-id: ${{ steps.resolve.outputs.public_run_id }} public-sha: ${{ steps.resolve.outputs.public_sha }} steps: + - name: Checkout CI selection helpers + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ github.sha }} + persist-credentials: false + sparse-checkout: | + ci/tools/lookup-run-id + sparse-checkout-cone-mode: false + - name: Resolve exact public build id: resolve env: @@ -51,18 +63,15 @@ jobs: exit 0 } - echo "Resolving public CI run: ${PUBLIC_RUN_ID:-latest main commit}." + echo "Resolving public CI run: ${PUBLIC_RUN_ID:-latest successful main push}." public_sha='' if [[ -z "$PUBLIC_RUN_ID" ]]; then - public_sha=$(gh api repos/NVIDIA/cuda-python/commits/main --jq .sha) + lookup_output=$(./ci/tools/lookup-run-id --branch main --event push --head-sha NVIDIA/cuda-python CI) + mapfile -t lookup_result <<< "$lookup_output" + [[ ${#lookup_result[@]} == 2 ]] + PUBLIC_RUN_ID=${lookup_result[0]} + public_sha=${lookup_result[1]} [[ "$public_sha" =~ ^[0-9a-f]{40}$ ]] - PUBLIC_RUN_ID=$(gh api --method GET \ - repos/NVIDIA/cuda-python/actions/workflows/ci.yml/runs \ - -f branch=main -f event=push -f head_sha="$public_sha" -F per_page=100 \ - --jq '.workflow_runs | max_by(.id) | .id // empty') - if [[ -z "$PUBLIC_RUN_ID" ]]; then - skip_resolution "No push CI run exists for latest main commit $public_sha; no older commit will be selected." - fi fi [[ "$PUBLIC_RUN_ID" =~ ^[1-9][0-9]*$ ]] run=$(gh api \ @@ -76,11 +85,10 @@ jobs: repository: (.repository.full_name == "NVIDIA/cuda-python"), workflow_id: (.workflow_id == 155304118), workflow_path: (.path == ".github/workflows/ci.yml"), - event: (.event == "push"), + event: (.event == "push" or .event == "schedule" or .event == "workflow_dispatch"), branch: (.head_branch == "main"), status_and_conclusion: ((.status == "in_progress" and .conclusion == null) or - (.status == "completed" and - (.conclusion == "success" or .conclusion == "failure"))), + (.status == "completed" and .conclusion == "success")), expected_sha: ($sha == "" or .head_sha == $sha), sha_format: ((.head_sha // "") | test("^[0-9a-f]{40}$")) }