-
Notifications
You must be signed in to change notification settings - Fork 77
502 lines (455 loc) · 21 KB
/
daily-full-interop.yml
File metadata and controls
502 lines (455 loc) · 21 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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
name: Daily Full Interoperability Tests
on:
schedule:
- cron: '0 2 * * *' # 2 AM UTC daily
workflow_dispatch:
inputs:
# Transport parameters
transport-test-select:
description: '[Transport] Select specific tests (pipe-separated substrings)'
required: false
default: ''
type: string
transport-test-ignore:
description: '[Transport] Ignore specific tests (pipe-separated substrings)'
required: false
default: '~failing'
type: string
transport-force-matrix-rebuild:
description: '[Transport] Force test matrix regeneration'
required: false
default: false
type: boolean
transport-force-image-rebuild:
description: '[Transport] Force Docker image rebuilds'
required: false
default: false
type: boolean
transport-debug:
description: '[Transport] Enable debug mode'
required: false
default: false
type: boolean
# Hole-punch parameters
hole-punch-test-select:
description: '[Hole-punch] Select specific tests (pipe-separated substrings)'
required: false
default: ''
type: string
hole-punch-test-ignore:
description: '[Hole-punch] Ignore specific tests (pipe-separated substrings)'
required: false
default: '~failing'
type: string
hole-punch-relay-select:
description: '[Hole-punch] Select specific relays (pipe-separated substrings)'
required: false
default: ''
type: string
hole-punch-relay-ignore:
description: '[Hole-punch] Ignore specific relays (pipe-separated substrings)'
required: false
default: '~failing'
type: string
hole-punch-router-select:
description: '[Hole-punch] Select specific routers (pipe-separated substrings)'
required: false
default: ''
type: string
hole-punch-router-ignore:
description: '[Hole-punch] Ignore specific routers (pipe-separated substrings)'
required: false
default: '~failing'
type: string
hole-punch-force-matrix-rebuild:
description: '[Hole-punch] Force test matrix regeneration'
required: false
default: false
type: boolean
hole-punch-force-image-rebuild:
description: '[Hole-punch] Force Docker image rebuilds'
required: false
default: false
type: boolean
hole-punch-debug:
description: '[Hole-punch] Enable debug mode'
required: false
default: false
type: boolean
# Perf parameters
perf-test-select:
description: '[Perf] Select specific implementations to test (pipe-separated substrings)'
required: false
default: ''
type: string
perf-test-ignore:
description: '[Perf] Ignore specific implementations (pipe-separated substrings)'
required: false
default: '~failing'
type: string
perf-baseline-select:
description: '[Perf] Select specific baseline tests (pipe-separated substrings)'
required: false
default: ''
type: string
perf-baseline-ignore:
description: '[Perf] Ignore specific baseline tests (pipe-separated substrings)'
required: false
default: '~failing'
type: string
perf-iterations:
description: '[Perf] Number of iterations per test'
required: false
default: 10
type: number
perf-force-matrix-rebuild:
description: '[Perf] Force test matrix regeneration'
required: false
default: false
type: boolean
perf-force-image-rebuild:
description: '[Perf] Force Docker image rebuilds'
required: false
default: false
type: boolean
perf-debug:
description: '[Perf] Enable debug mode'
required: false
default: false
type: boolean
jobs:
resolve-transport-parameters:
runs-on: [self-hosted, linux, x64, ephemeral]
outputs:
test-select: ${{ steps.resolve.outputs.test-select }}
test-ignore: ${{ steps.resolve.outputs.test-ignore }}
force-matrix-rebuild: ${{ steps.resolve.outputs.force-matrix-rebuild }}
force-image-rebuild: ${{ steps.resolve.outputs.force-image-rebuild }}
debug: ${{ steps.resolve.outputs.debug }}
should-run-tests: ${{ steps.resolve.outputs.should-run-tests }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Resolve transport parameters
id: resolve
shell: bash
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
# Manual trigger - use workflow inputs
echo "test-select=${{ github.event.inputs.transport-test-select }}" >> $GITHUB_OUTPUT
echo "test-ignore=${{ github.event.inputs.transport-test-ignore }}" >> $GITHUB_OUTPUT
echo "force-matrix-rebuild=${{ github.event.inputs.transport-force-matrix-rebuild }}" >> $GITHUB_OUTPUT
echo "force-image-rebuild=${{ github.event.inputs.transport-force-image-rebuild }}" >> $GITHUB_OUTPUT
echo "debug=${{ github.event.inputs.transport-debug }}" >> $GITHUB_OUTPUT
echo "should-run-tests=true" >> $GITHUB_OUTPUT
echo "→ Manual trigger: using workflow inputs for transport"
else
# Automatic trigger - check for changes in last 24 hours
CHANGES=$(git log --oneline --since="24 hours ago" -- "transport/**" | wc -l)
IMPLS_CHANGES=$(git log --oneline --since="24 hours ago" -- "transport/impls.yaml" | wc -l)
echo "test-select=" >> $GITHUB_OUTPUT
echo "test-ignore=~failing" >> $GITHUB_OUTPUT
echo "force-image-rebuild=false" >> $GITHUB_OUTPUT
echo "debug=false" >> $GITHUB_OUTPUT
if [ "$CHANGES" -gt 0 ]; then
echo "should-run-tests=true" >> $GITHUB_OUTPUT
if [ "$IMPLS_CHANGES" -gt 0 ]; then
echo "force-matrix-rebuild=true" >> $GITHUB_OUTPUT
echo "→ Automatic trigger: transport changes detected, impls.yaml changed"
else
echo "force-matrix-rebuild=false" >> $GITHUB_OUTPUT
echo "→ Automatic trigger: transport changes detected"
fi
else
echo "should-run-tests=false" >> $GITHUB_OUTPUT
echo "force-matrix-rebuild=false" >> $GITHUB_OUTPUT
echo "→ Automatic trigger: no transport changes in last 24h"
fi
fi
- name: Debug outputs
shell: bash
run: |
echo "DEBUG: should-run-tests output = '${{ steps.resolve.outputs.should-run-tests }}'"
echo "DEBUG: github.event_name = '${{ github.event_name }}'"
resolve-hole-punch-parameters:
runs-on: [self-hosted, linux, x64, ephemeral]
outputs:
test-select: ${{ steps.resolve.outputs.test-select }}
test-ignore: ${{ steps.resolve.outputs.test-ignore }}
relay-select: ${{ steps.resolve.outputs.relay-select }}
relay-ignore: ${{ steps.resolve.outputs.relay-ignore }}
router-select: ${{ steps.resolve.outputs.router-select }}
router-ignore: ${{ steps.resolve.outputs.router-ignore }}
force-matrix-rebuild: ${{ steps.resolve.outputs.force-matrix-rebuild }}
force-image-rebuild: ${{ steps.resolve.outputs.force-image-rebuild }}
debug: ${{ steps.resolve.outputs.debug }}
should-run-tests: ${{ steps.resolve.outputs.should-run-tests }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Resolve hole-punch parameters
id: resolve
shell: bash
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
# Manual trigger - use workflow inputs
echo "test-select=${{ github.event.inputs.hole-punch-test-select }}" >> $GITHUB_OUTPUT
echo "test-ignore=${{ github.event.inputs.hole-punch-test-ignore }}" >> $GITHUB_OUTPUT
echo "relay-select=${{ github.event.inputs.hole-punch-relay-select }}" >> $GITHUB_OUTPUT
echo "relay-ignore=${{ github.event.inputs.hole-punch-relay-ignore }}" >> $GITHUB_OUTPUT
echo "router-select=${{ github.event.inputs.hole-punch-router-select }}" >> $GITHUB_OUTPUT
echo "router-ignore=${{ github.event.inputs.hole-punch-router-ignore }}" >> $GITHUB_OUTPUT
echo "force-matrix-rebuild=${{ github.event.inputs.hole-punch-force-matrix-rebuild }}" >> $GITHUB_OUTPUT
echo "force-image-rebuild=${{ github.event.inputs.hole-punch-force-image-rebuild }}" >> $GITHUB_OUTPUT
echo "debug=${{ github.event.inputs.hole-punch-debug }}" >> $GITHUB_OUTPUT
echo "should-run-tests=true" >> $GITHUB_OUTPUT
echo "→ Manual trigger: using workflow inputs for hole-punch"
else
# Automatic trigger - check for changes in last 24 hours
CHANGES=$(git log --oneline --since="24 hours ago" -- "hole-punch/**" | wc -l)
IMPLS_CHANGES=$(git log --oneline --since="24 hours ago" -- "hole-punch/impls.yaml" | wc -l)
echo "test-select=" >> $GITHUB_OUTPUT
echo "test-ignore=~failing" >> $GITHUB_OUTPUT
echo "relay-select=" >> $GITHUB_OUTPUT
echo "relay-ignore=" >> $GITHUB_OUTPUT
echo "router-select=" >> $GITHUB_OUTPUT
echo "router-ignore=" >> $GITHUB_OUTPUT
echo "force-image-rebuild=false" >> $GITHUB_OUTPUT
echo "debug=false" >> $GITHUB_OUTPUT
if [ "$CHANGES" -gt 0 ]; then
echo "should-run-tests=true" >> $GITHUB_OUTPUT
if [ "$IMPLS_CHANGES" -gt 0 ]; then
echo "force-matrix-rebuild=true" >> $GITHUB_OUTPUT
echo "→ Automatic trigger: hole-punch changes detected, impls.yaml changed"
else
echo "force-matrix-rebuild=false" >> $GITHUB_OUTPUT
echo "→ Automatic trigger: hole-punch changes detected"
fi
else
echo "should-run-tests=false" >> $GITHUB_OUTPUT
echo "force-matrix-rebuild=false" >> $GITHUB_OUTPUT
echo "→ Automatic trigger: no hole-punch changes in last 24h"
fi
fi
resolve-perf-parameters:
runs-on: [self-hosted, linux, x64, ephemeral]
outputs:
test-select: ${{ steps.resolve.outputs.test-select }}
test-ignore: ${{ steps.resolve.outputs.test-ignore }}
baseline-select: ${{ steps.resolve.outputs.baseline-select }}
baseline-ignore: ${{ steps.resolve.outputs.baseline-ignore }}
iterations: ${{ steps.resolve.outputs.iterations }}
force-matrix-rebuild: ${{ steps.resolve.outputs.force-matrix-rebuild }}
force-image-rebuild: ${{ steps.resolve.outputs.force-image-rebuild }}
debug: ${{ steps.resolve.outputs.debug }}
should-run-tests: ${{ steps.resolve.outputs.should-run-tests }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Resolve perf parameters
id: resolve
shell: bash
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
# Manual trigger - use workflow inputs
echo "test-select=${{ github.event.inputs.perf-test-select }}" >> $GITHUB_OUTPUT
echo "test-ignore=${{ github.event.inputs.perf-test-ignore }}" >> $GITHUB_OUTPUT
echo "baseline-select=${{ github.event.inputs.perf-baseline-select }}" >> $GITHUB_OUTPUT
echo "baseline-ignore=${{ github.event.inputs.perf-baseline-ignore }}" >> $GITHUB_OUTPUT
echo "iterations=${{ github.event.inputs.perf-iterations }}" >> $GITHUB_OUTPUT
echo "force-matrix-rebuild=${{ github.event.inputs.perf-force-matrix-rebuild }}" >> $GITHUB_OUTPUT
echo "force-image-rebuild=${{ github.event.inputs.perf-force-image-rebuild }}" >> $GITHUB_OUTPUT
echo "debug=${{ github.event.inputs.perf-debug }}" >> $GITHUB_OUTPUT
echo "should-run-tests=true" >> $GITHUB_OUTPUT
echo "→ Manual trigger: using workflow inputs for perf"
else
# Automatic trigger - check for changes in last 24 hours
CHANGES=$(git log --oneline --since="24 hours ago" -- "perf/**" | wc -l)
IMPLS_CHANGES=$(git log --oneline --since="24 hours ago" -- "perf/impls.yaml" | wc -l)
echo "test-select=" >> $GITHUB_OUTPUT
echo "test-ignore=~failing" >> $GITHUB_OUTPUT
echo "baseline-select=" >> $GITHUB_OUTPUT
echo "baseline-ignore=~failing" >> $GITHUB_OUTPUT
echo "iterations=10" >> $GITHUB_OUTPUT
echo "force-image-rebuild=false" >> $GITHUB_OUTPUT
echo "debug=false" >> $GITHUB_OUTPUT
if [ "$CHANGES" -gt 0 ]; then
echo "should-run-tests=true" >> $GITHUB_OUTPUT
if [ "$IMPLS_CHANGES" -gt 0 ]; then
echo "force-matrix-rebuild=true" >> $GITHUB_OUTPUT
echo "→ Automatic trigger: perf changes detected, impls.yaml changed"
else
echo "force-matrix-rebuild=false" >> $GITHUB_OUTPUT
echo "→ Automatic trigger: perf changes detected"
fi
else
echo "should-run-tests=false" >> $GITHUB_OUTPUT
echo "force-matrix-rebuild=false" >> $GITHUB_OUTPUT
echo "→ Automatic trigger: no perf changes in last 24h"
fi
fi
run-transport-full:
needs: resolve-transport-parameters
if: ${{ !cancelled() && (github.event_name == 'workflow_dispatch' || needs.resolve-transport-parameters.outputs.should-run-tests) }}
runs-on: [self-hosted, linux, x64, ephemeral]
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run full transport interop tests
uses: ./.github/actions/run-bash-transport-test
with:
test-select: '${{ needs.resolve-transport-parameters.outputs.test-select }}'
test-ignore: '${{ needs.resolve-transport-parameters.outputs.test-ignore }}'
cache-dir: /srv/cache
snapshot: false
force-matrix-rebuild: ${{ needs.resolve-transport-parameters.outputs.force-matrix-rebuild }}
force-image-rebuild: ${{ needs.resolve-transport-parameters.outputs.force-image-rebuild }}
debug: ${{ needs.resolve-transport-parameters.outputs.debug }}
run-hole-punch-full:
needs: resolve-hole-punch-parameters
if: ${{ !cancelled() && (github.event_name == 'workflow_dispatch' || needs.resolve-hole-punch-parameters.outputs.should-run-tests) }}
runs-on: [self-hosted, linux, x64, ephemeral]
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run full hole punch interop tests
uses: ./.github/actions/run-bash-hole-punch-test
with:
test-select: '${{ needs.resolve-hole-punch-parameters.outputs.test-select }}'
test-ignore: '${{ needs.resolve-hole-punch-parameters.outputs.test-ignore }}'
relay-select: '${{ needs.resolve-hole-punch-parameters.outputs.relay-select }}'
relay-ignore: '${{ needs.resolve-hole-punch-parameters.outputs.relay-ignore }}'
router-select: '${{ needs.resolve-hole-punch-parameters.outputs.router-select }}'
router-ignore: '${{ needs.resolve-hole-punch-parameters.outputs.router-ignore }}'
cache-dir: /srv/cache
snapshot: false
force-matrix-rebuild: ${{ needs.resolve-hole-punch-parameters.outputs.force-matrix-rebuild }}
force-image-rebuild: ${{ needs.resolve-hole-punch-parameters.outputs.force-image-rebuild }}
debug: ${{ needs.resolve-hole-punch-parameters.outputs.debug }}
run-perf-full:
needs: resolve-perf-parameters
if: ${{ !cancelled() && (github.event_name == 'workflow_dispatch' || needs.resolve-perf-parameters.outputs.should-run-tests) }}
runs-on: [self-hosted, linux, x64, ephemeral]
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run full perf benchmarks
uses: ./.github/actions/run-bash-perf-test
with:
test-select: '${{ needs.resolve-perf-parameters.outputs.test-select }}'
test-ignore: '${{ needs.resolve-perf-parameters.outputs.test-ignore }}'
baseline-select: '${{ needs.resolve-perf-parameters.outputs.baseline-select }}'
baseline-ignore: '${{ needs.resolve-perf-parameters.outputs.baseline-ignore }}'
iterations: '${{ needs.resolve-perf-parameters.outputs.iterations }}'
cache-dir: /srv/cache
snapshot: false
force-matrix-rebuild: ${{ needs.resolve-perf-parameters.outputs.force-matrix-rebuild }}
force-image-rebuild: ${{ needs.resolve-perf-parameters.outputs.force-image-rebuild }}
debug: ${{ needs.resolve-perf-parameters.outputs.debug }}
update-readmes:
needs: [run-transport-full, run-hole-punch-full, run-perf-full]
if: |
always() &&
(needs.run-transport-full.result != 'skipped' ||
needs.run-hole-punch-full.result != 'skipped' ||
needs.run-perf-full.result != 'skipped')
runs-on: [self-hosted, linux, x64, ephemeral]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Download transport test results
if: needs.run-transport-full.result != 'skipped'
uses: actions/download-artifact@v4
with:
pattern: transport-test-results-*
path: /tmp/transport-results
merge-multiple: true
- name: Download hole-punch test results
if: needs.run-hole-punch-full.result != 'skipped'
uses: actions/download-artifact@v4
with:
pattern: hole-punch-test-results-*
path: /tmp/hole-punch-results
merge-multiple: true
- name: Download perf test results
if: needs.run-perf-full.result != 'skipped'
uses: actions/download-artifact@v4
with:
pattern: perf-test-results-*
path: /tmp/perf-results
merge-multiple: true
- name: Update transport README
if: needs.run-transport-full.result != 'skipped'
shell: bash
run: |
set -euo pipefail
# Find results.md file
RESULTS_MD=$(find /tmp/transport-results -name "results.md" | head -1)
if [ -z "$RESULTS_MD" ]; then
echo "Error: Could not find transport results.md"
exit 1
fi
echo "→ Found transport results: $RESULTS_MD"
# Update README using script
bash scripts/update-readme-results.sh transport/README.md "$RESULTS_MD"
- name: Update hole-punch README
if: needs.run-hole-punch-full.result != 'skipped'
shell: bash
run: |
set -euo pipefail
# Find results.md file
RESULTS_MD=$(find /tmp/hole-punch-results -name "results.md" | head -1)
if [ -z "$RESULTS_MD" ]; then
echo "Error: Could not find hole-punch results.md"
exit 1
fi
echo "→ Found hole-punch results: $RESULTS_MD"
# Update README using script
bash scripts/update-readme-results.sh hole-punch/README.md "$RESULTS_MD"
- name: Update perf README
if: needs.run-perf-full.result != 'skipped'
shell: bash
run: |
set -euo pipefail
# Find results.md file
RESULTS_MD=$(find /tmp/perf-results -name "results.md" | head -1)
if [ -z "$RESULTS_MD" ]; then
echo "Error: Could not find perf results.md"
exit 1
fi
echo "→ Found perf results: $RESULTS_MD"
# Update README using script
bash scripts/update-readme-results.sh perf/README.md "$RESULTS_MD"
- name: Commit and push changes
shell: bash
run: |
set -euo pipefail
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Check if there are changes
if git diff --quiet transport/README.md hole-punch/README.md perf/README.md 2>/dev/null; then
echo "→ No changes to commit"
exit 0
fi
git add transport/README.md hole-punch/README.md perf/README.md 2>/dev/null || true
# Only commit if there are staged changes
if git diff --cached --quiet 2>/dev/null; then
echo "→ No staged changes to commit"
exit 0
fi
git commit -m "chore: update test results [skip ci]" \
-m "Updated test results from daily full interoperability test run." \
-m "Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
git push
echo "→ Changes committed and pushed"