Repository navigation
654 lines (615 loc) · 30.1 KB
/
Copy pathperformance-macos.yml
File metadata and controls
654 lines (615 loc) · 30.1 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
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
name: macOS performance endurance
on:
workflow_dispatch:
inputs:
warmup_seconds:
description: 'Warm-up before measurement'
required: false
default: '60'
measurement_seconds:
description: 'Measurement/endurance window'
required: false
default: '600'
packaged_app_executable:
description: 'Pre-staged Developer ID-signed Videorc executable on the authorized runner'
required: false
default: ''
packaged_app_commit:
description: 'Exact git commit from which the pre-staged signed app was built'
required: false
default: ''
calibration_mode:
description: 'Collect unenforced three-run calibration candidates instead of enforcing reviewed profiles'
required: false
type: boolean
default: false
active_budget_path:
description: 'Reviewed active budget set; required unless calibration mode is explicitly selected'
required: false
default: ''
schedule:
- cron: '17 3 * * 1'
permissions:
contents: read
actions: read
concurrency:
group: macos-performance-endurance
cancel-in-progress: false
jobs:
performance-contract:
name: Validate synthetic performance contracts
runs-on: macos-15
timeout-minutes: 20
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 11.0.9
run_install: false
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '24.6.0'
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
# Hosted runners have neither a stable hardware identity nor the logged-in
# Screen Recording/Camera/Microphone grants required for trustworthy
# measurements. They may validate only synthetic/structural contracts.
- name: Run synthetic performance contract tests
run: >-
node --test
scripts/lib/performance-budget-preflight.test.mjs
scripts/lib/performance-budget.test.mjs
scripts/lib/performance-calibration.test.mjs
scripts/lib/performance-contract.test.mjs
scripts/lib/performance-scenarios.test.mjs
scripts/lib/performance-workflow.test.mjs
scripts/lib/process-endurance.test.mjs
scripts/lib/process-memory-gate.test.mjs
runner-availability:
name: Require online performance runner
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Fail when the authorized macOS runner is unavailable
uses: actions/github-script@v8
env:
RUNNER_MONITOR_TOKEN: ${{ secrets.VIDEORC_RUNNER_MONITOR_TOKEN }}
with:
# Listing repository runners requires Administration (read), which
# the default GITHUB_TOKEN cannot grant. A missing monitor token is
# an explicit operational failure, never a silently skipped probe.
github-token: ${{ secrets.VIDEORC_RUNNER_MONITOR_TOKEN }}
script: |
if (!process.env.RUNNER_MONITOR_TOKEN) {
core.setFailed(
'VIDEORC_RUNNER_MONITOR_TOKEN is required with repository Administration (read) permission'
)
return
}
const { data } = await github.rest.actions.listSelfHostedRunnersForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 100
})
const requiredLabels = ['self-hosted', 'macOS', 'videorc-performance']
const matching = data.runners.filter((runner) => {
const labels = new Set(runner.labels.map((label) => label.name))
return requiredLabels.every((label) => labels.has(label))
})
if (matching.length === 0) {
core.setFailed(`No runner has all required labels: ${requiredLabels.join(', ')}`)
return
}
const available = matching.filter(
(runner) => runner.status === 'online' && runner.busy !== true
)
if (available.length === 0) {
core.setFailed(
`Videorc performance runner is unavailable: ${matching
.map((runner) => `${runner.name}=${runner.status}${runner.busy ? '/busy' : ''}`)
.join(', ')}`
)
return
}
core.info(
`Performance runner available: ${available.map((runner) => runner.name).join(', ')}`
)
endurance:
name: Native preview and real-device endurance
needs: runner-availability
# This runner must be a logged-in macOS session with Screen Recording,
# Camera, and Microphone permission already granted to the harness/app.
runs-on: [self-hosted, macOS, videorc-performance]
timeout-minutes: 360
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
VIDEORC_PERF_ARTIFACT_DIR: docs/acceptance/artifacts/performance/endurance
VIDEORC_PERF_APP_EXECUTABLE: ${{ inputs.packaged_app_executable || vars.VIDEORC_PERF_SCHEDULED_APP_EXECUTABLE }}
VIDEORC_PERF_APP_COMMIT: ${{ inputs.packaged_app_commit || vars.VIDEORC_PERF_SCHEDULED_APP_COMMIT }}
VIDEORC_PERF_CALIBRATION: ${{ github.event_name == 'workflow_dispatch' && inputs.calibration_mode && '1' || '0' }}
VIDEORC_PERF_REQUESTED_ACTIVE_BUDGET_PATH: ${{ inputs.active_budget_path || vars.VIDEORC_PERF_SCHEDULED_ACTIVE_BUDGET_PATH }}
WARMUP_SECONDS: ${{ inputs.warmup_seconds || '60' }}
MEASUREMENT_SECONDS: ${{ inputs.measurement_seconds || '600' }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 11.0.9
run_install: false
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '24.6.0'
cache: pnpm
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin,x86_64-apple-darwin
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Verify FFmpeg and FFprobe
run: |
command -v ffmpeg
command -v ffprobe
ffmpeg -version | head -n 1
ffprobe -version | head -n 1
- name: Require a signed package for the checked-out commit
run: |
if [[ -z "$VIDEORC_PERF_APP_EXECUTABLE" ]]; then
echo "No pre-staged signed performance app was configured. Set both VIDEORC_PERF_SCHEDULED_APP_EXECUTABLE and VIDEORC_PERF_SCHEDULED_APP_COMMIT repository variables for scheduled runs, or provide both workflow-dispatch inputs." >&2
exit 1
fi
if [[ -z "$VIDEORC_PERF_APP_COMMIT" ]]; then
echo "The pre-staged signed performance app is missing its source commit contract." >&2
exit 1
fi
if [[ "$VIDEORC_PERF_APP_COMMIT" != "$GITHUB_SHA" ]]; then
echo "Pre-staged app commit $VIDEORC_PERF_APP_COMMIT does not match checked-out commit $GITHUB_SHA." >&2
exit 1
fi
- name: Verify signed packaged app
run: |
test -x "$VIDEORC_PERF_APP_EXECUTABLE"
app_bundle="${VIDEORC_PERF_APP_EXECUTABLE%%/Contents/MacOS/*}"
test -d "$app_bundle"
codesign --verify --deep --strict "$app_bundle"
signature_details="$(codesign --display --verbose=4 "$app_bundle" 2>&1)"
if ! grep -q '^Authority=Developer ID Application:' <<< "$signature_details"; then
echo "Performance evidence requires a Developer ID Application signature; ad-hoc or unsigned packages are rejected." >&2
exit 1
fi
- name: Configure reviewed budget enforcement
run: |
if [[ "$VIDEORC_PERF_CALIBRATION" == "1" ]]; then
echo "Explicit calibration bypass selected; reviewed thresholds will not be enforced."
echo "VIDEORC_PERF_GATE_ACTIVE_BUDGET_PATH=" >> "$GITHUB_ENV"
echo "VIDEORC_PERF_GATE_REQUIRE_ACTIVE_BUDGET=0" >> "$GITHUB_ENV"
else
if [[ -z "$VIDEORC_PERF_REQUESTED_ACTIVE_BUDGET_PATH" ]]; then
echo "Scheduled and enforcement performance runs require a reviewed active budget set. Configure VIDEORC_PERF_SCHEDULED_ACTIVE_BUDGET_PATH or provide active_budget_path; use the explicit calibration_mode input only when collecting candidates." >&2
exit 1
fi
if [[ ! -f "$VIDEORC_PERF_REQUESTED_ACTIVE_BUDGET_PATH" ]]; then
echo "Reviewed active budget set was not found: $VIDEORC_PERF_REQUESTED_ACTIVE_BUDGET_PATH" >&2
exit 1
fi
echo "VIDEORC_PERF_GATE_ACTIVE_BUDGET_PATH=$VIDEORC_PERF_REQUESTED_ACTIVE_BUDGET_PATH" >> "$GITHUB_ENV"
echo "VIDEORC_PERF_GATE_REQUIRE_ACTIVE_BUDGET=1" >> "$GITHUB_ENV"
fi
# Prime macOS capture, Electron, and GPU caches outside the three-run
# calibration set. This keeps cold-host initialization out of run 1.
- name: Prime detached-native-preview workload
run: >-
pnpm perf:scenario --scenario detached-native-preview --report-only
--profile-class short-sentinel
--warmup-seconds 60
--measurement-seconds 120
--output "$VIDEORC_PERF_ARTIFACT_DIR/detached-native-preview-primer.json"
env:
VIDEORC_PERF_MIN_PRESENT_FPS: '58'
VIDEORC_PERF_MAX_INTERVAL_P95_MS: '30'
- name: Authorized packaged native-preview short sentinel
id: short_sentinel
continue-on-error: true
run: |
failed=0
for calibration_run in 1 2 3; do
VIDEORC_PERF_ACTIVE_BUDGET_PATH="$VIDEORC_PERF_GATE_ACTIVE_BUDGET_PATH" \
VIDEORC_PERF_REQUIRE_ACTIVE_BUDGET="$VIDEORC_PERF_GATE_REQUIRE_ACTIVE_BUDGET" \
pnpm perf:scenario --scenario detached-native-preview --gate \
--profile-class short-sentinel \
--warmup-seconds 60 \
--measurement-seconds 120 \
--sample-interval-ms 1000 \
--output "$VIDEORC_PERF_ARTIFACT_DIR/detached-native-preview-short-run-${calibration_run}.json" \
|| failed=1
done
exit "$failed"
env:
VIDEORC_PERF_MIN_PRESENT_FPS: '58'
VIDEORC_PERF_MAX_INTERVAL_P95_MS: '30'
- name: Aggregate authorized short-sentinel calibration
id: short_sentinel_calibration
if: always() && steps.short_sentinel.outcome == 'success'
continue-on-error: true
run: >-
pnpm perf:calibrate
--output "$VIDEORC_PERF_ARTIFACT_DIR/detached-native-preview-short-calibration.json"
--budget-output "$VIDEORC_PERF_ARTIFACT_DIR/detached-native-preview-short-budget-candidate.json"
"$VIDEORC_PERF_ARTIFACT_DIR/detached-native-preview-short-run-1.child.json"
"$VIDEORC_PERF_ARTIFACT_DIR/detached-native-preview-short-run-2.child.json"
"$VIDEORC_PERF_ARTIFACT_DIR/detached-native-preview-short-run-3.child.json"
- name: Detached native-preview endurance
id: native_preview
continue-on-error: true
run: |
failed=0
for calibration_run in 1 2 3; do
VIDEORC_PERF_ACTIVE_BUDGET_PATH="$VIDEORC_PERF_GATE_ACTIVE_BUDGET_PATH" \
VIDEORC_PERF_REQUIRE_ACTIVE_BUDGET="$VIDEORC_PERF_GATE_REQUIRE_ACTIVE_BUDGET" \
pnpm perf:scenario --scenario detached-native-preview --gate \
--profile-class endurance \
--warmup-seconds "$WARMUP_SECONDS" \
--measurement-seconds "$MEASUREMENT_SECONDS" \
--output "$VIDEORC_PERF_ARTIFACT_DIR/detached-native-preview-run-${calibration_run}.json" \
|| failed=1
done
exit "$failed"
env:
VIDEORC_PERF_MIN_PRESENT_FPS: '58'
VIDEORC_PERF_MAX_INTERVAL_P95_MS: '30'
- name: Aggregate packaged native-preview calibration
id: native_preview_calibration
if: always() && steps.native_preview.outcome == 'success'
continue-on-error: true
run: >-
pnpm perf:calibrate
--output "$VIDEORC_PERF_ARTIFACT_DIR/detached-native-preview-calibration.json"
--budget-output "$VIDEORC_PERF_ARTIFACT_DIR/detached-native-preview-budget-candidate.json"
"$VIDEORC_PERF_ARTIFACT_DIR/detached-native-preview-run-1.child.json"
"$VIDEORC_PERF_ARTIFACT_DIR/detached-native-preview-run-2.child.json"
"$VIDEORC_PERF_ARTIFACT_DIR/detached-native-preview-run-3.child.json"
- name: Preview lifecycle endurance
id: preview_lifecycle
continue-on-error: true
run: >-
pnpm perf:scenario --scenario preview-lifecycle --gate
--profile-class endurance
--output "$VIDEORC_PERF_ARTIFACT_DIR/preview-lifecycle.json"
env:
VIDEORC_PREVIEW_LIFECYCLE_CYCLES: '100'
- name: Prime record-4k workload
run: |
VIDEORC_SMOKE_OUTPUT_DIR="$VIDEORC_PERF_ARTIFACT_DIR/record-4k-media/primer" \
pnpm perf:scenario --scenario record-4k --report-only \
--profile-class short-sentinel \
--warmup-seconds 60 \
--measurement-seconds 120 \
--sample-interval-ms 1000 \
--output "$VIDEORC_PERF_ARTIFACT_DIR/record-4k-primer.json"
- name: Real 4K recording endurance
id: record_4k
continue-on-error: true
run: |
failed=0
for calibration_run in 1 2 3; do
VIDEORC_SMOKE_OUTPUT_DIR="$VIDEORC_PERF_ARTIFACT_DIR/record-4k-media/run-${calibration_run}" \
VIDEORC_PERF_ACTIVE_BUDGET_PATH="$VIDEORC_PERF_GATE_ACTIVE_BUDGET_PATH" \
VIDEORC_PERF_REQUIRE_ACTIVE_BUDGET="$VIDEORC_PERF_GATE_REQUIRE_ACTIVE_BUDGET" \
pnpm perf:scenario --scenario record-4k --gate \
--profile-class endurance \
--warmup-seconds "$WARMUP_SECONDS" \
--measurement-seconds "$MEASUREMENT_SECONDS" \
--output "$VIDEORC_PERF_ARTIFACT_DIR/record-4k-run-${calibration_run}.json" \
|| failed=1
done
exit "$failed"
- name: Aggregate packaged 4K recording calibration
id: record_4k_calibration
if: always() && steps.record_4k.outcome == 'success'
continue-on-error: true
run: >-
pnpm perf:calibrate
--output "$VIDEORC_PERF_ARTIFACT_DIR/record-4k-calibration.json"
--budget-output "$VIDEORC_PERF_ARTIFACT_DIR/record-4k-budget-candidate.json"
"$VIDEORC_PERF_ARTIFACT_DIR/record-4k-run-1.child.json"
"$VIDEORC_PERF_ARTIFACT_DIR/record-4k-run-2.child.json"
"$VIDEORC_PERF_ARTIFACT_DIR/record-4k-run-3.child.json"
- name: Prime record-4k-stream-1080p workload
run: |
VIDEORC_SMOKE_OUTPUT_DIR="$VIDEORC_PERF_ARTIFACT_DIR/record-stream-media/primer" \
pnpm perf:scenario --scenario record-4k-stream-1080p --report-only \
--profile-class short-sentinel \
--warmup-seconds 60 \
--measurement-seconds 120 \
--sample-interval-ms 1000 \
--output "$VIDEORC_PERF_ARTIFACT_DIR/record-4k-stream-1080p-primer.json"
- name: Real 4K record plus 1080p stream endurance
id: record_stream
continue-on-error: true
run: |
failed=0
for calibration_run in 1 2 3; do
VIDEORC_SMOKE_OUTPUT_DIR="$VIDEORC_PERF_ARTIFACT_DIR/record-stream-media/run-${calibration_run}" \
VIDEORC_PERF_ACTIVE_BUDGET_PATH="$VIDEORC_PERF_GATE_ACTIVE_BUDGET_PATH" \
VIDEORC_PERF_REQUIRE_ACTIVE_BUDGET="$VIDEORC_PERF_GATE_REQUIRE_ACTIVE_BUDGET" \
pnpm perf:scenario --scenario record-4k-stream-1080p --gate \
--profile-class endurance \
--warmup-seconds "$WARMUP_SECONDS" \
--measurement-seconds "$MEASUREMENT_SECONDS" \
--output "$VIDEORC_PERF_ARTIFACT_DIR/record-4k-stream-1080p-run-${calibration_run}.json" \
|| failed=1
done
exit "$failed"
- name: Aggregate packaged 4K record plus 1080p stream calibration
id: record_stream_calibration
if: always() && steps.record_stream.outcome == 'success'
continue-on-error: true
run: >-
pnpm perf:calibrate
--output "$VIDEORC_PERF_ARTIFACT_DIR/record-4k-stream-1080p-calibration.json"
--budget-output "$VIDEORC_PERF_ARTIFACT_DIR/record-4k-stream-1080p-budget-candidate.json"
"$VIDEORC_PERF_ARTIFACT_DIR/record-4k-stream-1080p-run-1.child.json"
"$VIDEORC_PERF_ARTIFACT_DIR/record-4k-stream-1080p-run-2.child.json"
"$VIDEORC_PERF_ARTIFACT_DIR/record-4k-stream-1080p-run-3.child.json"
- name: Prime real-devices-1080p workload
run: |
VIDEORC_SMOKE_OUTPUT_DIR="$VIDEORC_PERF_ARTIFACT_DIR/real-device-media/primer" \
pnpm perf:scenario --scenario real-devices-1080p --report-only \
--profile-class short-sentinel \
--warmup-seconds 60 \
--measurement-seconds 120 \
--sample-interval-ms 1000 \
--output "$VIDEORC_PERF_ARTIFACT_DIR/real-devices-1080p-primer.json"
- name: Real screen, camera, and microphone artifact endurance
id: native_devices
continue-on-error: true
run: |
failed=0
for calibration_run in 1 2 3; do
VIDEORC_SMOKE_OUTPUT_DIR="$VIDEORC_PERF_ARTIFACT_DIR/real-device-media/run-${calibration_run}" \
VIDEORC_PERF_ACTIVE_BUDGET_PATH="$VIDEORC_PERF_GATE_ACTIVE_BUDGET_PATH" \
VIDEORC_PERF_REQUIRE_ACTIVE_BUDGET="$VIDEORC_PERF_GATE_REQUIRE_ACTIVE_BUDGET" \
pnpm perf:scenario --scenario real-devices-1080p --gate \
--profile-class endurance \
--warmup-seconds "$WARMUP_SECONDS" \
--measurement-seconds "$MEASUREMENT_SECONDS" \
--output "$VIDEORC_PERF_ARTIFACT_DIR/real-devices-1080p-run-${calibration_run}.json" \
|| failed=1
done
exit "$failed"
- name: Aggregate packaged real-device calibration
id: native_devices_calibration
if: always() && steps.native_devices.outcome == 'success'
continue-on-error: true
run: >-
pnpm perf:calibrate
--output "$VIDEORC_PERF_ARTIFACT_DIR/real-devices-1080p-calibration.json"
--budget-output "$VIDEORC_PERF_ARTIFACT_DIR/real-devices-1080p-budget-candidate.json"
"$VIDEORC_PERF_ARTIFACT_DIR/real-devices-1080p-run-1.child.json"
"$VIDEORC_PERF_ARTIFACT_DIR/real-devices-1080p-run-2.child.json"
"$VIDEORC_PERF_ARTIFACT_DIR/real-devices-1080p-run-3.child.json"
- name: Prime record-1080p60 workload
run: |
VIDEORC_SMOKE_OUTPUT_DIR="$VIDEORC_PERF_ARTIFACT_DIR/record-1080p60-media/primer" \
pnpm perf:scenario --scenario record-1080p60 --report-only \
--profile-class short-sentinel \
--warmup-seconds 60 \
--measurement-seconds 120 \
--sample-interval-ms 1000 \
--output "$VIDEORC_PERF_ARTIFACT_DIR/record-1080p60-primer.json"
- name: Real 1080p60 recording endurance
id: record_1080p60
continue-on-error: true
run: |
failed=0
for calibration_run in 1 2 3; do
VIDEORC_SMOKE_OUTPUT_DIR="$VIDEORC_PERF_ARTIFACT_DIR/record-1080p60-media/run-${calibration_run}" \
VIDEORC_PERF_ACTIVE_BUDGET_PATH="$VIDEORC_PERF_GATE_ACTIVE_BUDGET_PATH" \
VIDEORC_PERF_REQUIRE_ACTIVE_BUDGET="$VIDEORC_PERF_GATE_REQUIRE_ACTIVE_BUDGET" \
pnpm perf:scenario --scenario record-1080p60 --profile-class endurance --gate \
--warmup-seconds "$WARMUP_SECONDS" \
--measurement-seconds "$MEASUREMENT_SECONDS" \
--output "$VIDEORC_PERF_ARTIFACT_DIR/record-1080p60-run-${calibration_run}.json" \
|| failed=1
done
exit "$failed"
- name: Aggregate packaged 1080p60 recording calibration
id: record_1080p60_calibration
if: always() && steps.record_1080p60.outcome == 'success'
continue-on-error: true
run: >-
pnpm perf:calibrate
--output "$VIDEORC_PERF_ARTIFACT_DIR/record-1080p60-calibration.json"
--budget-output "$VIDEORC_PERF_ARTIFACT_DIR/record-1080p60-budget-candidate.json"
"$VIDEORC_PERF_ARTIFACT_DIR/record-1080p60-run-1.child.json"
"$VIDEORC_PERF_ARTIFACT_DIR/record-1080p60-run-2.child.json"
"$VIDEORC_PERF_ARTIFACT_DIR/record-1080p60-run-3.child.json"
- name: Prime record-vertical-4k30 workload
run: |
VIDEORC_SMOKE_OUTPUT_DIR="$VIDEORC_PERF_ARTIFACT_DIR/record-vertical-4k30-media/primer" \
pnpm perf:scenario --scenario record-vertical-4k30 --report-only \
--profile-class short-sentinel \
--warmup-seconds 60 \
--measurement-seconds 120 \
--sample-interval-ms 1000 \
--output "$VIDEORC_PERF_ARTIFACT_DIR/record-vertical-4k30-primer.json"
- name: Real vertical 4K30 recording endurance
id: record_vertical_4k30
continue-on-error: true
run: |
failed=0
for calibration_run in 1 2 3; do
VIDEORC_SMOKE_OUTPUT_DIR="$VIDEORC_PERF_ARTIFACT_DIR/record-vertical-4k30-media/run-${calibration_run}" \
VIDEORC_PERF_ACTIVE_BUDGET_PATH="$VIDEORC_PERF_GATE_ACTIVE_BUDGET_PATH" \
VIDEORC_PERF_REQUIRE_ACTIVE_BUDGET="$VIDEORC_PERF_GATE_REQUIRE_ACTIVE_BUDGET" \
pnpm perf:scenario --scenario record-vertical-4k30 --profile-class endurance --gate \
--warmup-seconds "$WARMUP_SECONDS" \
--measurement-seconds "$MEASUREMENT_SECONDS" \
--output "$VIDEORC_PERF_ARTIFACT_DIR/record-vertical-4k30-run-${calibration_run}.json" \
|| failed=1
done
exit "$failed"
- name: Aggregate packaged vertical 4K30 recording calibration
id: record_vertical_4k30_calibration
if: always() && steps.record_vertical_4k30.outcome == 'success'
continue-on-error: true
run: >-
pnpm perf:calibrate
--output "$VIDEORC_PERF_ARTIFACT_DIR/record-vertical-4k30-calibration.json"
--budget-output "$VIDEORC_PERF_ARTIFACT_DIR/record-vertical-4k30-budget-candidate.json"
"$VIDEORC_PERF_ARTIFACT_DIR/record-vertical-4k30-run-1.child.json"
"$VIDEORC_PERF_ARTIFACT_DIR/record-vertical-4k30-run-2.child.json"
"$VIDEORC_PERF_ARTIFACT_DIR/record-vertical-4k30-run-3.child.json"
- name: Prime studio-live-mic-visuals workload
run: >-
pnpm perf:scenario --scenario studio-live-mic-visuals --report-only
--profile-class short-sentinel
--warmup-seconds 60
--measurement-seconds 120
--sample-interval-ms 1000
--output "$VIDEORC_PERF_ARTIFACT_DIR/studio-live-mic-visuals-primer.json"
- name: Studio live microphone visuals endurance
id: studio_mic_visuals
continue-on-error: true
run: |
failed=0
for calibration_run in 1 2 3; do
VIDEORC_PERF_ACTIVE_BUDGET_PATH="$VIDEORC_PERF_GATE_ACTIVE_BUDGET_PATH" \
VIDEORC_PERF_REQUIRE_ACTIVE_BUDGET="$VIDEORC_PERF_GATE_REQUIRE_ACTIVE_BUDGET" \
pnpm perf:scenario --scenario studio-live-mic-visuals --profile-class endurance --gate \
--warmup-seconds "$WARMUP_SECONDS" \
--measurement-seconds "$MEASUREMENT_SECONDS" \
--output "$VIDEORC_PERF_ARTIFACT_DIR/studio-live-mic-visuals-run-${calibration_run}.json" \
|| failed=1
done
exit "$failed"
- name: Aggregate packaged Studio mic-visual calibration
id: studio_mic_visuals_calibration
if: always() && steps.studio_mic_visuals.outcome == 'success'
continue-on-error: true
run: >-
pnpm perf:calibrate
--output "$VIDEORC_PERF_ARTIFACT_DIR/studio-live-mic-visuals-calibration.json"
--budget-output "$VIDEORC_PERF_ARTIFACT_DIR/studio-live-mic-visuals-budget-candidate.json"
"$VIDEORC_PERF_ARTIFACT_DIR/studio-live-mic-visuals-run-1.child.json"
"$VIDEORC_PERF_ARTIFACT_DIR/studio-live-mic-visuals-run-2.child.json"
"$VIDEORC_PERF_ARTIFACT_DIR/studio-live-mic-visuals-run-3.child.json"
- name: Prime lifecycle-churn workload
run: >-
pnpm perf:scenario --scenario lifecycle-churn --profile-class short-sentinel --report-only
--warmup-seconds 60
--measurement-seconds 120
--sample-interval-ms 1000
--output "$VIDEORC_PERF_ARTIFACT_DIR/lifecycle-churn-primer.json"
env:
VIDEORC_PREVIEW_LIFECYCLE_CYCLES: '40'
- name: Explicit lifecycle churn endurance
id: lifecycle_churn
continue-on-error: true
run: |
failed=0
for calibration_run in 1 2 3; do
VIDEORC_PERF_ACTIVE_BUDGET_PATH="$VIDEORC_PERF_GATE_ACTIVE_BUDGET_PATH" \
VIDEORC_PERF_REQUIRE_ACTIVE_BUDGET="$VIDEORC_PERF_GATE_REQUIRE_ACTIVE_BUDGET" \
pnpm perf:scenario --scenario lifecycle-churn --profile-class endurance --gate \
--warmup-seconds "$WARMUP_SECONDS" \
--measurement-seconds "$MEASUREMENT_SECONDS" \
--sample-interval-ms 1000 \
--output "$VIDEORC_PERF_ARTIFACT_DIR/lifecycle-churn-run-${calibration_run}.json" \
|| failed=1
done
exit "$failed"
env:
VIDEORC_PREVIEW_LIFECYCLE_CYCLES: '200'
- name: Aggregate packaged lifecycle-churn calibration
id: lifecycle_churn_calibration
if: always() && steps.lifecycle_churn.outcome == 'success'
continue-on-error: true
run: >-
pnpm perf:calibrate
--output "$VIDEORC_PERF_ARTIFACT_DIR/lifecycle-churn-calibration.json"
--budget-output "$VIDEORC_PERF_ARTIFACT_DIR/lifecycle-churn-budget-candidate.json"
"$VIDEORC_PERF_ARTIFACT_DIR/lifecycle-churn-run-1.child.json"
"$VIDEORC_PERF_ARTIFACT_DIR/lifecycle-churn-run-2.child.json"
"$VIDEORC_PERF_ARTIFACT_DIR/lifecycle-churn-run-3.child.json"
- name: Periodic or failure-triggered allocator attribution
id: allocator_attribution
if: >-
always() &&
(github.event_name == 'schedule' ||
steps.short_sentinel.outcome == 'failure' ||
steps.native_preview.outcome == 'failure' ||
steps.record_4k.outcome == 'failure' ||
steps.record_stream.outcome == 'failure' ||
steps.native_devices.outcome == 'failure' ||
steps.record_1080p60.outcome == 'failure' ||
steps.record_vertical_4k30.outcome == 'failure' ||
steps.studio_mic_visuals.outcome == 'failure')
continue-on-error: true
run: node scripts/perf-memory-probe.mjs --report-only
env:
VIDEORC_PERF_MODE: report-only
VIDEORC_PERF_REPORT_PATH: docs/acceptance/artifacts/performance/endurance/allocator-attribution.json
VIDEORC_PERF_LEAK_WINDOW_SECONDS: '120'
VIDEORC_PERF_RETAIN_ARTIFACTS: '1'
- name: Upload performance JSON and media evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: macos-performance-endurance-${{ github.run_id }}
path: |
docs/acceptance/artifacts/performance/**/*.json
docs/acceptance/artifacts/performance/**/*.mp4
docs/acceptance/artifacts/performance/**/*.mov
docs/acceptance/artifacts/performance/**/*.mkv
docs/acceptance/artifacts/performance/**/*.flv
docs/acceptance/artifacts/performance/**/*.md
if-no-files-found: error
retention-days: 90
- name: Enforce complete endurance matrix
if: always()
run: |
outcomes=(
"short-sentinel=${{ steps.short_sentinel.outcome }}"
"short-sentinel-calibration=${{ steps.short_sentinel_calibration.outcome }}"
"native-preview=${{ steps.native_preview.outcome }}"
"native-preview-calibration=${{ steps.native_preview_calibration.outcome }}"
"preview-lifecycle=${{ steps.preview_lifecycle.outcome }}"
"record-4k=${{ steps.record_4k.outcome }}"
"record-4k-calibration=${{ steps.record_4k_calibration.outcome }}"
"record-stream=${{ steps.record_stream.outcome }}"
"record-stream-calibration=${{ steps.record_stream_calibration.outcome }}"
"native-devices=${{ steps.native_devices.outcome }}"
"native-devices-calibration=${{ steps.native_devices_calibration.outcome }}"
"record-1080p60=${{ steps.record_1080p60.outcome }}"
"record-1080p60-calibration=${{ steps.record_1080p60_calibration.outcome }}"
"record-vertical-4k30=${{ steps.record_vertical_4k30.outcome }}"
"record-vertical-4k30-calibration=${{ steps.record_vertical_4k30_calibration.outcome }}"
"studio-mic-visuals=${{ steps.studio_mic_visuals.outcome }}"
"studio-mic-visuals-calibration=${{ steps.studio_mic_visuals_calibration.outcome }}"
"lifecycle-churn=${{ steps.lifecycle_churn.outcome }}"
"lifecycle-churn-calibration=${{ steps.lifecycle_churn_calibration.outcome }}"
)
if [[ "${{ steps.allocator_attribution.outcome }}" != "skipped" ]]; then
outcomes+=("allocator-attribution=${{ steps.allocator_attribution.outcome }}")
fi
failed=0
for outcome in "${outcomes[@]}"; do
echo "$outcome"
if [[ "$outcome" != *=success ]]; then
failed=1
fi
done
exit "$failed"
- name: Clean successful endurance evidence from runner
if: success()
run: rm -rf "$VIDEORC_PERF_ARTIFACT_DIR"