What you need
With Mobster for Mac, sign the runner in to your account, as you do your own Mac (Your Macs).
1. The Mac
Make a standard user for the runner, such asci, and sign in as that user for the rest of this page. Then:
- Turn on automatic login for it in System Settings › Users & Groups. After a restart, the runner and the simulators start again without anyone at the Mac.
-
Keep the Mac awake and have it restart after a power cut:
The display may sleep. Simulators don’t need it.
- Turn on Screen Sharing or Remote Login in System Settings › General › Sharing, to reach a Mac with no screen.
2. Xcode and a simulator
Install Xcode from the App Store, open it once, then:3. Mobster
Install Mobster, then prepare a simulator, so the first job doesn’t wait for one:- From PyPI
- With Mobster for Mac
4. The runner
- GitHub Actions
- GitLab CI
In your repository (or organization), open Settings › Actions › Runners › New self-hosted runner, and pick macOS and ARM64. Run the commands GitHub shows in
~/actions-runner, and add the mobster label when config.sh asks for labels:svc.sh install runs the runner as a LaunchAgent of the ci user. Keep it that way: a runner started as a system daemon can’t reach the user’s simulators, Keychain or iPhone.5. The iPhone
Skip this for simulators only.- Plug the phone into the Mac with a cable, and set it up with
mobster setupor in Mobster for Mac, signed in as the runner’s user (Device setup). Developer Mode stays on. - On the phone, set Settings › Display & Brightness › Auto-Lock to Never, and keep it on its cable so it charges.
- Name it in the runner’s own environment, so a pull request can’t reach a phone the runner’s owner didn’t list:
- GitHub Actions
- GitLab CI
~/actions-runner/.env
./svc.sh stop && ./svc.sh start.MOBSTER_RUNNER_TESTFLIGHT lists the bundle IDs of TestFlight builds the jobs may test on the phone, the same way.
6. Check it
- From PyPI
- With Mobster for Mac
mobster ci init --self-hosted (next release) in your project (CI, GitLab CI).
Keeping it running
- When you update Xcode or Mobster on your own Mac, update the runner too: Xcode, and Mobster for Mac or the
mobster-cliversion your workflow pins. CI then builds what you build. - Delete simulators of runtimes you removed:
xcrun simctl delete unavailable. - Xcode’s DerivedData and old simulator runtimes fill the disk.
mobster ci doctorwarns under 30 GB free and fails under 10 GB. - One runner runs one job at a time. For more jobs at once, add a second Mac, and split the checks with
--shard(CI).