Nightly Orchestrator #125
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nightly Orchestrator | |
| on: | |
| schedule: | |
| - cron: '0 6 * * *' # 6AM UTC daily | |
| workflow_dispatch: | |
| inputs: | |
| mode: | |
| description: 'Run mode: full (run tests + deploy dashboard), dry-run (run tests, skip dashboard deploy), smoke-test (skip tests, validate CI plumbing only)' | |
| type: choice | |
| options: | |
| - full | |
| - dry-run | |
| - smoke-test | |
| default: full | |
| concurrency: | |
| group: nightly-${{ github.run_id }} | |
| cancel-in-progress: false | |
| jobs: | |
| # ============================================================================= | |
| # Resolve the effective mode (schedule always uses "full") | |
| # ============================================================================= | |
| config: | |
| name: Configure | |
| runs-on: ubuntu-latest | |
| outputs: | |
| mode: ${{ steps.resolve.outputs.mode }} | |
| run_tests: ${{ steps.resolve.outputs.run_tests }} | |
| deploy_dashboard: ${{ steps.resolve.outputs.deploy_dashboard }} | |
| steps: | |
| - name: Resolve mode | |
| id: resolve | |
| run: | | |
| MODE="${{ inputs.mode || 'full' }}" | |
| echo "mode=$MODE" >> "$GITHUB_OUTPUT" | |
| if [ "$MODE" = "smoke-test" ]; then | |
| echo "run_tests=false" >> "$GITHUB_OUTPUT" | |
| echo "deploy_dashboard=true" >> "$GITHUB_OUTPUT" | |
| elif [ "$MODE" = "dry-run" ]; then | |
| echo "run_tests=true" >> "$GITHUB_OUTPUT" | |
| echo "deploy_dashboard=false" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "run_tests=true" >> "$GITHUB_OUTPUT" | |
| echo "deploy_dashboard=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| echo "### Nightly Orchestrator Configuration" >> "$GITHUB_STEP_SUMMARY" | |
| echo "- **Mode**: $MODE" >> "$GITHUB_STEP_SUMMARY" | |
| # ============================================================================= | |
| # Test workflows (skipped in smoke-test mode) | |
| # ============================================================================= | |
| test-linux: | |
| needs: config | |
| if: needs.config.outputs.run_tests == 'true' | |
| uses: ./.github/workflows/test-linux.yml | |
| secrets: inherit | |
| permissions: | |
| id-token: write | |
| contents: read | |
| test-linux-llm: | |
| needs: config | |
| if: needs.config.outputs.run_tests == 'true' | |
| uses: ./.github/workflows/test-linux-llm.yml | |
| secrets: inherit | |
| permissions: | |
| id-token: write | |
| contents: read | |
| test-linux-habitat: | |
| needs: config | |
| if: needs.config.outputs.run_tests == 'true' | |
| uses: ./.github/workflows/test-linux-habitat.yml | |
| secrets: inherit | |
| permissions: | |
| id-token: write | |
| contents: read | |
| test-linux-tutorials: | |
| needs: config | |
| if: needs.config.outputs.run_tests == 'true' | |
| uses: ./.github/workflows/test-linux-tutorials.yml | |
| secrets: inherit | |
| permissions: | |
| id-token: write | |
| contents: read | |
| test-linux-sota: | |
| needs: config | |
| if: needs.config.outputs.run_tests == 'true' | |
| uses: ./.github/workflows/test-linux-sota.yml | |
| secrets: inherit | |
| permissions: | |
| id-token: write | |
| contents: read | |
| test-linux-libs: | |
| needs: config | |
| if: needs.config.outputs.run_tests == 'true' | |
| uses: ./.github/workflows/test-linux-libs.yml | |
| secrets: inherit | |
| permissions: | |
| id-token: write | |
| contents: read | |
| test-windows-optdepts: | |
| needs: config | |
| if: needs.config.outputs.run_tests == 'true' | |
| uses: ./.github/workflows/test-windows-optdepts.yml | |
| secrets: inherit | |
| permissions: | |
| id-token: write | |
| contents: read | |
| lint: | |
| needs: config | |
| if: needs.config.outputs.run_tests == 'true' | |
| uses: ./.github/workflows/lint.yml | |
| secrets: inherit | |
| permissions: | |
| id-token: write | |
| contents: read | |
| docs: | |
| needs: config | |
| if: needs.config.outputs.run_tests == 'true' | |
| uses: ./.github/workflows/docs.yml | |
| secrets: inherit | |
| permissions: | |
| id-token: write | |
| contents: write | |
| benchmarks: | |
| needs: config | |
| if: needs.config.outputs.run_tests == 'true' | |
| uses: ./.github/workflows/benchmarks.yml | |
| with: | |
| skip-upload: true | |
| secrets: inherit | |
| permissions: | |
| id-token: write | |
| contents: write | |
| deployments: write | |
| pull-requests: write | |
| validate-test-partitioning: | |
| needs: config | |
| if: needs.config.outputs.run_tests == 'true' | |
| uses: ./.github/workflows/validate-test-partitioning.yml | |
| secrets: inherit | |
| nightly-build: | |
| needs: config | |
| if: needs.config.outputs.run_tests == 'true' | |
| uses: ./.github/workflows/nightly_build.yml | |
| secrets: inherit | |
| permissions: | |
| id-token: write | |
| contents: read | |
| # The four build-wheels-* jobs run sequentially, not in parallel. The | |
| # pytorch/test-infra build_wheels_{linux,macos,windows}.yml reusable | |
| # workflows they call each define a workflow-level concurrency group keyed | |
| # on the caller's workflow name and sha (identical for all four when called | |
| # from this orchestrator) with cancel-in-progress: true. When invoked in | |
| # parallel, each new claim of the group cancels the previous child's jobs, | |
| # which marked every scheduled orchestrator run as cancelled. Chaining via | |
| # needs serializes the claims; !cancelled() keeps the chain (and the status | |
| # dashboard coverage) going when an earlier wheel build fails. | |
| build-wheels-linux: | |
| needs: config | |
| if: needs.config.outputs.run_tests == 'true' | |
| uses: ./.github/workflows/build-wheels-linux.yml | |
| secrets: inherit | |
| permissions: | |
| id-token: write | |
| contents: read | |
| build-wheels-m1: | |
| needs: | |
| - config | |
| - build-wheels-linux | |
| if: ${{ !cancelled() && needs.config.outputs.run_tests == 'true' }} | |
| uses: ./.github/workflows/build-wheels-m1.yml | |
| secrets: inherit | |
| permissions: | |
| id-token: write | |
| contents: read | |
| build-wheels-windows: | |
| needs: | |
| - config | |
| - build-wheels-m1 | |
| if: ${{ !cancelled() && needs.config.outputs.run_tests == 'true' }} | |
| uses: ./.github/workflows/build-wheels-windows.yml | |
| secrets: inherit | |
| permissions: | |
| id-token: write | |
| contents: read | |
| build-wheels-aarch64-linux: | |
| needs: | |
| - config | |
| - build-wheels-windows | |
| if: ${{ !cancelled() && needs.config.outputs.run_tests == 'true' }} | |
| uses: ./.github/workflows/build-wheels-aarch64-linux.yml | |
| secrets: inherit | |
| permissions: | |
| id-token: write | |
| contents: read | |
| # ============================================================================= | |
| # Status collector - updates the nightly dashboard after all workflows complete | |
| # ============================================================================= | |
| update-status-dashboard: | |
| name: Update Status Dashboard | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| needs: | |
| - config | |
| - test-linux | |
| - test-linux-llm | |
| - test-linux-habitat | |
| - test-linux-tutorials | |
| - test-linux-sota | |
| - test-linux-libs | |
| - test-windows-optdepts | |
| - lint | |
| - docs | |
| - benchmarks | |
| - validate-test-partitioning | |
| - nightly-build | |
| - build-wheels-linux | |
| - build-wheels-m1 | |
| - build-wheels-windows | |
| - build-wheels-aarch64-linux | |
| if: always() | |
| steps: | |
| - name: Trigger status collector | |
| uses: peter-evans/repository-dispatch@v4 | |
| with: | |
| event-type: nightly-orchestrator-completed | |
| client-payload: | | |
| { | |
| "run_id": "${{ github.run_id }}", | |
| "triggered_at": "${{ github.event.repository.updated_at }}", | |
| "deploy": ${{ needs.config.outputs.deploy_dashboard }} | |
| } |