-
Notifications
You must be signed in to change notification settings - Fork 463
253 lines (231 loc) · 7.38 KB
/
Copy pathnightly_orchestrator.yml
File metadata and controls
253 lines (231 loc) · 7.38 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
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 }}
}