Skip to content

Nightly Orchestrator #187

Nightly Orchestrator

Nightly Orchestrator #187

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-macos:
needs: config
if: needs.config.outputs.run_tests == 'true'
uses: ./.github/workflows/test-macos.yml
secrets: inherit
permissions:
id-token: write
contents: read
test-rl-gpu:
needs: config
if: needs.config.outputs.run_tests == 'true'
uses: ./.github/workflows/test-rl-gpu.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
# =============================================================================
# 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-macos
- test-rl-gpu
- lint
- docs
- benchmarks
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 }}
}