The runner's disk filled up and sysroot builds died with "No space left
on device". 59 GB of it was two simulators' wallpaper snapshots
(PRBPosterExtensionDataStore): a simulator renders them again at every
boot and keeps the old ones, and nothing here ever touched device data.
In the job hook, erase every simulator that is shut down and has been
booted since its last erase. The runners share one set of devices, so
the hook never shuts one down, and simctl refuses to erase a booted
one. In the weekly cleanup, which runs with every runner idle, shut
all of them down and erase them, for a device that is always in use
when a job ends.
simctl erase fails on a full disk, so this keeps the disk from filling
but cannot recover one that already has.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Nobody is at the runner's screen, and a locked session gets in the way of
Screen Sharing and UI tests. Set the runner's screen saver to never start
and turn its screen lock off with sysadminctl, which needs the account's
password: the one bootstrap.sh was given, or the automatic login password
in /etc/kcpassword. Verify both.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
xcrun caches tool paths per DEVELOPER_DIR and doesn't notice components
added later. A lookup made before the Metal toolchain was installed kept
resolving to Xcode's metal stub, so every UTM build failed with "missing
Metal Toolchain". Clear the cache after the xcode step's components and
in the job hook.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Xcode keys DerivedData on the project path, so each runner, platform and
dependency project (UTM, ANGLE, MoltenVK, Hypervisor) gets its own folder.
Fresh checkouts never reuse them, and they grew ~20 GB a day between the
weekly purges. Shared module caches are kept.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The runner's disk is 88% full and the cache would outgrow the free space
before reaching 100000 MB. Objects used in the last 30 days total ~43 GiB,
so 50000 MB keeps a month of traffic and only evicts long-idle blobs.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The cleanup hook only ran at job start, so each idle runner kept its last
checkout (~4.6 GB each) on disk until its next job.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- Automatic login: sysadminctl set autoLoginUser but left the previous
user's password in /etc/kcpassword (macOS 27), so the machine stopped at
the login screen. Write and verify /etc/kcpassword ourselves, and treat
automatic login as working only if the stored password authenticates
(probe-user.sh, verify).
- Command Line Tools: move to a separate "clt" step, which also updates
outdated tools after a macOS upgrade (Homebrew refuses to build squid with
them). softwareupdate offers them even when current, so the step
reinstalls every time; add --skip to leave it out.
- Xcode: accept an .xip already on the runner (--xcode-xip-on-runner /
XCODE_XIP_ON_RUNNER) and delete the .xip only once the whole step succeeds.
- Squid: remove a leftover sh.brew.squid LaunchAgent (Homebrew 7 label) and
check for the patch without a pipefail-unsafe pipe. Update squid-patch.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
bootstrap.sh recreates the MacStadium runner after a re-image: passwordless
sudo, machine settings (power, Spotlight, software update, screen sharing,
key-only SSH), Homebrew and build dependencies, the patched Squid proxy from
the squid-patch submodule (as a boot-time LaunchDaemon), the runner account
with automatic login, the GitHub Actions runners, Xcode from a provided .xip,
weekly cache cleanup, and a read-only verify step. All settings live in
config.env; the machine address goes in the git-ignored config.local.env.
backup.sh pulls the runner's secrets (SSH host keys, Squid CA, runner
registrations, automatic login password) into the git-ignored secrets/
directory, and bootstrap.sh restores them instead of generating new ones.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>