-
Notifications
You must be signed in to change notification settings - Fork 8
Runners & OS Resolution
This guide explains how the Unity CI pipeline determines which GitHub Actions runner to use for each job. It supports both GitHub-hosted and self-hosted runners with dynamic OS resolution.
⚠️ Note:
As of now,main_runnershould be set to an Ubuntu-based runner (ubuntu-latestor a compatible self-hosted Linux label).
Thegame-ci/unity-builder@v4action uses Docker and only supports Linux hosts.
Usingwindows-*ormacos-*asmain_runnerwill cause Docker-based builds (e.g. WebGL, Android) to fail.
The pipeline uses two main runner variables:
-
main_runner— used for general jobs like testing, WebGL, Windows, and Linux builds. -
macos_runner— used when a job requires macOS, such as iOS builds or TestFlight deployments.
-
Not Set (Fallback to Default)
If no runners are defined, the workflow uses GitHub-hosted defaults. -
Repository Variable
Ifmain_runnerormacos_runneris defined in your repository under
Settings → Actions → Variables, that value takes priority. -
GitHub-hosted Runner Match
If the value matches a GitHub-hosted runner name (e.g.,ubuntu-latest,macos-latest), it will use that. -
Self-hosted Runner Fallback
If not a GitHub-hosted runner, the workflow looks for a self-hosted runner with a matching label. -
Fail if Not Found
If no matching runner is found, the job will fail.
If neither main_runner nor macos_runner is configured, these defaults apply:
main_runner = ubuntu-latest
macos_runner = macos-latest
This ensures GitHub-hosted compatibility by default.
The list of supported runner OS mappings is maintained in the repository:
➡️ .github/actions/resolve-runners/runners.json
This file defines which GitHub Actions runner should be used for each OS type and is used internally by the resolve-runners action to dynamically select appropriate run
main_runner = ubuntu-latest
macos_runner = macos-latest
main_runner = unity-selfhosted
macos_runner = macos-unity-runner
Note: Ensure your self-hosted runners are registered with these exact labels.
If not found, the workflow will fail.
These runner values are passed into reusable workflows, including:
run-tests.ymlbuild-project.ymlsummarize-build.ymldeploy.yml
Inside those workflows, the runner input is used like this:
runs-on: ${{ inputs.runnerMain }}
This setup enables full flexibility between GitHub-hosted and self-hosted runners.
Let’s build better Unity pipelines together! 🚀
Need help? Join the Discussions or open an Issue.