-
Notifications
You must be signed in to change notification settings - Fork 117
141 lines (129 loc) · 4.11 KB
/
Copy pathnightly_orchestrator.yml
File metadata and controls
141 lines (129 loc) · 4.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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 }}
}