Give every Mac runner one priority-pool label (hotfix, standard, or nightly), route jobs by that label, and size each pool with Little's Law against your real arrival rate. The rule is runners = builds per hour × hours per build, rounded up, plus one for spikes.
A single-queue fleet makes every job first-come-first-served. When a nightly integration run occupies all three Mac runners, the hotfix build an on-call engineer just pushed sits 40 minutes behind it. The fix is rarely more hardware. Label the runners into separate pools so urgent work always has a lane, then size each pool deliberately.
Why does a single queue delay urgent builds?
Priority inversion: a low-priority job holds a resource a high-priority job needs. On a Mac CI fleet that looks like:
- A nightly 500-test run claims the only idle runner seconds before a P0 hotfix lands.
- A Dependabot update saturates the fleet on Monday morning.
- An overnight simulator suite overruns standup and blocks every PR build.
Named pools break the shared bottleneck. Hotfix jobs queue only behind other hotfix jobs, and nightly jobs compete only with other nightly jobs. Their arrival rates and service times differ enough that mixing them causes the wait.
How do I label runners into pools?
Give each Mac runner at least two labels: a capability label (macos, xcode-26) and one priority-pool label (hotfix, standard, or nightly). Do not assign a runner to more than one pool. Whichever job arrives first takes it and the separation is gone.
A three-runner fleet might look like this:
| Runner | Pool | Typical jobs |
|---|---|---|
| mac-runner-01 | hotfix | Emergency patches, blocker PRs |
| mac-runner-02 | standard | Regular PR builds, unit tests |
| mac-runner-03 | nightly | Full integration suites, archiving |
With two runners, assign one to hotfix and one to standard, and schedule nightly jobs on the standard runner during low-PR hours.
How do I configure the pools in GitHub Actions, Buildkite, and GitLab?
Route by label in each system. In GitHub Actions, add custom labels when you register the runner, then reference them in runs-on. A self-hosted runner must match every label in the runs-on array to be eligible, per the GitHub Actions self-hosted runner docs.
# Registration (run on the Mac itself)
./config.sh --url https://github.com/ORG/REPO \
--token "$RUNNER_TOKEN" \
--labels self-hosted,macOS,xcode-26,hotfix
# .github/workflows/hotfix.yml
jobs:
build:
runs-on: [self-hosted, macOS, hotfix]
steps:
- uses: actions/checkout@v4
- run: xcodebuild build -scheme "$APP_SCHEME" -destination 'generic/platform=iOS'
# .github/workflows/nightly.yml
jobs:
integration:
runs-on: [self-hosted, macOS, nightly]
steps:
- uses: actions/checkout@v4
- run: xcodebuild test -scheme "$APP_SCHEME_TESTS" -destination 'platform=iOS Simulator,name=iPhone 16,OS=latest'
Replace $APP_SCHEME and $APP_SCHEME_TESTS with the scheme names from your own xcodebuild -list output. Both jobs stop on failure (the default); a failed build is not a benchmarked run.
For Buildkite, tag the agent, then target the queue in the pipeline. Tags are set in the agent configuration and referenced under agents: in the step, per the Buildkite defining steps docs.
# /etc/buildkite-agent/buildkite-agent.cfg (mac-runner-01)
tags="os=macOS,xcode=26,queue=hotfix"
steps:
- label: "Hotfix build"
command: "scripts/build.sh"
agents:
queue: hotfix
os: macOS
For GitLab CI, tag the runner on registration, then require the tags in the job:
# .gitlab-ci.yml
build-hotfix:
tags:
- mac
- hotfix
script:
- xcodebuild build -scheme "$APP_SCHEME" -destination 'generic/platform=iOS'
How many runners does each pool need?
Use Little's Law. It gives the minimum number of runners that keeps the queue empty on average:
N = λ × W
N= runners required at zero steady-state queueλ= arrival rate (builds per hour)W= average service time per build (hours)
That number is a floor. Round up, then add at least one runner per pool as spike headroom.
| Pool | Peak builds/hr (λ) | Avg duration (W) | N = λ × W | Recommended |
|---|---|---|---|---|
| Hotfix | 2 | 0.17 h (10 min) | 0.34 → 1 | 1 (dedicated) |
| Standard | 10 | 0.20 h (12 min) | 2.00 → 2 | 2–3 |
| Nightly | 1 | 1.00 h (60 min) | 1.00 → 1 | 1 |
Check the standard row: 10 builds/hour × 12 minutes = 120 build-minutes per hour = 2.0 runner-hours per hour. Two runners is the floor and three is the realistic allocation once variance is included.
Fill in your own numbers:
runners_min = ceil( peak_builds_per_hour × (avg_build_minutes / 60) )
runners_recommended = runners_min + 1
When λ × W exceeds N, jobs wait. Your levers are to cut arrivals (defer nightly work), shorten W (caching, parallel test shards), or raise N (add a machine to the pool).
Can I autoscale Mac runners?
Not the way you can on Linux. Linux CI services spin up ephemeral runners in seconds, but a Mac is a rented machine you register as a runner. The practical pattern is a fixed fleet with pool labels protecting reserved capacity. If the standard pool bursts, let the nightly runner join the standard pool for a defined window. CI systems that support dynamic labels can swap pool tags without a reinstall. For a busy week you can also rent one more Mac by the hour or day and register it by hand.
How do I monitor queue depth?
Watch queue wait time. A reasonable starting alert is median hotfix wait over 2 minutes or standard wait over 10 minutes. Tune both to your own data.
- GitHub Actions
- compare
created_attostarted_atfrom the workflow-runs REST API, grouped by runner label. - Buildkite
- per-queue wait time and job age are in the dashboard and can be scraped through the metrics API.
- GitLab
- pipeline analytics shows per-tag runner queue-time trends.
Log wait time inside the job itself and chart it weekly. Creeping saturation shows up as a rising median long before anyone files a ticket.
How do you match a Mac to each runner pool?
Each runner is its own Mac, so the choice is per pool. A Dedicated M4 Pro 48 GB ($349 a month; M4 Pro, 48GB RAM, 512GB SSD, whole Mac) suits a standard pool that runs parallel or heavy builds. An Apple Silicon Mac VM ($39 a month; 4 shared vCPUs, 4GB RAM) fits a light hotfix or nightly runner on current Xcode. The Intel Mac VM ($25 a month, macOS Sequoia, Xcode 26.3 or earlier) works for Intel-compatible targets only; it cannot run arm64-only binaries or visionOS. Figment does not run your CI. You install and manage the runners. Larger fleets are quoted on a call.
For related reading, see CI artifact storage and retention on a Mac, incremental Xcode builds via derived data cache, and remote Xcode from Windows.