Blog · CI/CD
Set up iOS CI/CD on a cloud Mac mini in an afternoon
A dedicated Mac mini as a self-hosted GitHub Actions runner: faster builds, warm caches and no per-minute macOS billing.

Hosted macOS runners are convenient, but every job starts from a cold machine: Xcode caches, Swift packages and simulators are downloaded again and again. A dedicated Mac keeps all of that warm, so the second build of the day is usually much faster than the first.
1. Prepare the Mac
- Connect over SSH with the details from your Hatmac account.
- Install the Xcode version your project uses with
xcodesor from the App Store, then runsudo xcodebuild -runFirstLaunch. - Install the command line tools you need, for example
brew install fastlane swiftlint.
2. Register the runner
In your GitHub repository, open Settings → Actions → Runners → New self-hosted runner and choose macOS. GitHub shows the exact download and ./config.sh commands for your repository. Run them on the Mac, then install the runner as a service so it starts after a reboot:
./svc.sh install
./svc.sh start
3. Point your workflow at it
jobs:
build:
runs-on: [self-hosted, macOS]
steps:
- uses: actions/checkout@v4
- run: xcodebuild -scheme App -destination 'platform=iOS Simulator,name=iPhone 16' test
4. Keep it healthy
- Clean
~/Library/Developer/Xcode/DerivedDataon a schedule if disk space gets tight. - Keep signing certificates in a dedicated keychain and unlock it at the start of the job.
- Use one runner per Mac for predictable build times. Add a second Mac when the queue grows.
Need more than one runner? Teams often pair a Mac mini for everyday builds with a Mac Studio for large test matrices.


