Self-hosted CI runners
Your dedicated Mac makes an excellent self-hosted CI runner — full performance, persistent caches, and no per-minute macOS billing.
On your Mac, from your repo’s Settings → Actions → Runners → New self-hosted runner, follow the macOS instructions:
mkdir actions-runner && cd actions-runnercurl -o actions-runner-osx-arm64.tar.gz -L <URL-from-GitHub>tar xzf actions-runner-osx-arm64.tar.gz./config.sh --url https://github.com/ORG/REPO --token <TOKEN>./run.sh # or install as a service:./svc.sh install && ./svc.sh startTarget it in a workflow with runs-on: self-hosted (or a custom label).
In GitLab, open your project’s Settings → CI/CD → Runners and select Create project runner (for a group: Build → Runners → Create group runner). Set the runner’s tags there, then copy its runner authentication token, which starts with glrt-. On your Mac:
brew install gitlab-runnergitlab-runner register \ --non-interactive \ --url https://gitlab.com/ \ --token "glrt-YOUR_TOKEN" \ --executor shell \ --name "mac-mini-m4"brew services start gitlab-runnerTags, untagged jobs and locking are set on the runner in GitLab: with an authentication token, register doesn’t accept --tag-list. Use a matching tags: entry in .gitlab-ci.yml. You can also create the runner with the API (POST /user/runners, with an access token that has the create_runner scope).
The older registration-token flow (--registration-token) has been deprecated since GitLab 15.6 and is scheduled for removal in GitLab 20.0. Since GitLab 17.0, it only works where an administrator (or, on GitLab.com, the owner of the top-level group) has enabled it again.
Run a Jenkins agent over SSH or JNLP. Add the Mac as a node (Manage Jenkins → Nodes → New Node), set the remote root (e.g. /Users/your-username/jenkins), and connect via the SSH launcher using your SSH key.
Keep it healthy
Section titled “Keep it healthy”- Clean DerivedData and old simulators regularly to reclaim disk.
- Pin Xcode versions with
xcodesso builds are reproducible. - Watch free space with
df -h; upgrade the SSD tier if needed.