Building Lanyard, part 3: why our CI is a Mac mini on a shelf

No hosted Mac runs Apple Intelligence, so an on-device AI app can't be fully tested in the cloud. How we compared hosted CI with a Mac mini of our own, and what that machine needs to stay up.

Dan Fernández

· 5 min read

Part 3 of Building Lanyard.

Most teams starting an iOS app today would reach for hosted CI: GitHub Actions, Xcode Cloud, Bitrise. We use some of that, but most of Lanyard’s testing runs on a Mac mini on a shelf, with a MacBook as its backup, because for an app built on Apple’s on-device AI there was no hosted alternative.

No hosted Mac runs Apple Intelligence

Lanyard is built on Apple’s on-device language model and speech recognition. Our most important tests transcribe real conference audio, run the model over it and score the report, and they need a Mac with Apple Intelligence turned on and its model downloaded.

As of November 2026 you can’t rent one. AWS says plainly that EC2 Mac instances don’t support Apple Intelligence. GitHub, Azure, CircleCI, Bitrise and Xcode Cloud run macOS in virtual machines, and developers report that Apple Intelligence can’t be turned on in a macOS VM and that the Foundation Models framework reports the device as not eligible (Apple doesn’t document it either way). A dedicated bare-metal Mac that boots from its own disk might work, but we haven’t confirmed it, and it costs about $149 a month for an M4 mini.

So anything that touches the model, speech or our launch-time budget runs on hardware we control.

What hosted CI would still cover

We priced hosted CI for everything else anyway, from vendors’ pages in November 2026 (the numbers will change).

All the free macOS tiers we found add up to about 1,300 minutes a month, plus 25 hours of Xcode Cloud that comes with the developer membership. One full run of our iOS UI tests takes 25–40 minutes on a cold hosted machine, so that’s roughly 70–110 runs a month. The mini can do about 80 runs a day, which makes all the free hosted macOS put together worth about one extra mini-day a month.

Android goes the other way. GitHub’s macOS runners can’t run Android emulators (no nested virtualization), but Linux runners with KVM can, and there are plenty of them. Several providers give 1,500 or more free minutes a month on 4 vCPU / 16 GB machines, enough for 100–150 emulator runs each.

So the work is split:

WorkWhere
On-device model, speech, performance, full UI suitesThe Mac mini, with the MacBook as backup
Unit tests for the packages and AndroidHosted Linux runners
Android emulator runsHosted Linux with KVM, or our Macs
Extra iOS runs that need no modelXcode Cloud, as overflow
TestFlight buildsSigned on our own Macs

A base Mac mini costs about the same as four months of renting one.

How runs get to the mini

Every test script checks for a build host. If one is set, the script copies the branch to the mini, runs there and copies the results back. When the mini is full, a setting decides whether the run waits or stays on the laptop, and if the mini doesn’t answer, the run falls back to the laptop with a warning.

At 1:30 every night the mini runs everything: iOS and Android unit tests, every UI suite, the parity checks between the two platforms and, last and on its own, the performance suite. Each failure gets one retry so the report can tell flaky tests from broken ones, and failures are compared with the previous night’s so new ones stand out. If the machine is still busy with daytime work, the nightly run skips itself and says so rather than produce results nobody can trust.

With 16 GB, the mini runs two simulators and one build at a time. Our rough rule is one simulator per two performance cores, and one build per 8 GB of RAM above the first 8.

Looking after it

Most of what a build server in a corner needs is a way back to work without anyone touching it. It should restart on its own after a power cut and log in on its own, because simulators and the on-device model run in the logged-in user’s session and a Mac waiting at the login screen does nothing. On macOS you can’t have automatic login with FileVault on, so you’re choosing between disk encryption and unattended restarts; decide which matters more for that machine and what’s on it.

It also shouldn’t install macOS updates by itself. An update restarts the machine mid-run and leaves it on a different OS from the backup, so we keep security responses automatic and do updates by hand, on both Macs together. A login job clears locks and test copies left over from before a restart, so nothing waits forever on a session that’s gone.

The mini has to match the backup: same Xcode, same simulator runtimes, and the same macOS where possible. Results from different Xcode versions aren’t comparable. Simulator runtimes that look like duplicates usually aren’t, so don’t delete them.

It fills up. Build folders are about 2 GB each, and with a dozen branches going the mini got down to 347 MB free. A cleanup job now runs every other day and removes folders that haven’t been used for three days. The system runs its own cleanups too, and part 6 has the story of macOS emptying our build folders at 03:35.

We keep as little on it as we can. It has no GitHub credentials: the laptop pushes the branch under test into a mirror on the mini, and results come back the same way. Signing uses its own keychain, with an App Store Connect API key only the build user can read, since the everyday login keychain locks over SSH and code signing couldn’t use it anyway. Remote login is on for one user over a private network, nothing on the machine is open to the internet, and it runs Xcode and very little else.

Things that broke without a sound

Results copied back from the mini overwrote newer local ones, until the copy learned to keep the newer file. A setting with a digit in its name was never read, so a feature we thought was on had been quietly off; we now read back every config value we set. And when several model test runs overlapped, the system ran low on memory and started refusing the on-device model. Ten tests failed at once and it looked like a prompt regression. The test script now waits out memory pressure and reruns once before reporting a failure.

We’d do it again, and sooner. If your app uses Apple’s on-device AI, plan on a real Mac you control from the start and use hosted CI as overflow for the rest. The mini is cheap; the effort goes into getting it to restart by itself, clean up after itself and match the machine on your desk.

Next: iOS vs Android, one app on two very different phones.

Working on something similar?

If this is close to a problem your team has, tell us about it.