|
libfreenect2 0.4
Open source driver for the Kinect for Windows v2 (K4W2) sensor
|
Most of the CI workflow (.github/workflows/ci.yml) runs on GitHub-hosted ubuntu-24.04. Exactly one job needs a real Apple GPU and therefore a self-hosted macOS runner:
Every other job — python-quality, linux-builds, linux-filter-backends, linux-vaapi, sanitizers, fuzzers, coverage, format, semgrep, and static-analysis — runs on GitHub-hosted Linux and needs nothing from this machine.
This guide sets up a machine to serve that one job. No Kinect hardware is required — every test in it is hardware-free; only a Metal-capable GPU is used.
The separate, manually dispatched Kinect hardware soak workflow targets a runner that also has the kinect label and a physically connected Kinect v2. It defaults to 100 start/capture/stop/close cycles on both CPU and Metal, then starts an operator-assisted reconnect check. Watch the job log; when KinectReconnect asks, unplug the Kinect and reconnect it within 60 seconds. The check requires the old pointer to reach a terminal state and capture to resume through a newly opened device object.
Set the workflow's reconnect_cycles input to 0 only when the runner is unattended. That run does not satisfy the unplug/replug release gate and must be identified as such in the release checklist.
).
Install full Xcode (not just the Command Line Tools) — the Metal shader compiler ships only with Xcode. Then verify the compiler actually runs:
Supported across recent macOS releases, including macOS 15 Sequoia (Xcode 16) and macOS 26 Tahoe (Xcode 26):
macOS 26 Tahoe / Xcode 26 and later — the metal launcher stub is present but cannot execute until the Metal Toolchain component is downloaded once:
If metal --version fails, the build still succeeds but Metal support is disabled and the parity test skips — so fix this before relying on CI.
Use the Homebrew prefix that matches the machine: /opt/homebrew on Apple Silicon, /usr/local on Intel. Do not run the shell/CMake under Rosetta on Apple Silicon (see the macOS notes in the top-level README.md).
The format and static-analysis jobs run on GitHub-hosted Linux and install their own tooling, so this machine does not need either. Install them only if you want to reproduce those checks locally before pushing:
Note that format is advisory (continue-on-error: true) but static-analysis is a hard gate — a clang-tidy failure fails CI.
In the repository: Settings → Actions → Runners → New self-hosted runner → macOS. GitHub shows the exact download/configure commands with a registration token. They look like:
During config.sh, when prompted for labels, keep the defaults and make sure the runner ends up with both self-hosted and macOS labels — the workflow targets runs-on: [self-hosted, macOS], so a runner missing either label will never be picked. (self-hosted is added automatically; macOS is a default label for the macOS runner package.)
For occasional/interactive use:
To keep it running across reboots, install it as a launchd service:
Metal note: the service must run in a context that has access to the window server, or the Metal parity test will skip. Running ./run.sh (or the service) from inside a logged-in desktop session is the simplest way to guarantee GPU access. If you rely on svc.sh, log in as the runner's user and confirm the parity test runs (not skips) on the first CI run — see the verification below.
Either push a branch and watch the CI jobs, or reproduce them locally on the runner:
A healthy runner produces a green build-test-metal with the parity cases running on the GPU.