8 Commits
Author SHA1 Message Date
osyandClaude Fable 5.2 61524e04d2 Erase the simulators after jobs and in the weekly cleanup
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]>
2026-11-15 10:46:04 -08:00
osyandClaude Opus 5.5 404b584f32 Turn off the runner user's screen saver and screen lock
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]>
2026-11-07 08:47:41 -08:00
osyandClaude Opus 5.5 c1c94453cb Clear the runner user's xcrun cache so metal resolves
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]>
2026-10-26 19:46:15 -07:00
osyandClaude Opus 5.5 4a8eea7a9d Remove the workspace's DerivedData folders in the cleanup hook
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]>
2026-09-24 09:28:25 -05:00
osyandClaude Opus 5.5 f46896dc67 Halve the Squid cache to 50000 MB
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]>
2026-09-24 09:23:31 -05:00
osyandClaude Opus 5.5 5acf3f6e67 Also empty the runner workspace when a job completes
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]>
2026-09-24 09:17:28 -05:00
osyandClaude Opus 5 bb4935875f Fix issues found applying the setup to the live runner
- 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]>
2026-09-15 08:39:59 +02:00
osyandClaude Opus 5 34c6ff3670 Add scripts to rebuild the macOS CI runner over SSH
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]>
2026-09-14 13:27:55 +02:00