Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

ci: run real-capture verification on Blacksmith macOS

Richie McIlroydb17691aeef4
diff --git a/.github/workflows/verify-recording.yml b/.github/workflows/verify-recording.yml
index 2ab1e6cfe..e0a96fb91 100644
--- a/.github/workflows/verify-recording.yml
+++ b/.github/workflows/verify-recording.yml
@@ -9,18 +9,21 @@ name: Verify recording (real capture)
# - Scope decides from the diff whether the change reaches the recorder's or
# the stimulus's dependency closure or the harness (scripts/verify/plan.py
# recording); a pull request that does not is green without running;
-# - one that does runs the FAST tier on macOS 15, or the FULL tier on macOS
-# 15 and 26 when it touches a high-risk region or an engine crate; nightly
-# and dispatch run FULL on both.
+# - one that does runs the FAST tier on Blacksmith macOS 15, or the FULL tier
+# on Blacksmith macOS 15 and 26 when it touches a high-risk region or an
+# engine crate; nightly runs FULL on Blacksmith and GitHub-hosted macOS 15
+# and 26, dispatch FULL on the chosen runners.
#
-# Runners: GitHub-hosted macOS by default, because real Macs record through
-# the VideoToolbox hardware H.264 encoder and Blacksmith macOS VMs have none
+# Runners: Blacksmith macOS (M4 Pro VM, 6 vCPU, no concurrency cap) for pull
+# requests, pushes and dispatch: jobs start at once and every run gets the
+# same machine. Blacksmith VMs have no VideoToolbox hardware H.264 encoder
# (VTCompressionSessionCreate with RequireHardwareAcceleratedVideoEncoder
-# returns -12903, probe run 38847791287), so every recording there takes the
-# software (libx264) path. Blacksmith (M4 Pro VM, 6 vCPU, no concurrency cap)
-# is a dispatch option (runners=blacksmith or both) that covers that path; it
-# needs Screen Recording and Microphone granted in TCC, its display woken,
-# and an audio device (BlackHole), which the setup step below does.
+# returns -12903, probe run 38847791287), so recordings there take the
+# software (libx264) path; the nightly run adds GitHub-hosted macOS 15 and
+# 26, which record through the hardware encoder real Macs use (dispatch
+# runners=hosted or both for the same). Blacksmith needs Screen Recording and
+# Microphone granted in TCC, its display woken, and an audio device
+# (BlackHole), which the setup step below does.
on:
workflow_dispatch:
inputs:
@@ -42,10 +45,10 @@ on:
type: boolean
default: false
runners:
- description: "hosted (default), blacksmith (software encoder path) or both"
+ description: "blacksmith (default, software encoder path), hosted (VideoToolbox hardware encoder) or both"
type: choice
- options: [hosted, blacksmith, both]
- default: hosted
+ options: [blacksmith, hosted, both]
+ default: blacksmith
schedule:
- cron: "41 3 * * *"
pull_request:
@@ -91,15 +94,17 @@ jobs:
set -euo pipefail
files="$RUNNER_TEMP/changed.txt"
hosted='["macos-15","macos-26"]'
+ blacksmith='["blacksmith-6vcpu-macos-15","blacksmith-6vcpu-macos-26"]'
+ both='["blacksmith-6vcpu-macos-15","blacksmith-6vcpu-macos-26","macos-15","macos-26"]'
case "$EVENT" in
- schedule) run=true; runners="$hosted"; tier=full ;;
+ schedule) run=true; runners="$both"; tier=full ;;
workflow_dispatch)
run=true
tier="${INPUT_TIER:-full}"
- case "${INPUT_RUNNERS:-hosted}" in
- blacksmith) runners='["blacksmith-6vcpu-macos-15","blacksmith-6vcpu-macos-26"]' ;;
- both) runners='["blacksmith-6vcpu-macos-15","blacksmith-6vcpu-macos-26","macos-15","macos-26"]' ;;
- *) runners="$hosted" ;;
+ case "${INPUT_RUNNERS:-blacksmith}" in
+ hosted) runners="$hosted" ;;
+ both) runners="$both" ;;
+ *) runners="$blacksmith" ;;
esac ;;
*)
if [[ "$EVENT" == pull_request ]]; then
@@ -117,9 +122,9 @@ jobs:
run="$(sed -n 's/^run=//p' "$RUNNER_TEMP/scope.txt")"
python3 scripts/verify/plan.py risk --files "$files" --summary "$GITHUB_STEP_SUMMARY" --output "$RUNNER_TEMP/risk.txt"
if grep -qx 'escalate=true' "$RUNNER_TEMP/risk.txt" || grep -qx 'engine=true' "$RUNNER_TEMP/risk.txt"; then
- runners="$hosted"; tier=full
+ runners="$blacksmith"; tier=full
else
- runners='["macos-15"]'; tier=fast
+ runners='["blacksmith-6vcpu-macos-15"]'; tier=fast
fi ;;
esac
{