Skip to Content
Xeonr Developer Docs
Pipelines

Run a runner on a Mac

Install branchd's runner agent on your own Mac with one command, for jobs that need macOS, Xcode or a keychain.

Not yet available (jobs on a Mac runner): the install works and the Mac joins its pool, but a Mac runner takes only trusted, protected work, and branchd cannot yet mark a pool that way. Until it can, the runner refuses every job it is handed, and the job fails with the reason.

A Mac runner is your own Mac (Apple silicon) running branchd's runner agent for one of your runner pools. Jobs whose runs-on labels match the pool run on the Mac itself, as the Mac user you install it as, with that user's tools, files, GUI session and login keychain. There is no container and no sandbox. Use it only for jobs that need macOS, and give the pool only to work you trust (see Security).

Install

  1. Make a pool and get its registration token (fpt_…), with a signed-in branchd CLI:

    branchd pool create <owner> macos --labels macos,xcode --description "Our Mac: Xcode builds"

    branchd pool rotate-token <pool> prints a new token for an existing pool.

  2. On the Mac, logged in as the user jobs should run as (not root, not sudo), run:

    curl -fsSL https://updater.xeonr.io/96/download/dst_f7c2d19cf6a09d65 | sh

    It asks for the pool token, registers the Mac with the pool, and starts the agent as a LaunchAgent of that user. It needs no other credential.

Running it again upgrades the agent and keeps its registration. The Mac user must stay logged in, because a LaunchAgent stops at logout. Set the Mac to log in automatically if the runner must survive a reboot.

SettingDefault
BRANCHD_POOL_TOKENasked forThe pool's registration token. Used only on the first install.
RUNNER_NAMEthe Mac's local host nameThe runner's name in the pool.
HEALTH_PORT8080The agent's local health port.

Put a setting before sh, for example … | RUNNER_NAME=build-mac sh.

What it installs, and how it is checked

The agent and its step helper go in ~/Library/Pipelines/bin, their state and each job's working directory under ~/Library/Pipelines, and the LaunchAgent in ~/Library/LaunchAgents/io.xeonr.pipelines.runner.agent.plist. Both binaries are downloaded over HTTPS from the Xeonr Updater. Each archive's SHA-256 must match the one written into the installer, and the one the Updater recorded when it was published. If either differs, the installer stops before installing anything.

Check and uninstall

launchctl print gui/$(id -u)/io.xeonr.pipelines.runner.agent | head -20
tail -f ~/Library/Pipelines/runner.log
branchd runner list <pool>

To remove it, run this on the Mac, then drain the runner so the pool stops listing it:

curl -fsSL https://updater.xeonr.io/96/download/dst_f7c2d19cf6a09d65 | sh -s -- --uninstall
branchd runner drain <runner>

On this page