14 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 7b654809c6 Allow Automation Mode without authentication
UI tests turn on Automation Mode, which by default asks for a password
that nobody is at the runner to type. Turn that off with
automationmodetool enable-automationmode-without-authentication. It asks
for root's password even under sudo; root has none, so feed it an empty
line. Verify that automationmodetool reports no authentication needed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 18:48:35 -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 70d27b8968 Let the runner user take Homebrew lock files
UTM's build_dependencies.sh runs "brew --prefix <formula>" as the runner.
With no API cache of its own, that brew downloads one and first takes a
lock in the admin-owned locks directory, which failed with "Permission
denied" and was reported as "You must install 'llvm' from Homebrew".
Grant the runner and the admin group inherited access to the lock
files, and verify the lookups as the runner.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 13:37:08 -07: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 e7c5efe398 Update squid-patch to report the CA's real expiry date
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 23:14:25 -07:00
osyandClaude Opus 5.5 8cb131a60c Check that the System keychain trusts the Squid CA
The Actions runner (.NET), URLSession, SwiftPM and xcodebuild validate
against the keychain rather than SSL_CERT_FILE, so on a fresh image every
bumped host failed with UntrustedRoot. Adding a trusted root needs an
on-screen confirmation, and on macOS 27 root cannot relax that rule
(authorizationdb write returns -60005), so the squid step only checks and
prints the command to run on the runner's screen. verify gains the same
check, and the README describes the manual step after a re-image.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 23:14:25 -07:00
osyandClaude Opus 5.5 c018faf432 Update squid-patch for fresh installs and boot-time DNS
Pulls in the deploy.sh fixes found re-imaging the runner: replace Homebrew's
stock squid.conf, wait for a nameserver before starting squid at boot, and
wait for squid to exit before re-bootstrapping it or building the cache.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 20:53:33 -07:00
osyandClaude Opus 5.5 8cd96af674 Drop the deprecated homebrew/services tap from the Brewfile
brew services is now built into Homebrew and the tap is empty, so tapping
it fails and makes brew bundle exit non-zero.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 20:21:52 -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