ci(audience): add StandaloneLinux64 PlayMode cells (SDK-255)#742
Closed
ImmutableJeffrey wants to merge 10 commits intomainfrom
Closed
ci(audience): add StandaloneLinux64 PlayMode cells (SDK-255)#742ImmutableJeffrey wants to merge 10 commits intomainfrom
ImmutableJeffrey wants to merge 10 commits intomainfrom
Conversation
nattb8
reviewed
May 6, 2026
e604408 to
e969255
Compare
- Adds two matrix cells for StandaloneLinux64 (IL2CPP and Mono2x) on Unity 2021.3.45f2, targeting the new self-hosted Linux runner. - Resolves and installs the editor and the linux-il2cpp module via Unity Hub headless, mirroring the existing macOS and Windows shape. - Activates the Unity license once per runner using the existing UNITY_EMAIL / UNITY_PASSWORD / UNITY_SERIAL secrets, caches the license file in $HOME, and skips activation on subsequent runs to conserve seats. - Adds a fail-fast preflight that confirms gcc and g++ are present before IL2CPP cells start. - Captures Player.log from ~/.config/unity3d so timeouts and crashes produce inspectable artifacts. - Surfaces Unity compile errors as PR annotations on Linux, matching the macOS and Windows pattern. Definition of Done from SDK-255 met for Unity 2021.3.45f2: matrix cells added, build-essential preflight, the 39 PlayMode tests will run on the new runner. Unity 2022.3 / 6000.x and the wider matrix expansion live in SDK-316, which is gated on this PR proving green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…DK-255) - Replaces the file-existence check at ~/.local/share/unity3d/Unity/Unity_lic.ulf with a grep on Unity's activation log for "Successfully activated the entitlement license" or "Successfully processed license management request". - Modern Unity Licensing Client (2021.3+) stores state in a path that varies by install and Unity version, so the file check returned false even after a successful activation. The first CI attempt failed for this reason while Unity itself reported activation succeeded. - Activation now always runs. Re-running on the same machine reuses the existing seat by machine fingerprint, so the seat cost stays at one per runner. The skip-if-cached path is removed because the previous "cached" detection was unreliable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Empty commit to retrigger the PlayMode matrix on the Linux runner after a Unity license seat was freed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…I (SDK-255) - Adds LinuxStandalone64 to includePlatforms in the Audience Runtime and Audience.Unity asmdefs so the SDK compiles on Linux. The Tests asmdef already included Linux; the runtime asmdefs were the gap that prevented the sample app from finding any audience SDK types on a Linux build. - Replaces the two self-hosted Linux matrix cells in test-audience-sample-app.yml with a new playmode-linux job that uses game-ci/unity-test-runner@v4 on ubuntu-latest-8-cores. Win/macOS cells stay self-hosted as before. - Removes the Linux-only steps the self-hosted path needed (build-essential preflight, Unity Hub headless install, license activation, run, log capture, compile-error annotations). GameCI's Docker image bundles the editor, the linux-il2cpp module, and the runtime libs, and the action handles license activation against the existing UNITY_EMAIL/UNITY_PASSWORD/ UNITY_SERIAL secrets. Frees up the self-hosted Linux runner and removes the runner-host setup burden (libssl1.1, build-essential, manual Unity Hub install, etc.). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Adds a playmode-linux-selfhosted job to test-audience-sample-app.yml, gated `if: github.event_name == 'workflow_dispatch'` so the self-hosted Linux runner is not consumed on every PR. - Targets the [self-hosted, X64, Linux] runner with the same matrix shape as the GameCI Linux job (IL2CPP and Mono2x for Unity 2021.3.45f2). - Activates Unity at job start and returns the license at job end so manual reruns do not leak seats against the serial's activation pool. - Used to cross-check that the SDK behaves the same on a real self-hosted Linux machine as it does inside the GameCI Docker image. - Lives in the existing workflow file (not a new file) because GitHub's workflow_dispatch API only accepts workflow files that exist on the default branch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
e969255 to
2658686
Compare
- Adds a workflow_dispatch input selfhosted_only (boolean, default false) that, when true, skips the playmode (Win/macOS), playmode-linux (GameCI), and mobile-build jobs so only the self-hosted Linux PlayMode cells run. - Resolves the Unity seat-pool contention that has been failing the manual self-hosted Linux validation. With all 22 jobs firing simultaneously the seat pool fills before the self-hosted Linux job can activate; with the flag set only the 2 self-hosted Linux cells need a seat. - Default-false preserves the existing "workflow_dispatch fires everything" behaviour for casual manual triggers. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous gate compared inputs.selfhosted_only to the boolean true.
GitHub Actions can deliver workflow_dispatch boolean inputs as a string
('true' / 'false') depending on how the dispatch is invoked, in which
case "string != boolean" is true and the gate fails open.
github.event.inputs.X is always a string regardless of declared type, so
comparing to the string 'true' works reliably whether the input is sent
as JSON boolean, gh CLI -f (string), or gh CLI -F (raw).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… workflow_dispatch (SDK-255) GHA expressions treat null == false as true, so on workflow_dispatch (where github.event.pull_request is null) the first branch of the OR gate evaluated true regardless of the selfhosted_only input. The flag had no effect. Wrapping the fork check in a github.event_name == 'pull_request' guard makes that branch only run on PR events, leaving the workflow_dispatch branch as the sole gate when the workflow is triggered manually. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…se (SDK-255) The runner is pre-activated and the Unity license file persists on disk. Re-activating in the workflow tried to consume a fresh seat each run and hit the serial's seat-pool ceiling. Removes the Activate Unity license and Return Unity license steps from the playmode-linux-selfhosted job. Unity picks up the cached license file when launched without -username/-password/-serial. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…K-255) GameCI on ubuntu-latest-8-cores runs the Linux PlayMode tests end-to-end in ~138s. The self-hosted equivalent took ~338s, with the cache upload step alone accounting for ~170s because the runner sits on residential internet uploading multi-GB Library caches to GitHub's data centres. The self-hosted path served its purpose (confirmed the SDK runs on a real Linux machine outside the GameCI Docker image). Keeping it adds ongoing maintenance and Unity seat-pool contention for marginal value. Removes: - playmode-linux-selfhosted job - workflow_dispatch selfhosted_only input flag - The gate-scoping changes that supported the flag (restored to pre-flag form) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
StandaloneLinux64cells to the audience PlayMode matrix intest-audience-sample-app.ymland the Linux-specific steps that resolve, license, and run Unity on the new self-hosted Linux runner.Matrix additions
StandaloneLinux64 / IL2CPP / 2021.3.45f2andStandaloneLinux64 / Mono2x / 2021.3.45f2, both targetingrunner: [self-hosted, X64, Linux]. Wider-matrix expansion to Unity 2022.3 and 6000.x lives in SDK-316.Editor and module install
Resolve Unity (Linux)callsunityhub --headless installfor the Editor and, for IL2CPP cells,install-modules --module linux-il2cpp. Idempotent: tolerates "Editor already installed" / "No modules found to install" non-zero exits, validates the Editor binary and IL2CPP variation directory after, and exportsUNITY_PATHto$GITHUB_ENV.License activation
Activate Unity license (Linux)uses the existingUNITY_EMAIL/UNITY_PASSWORD/UNITY_SERIALsecrets to activate once and cache. Detects~/.local/share/unity3d/Unity/Unity_lic.ulfand skips activation if present. Win/macOS runners are activated manually outside the workflow; Linux activates inside the workflow because the runner host was provisioned fresh.Toolchain preflight
Verify IL2CPP toolchain (Linux), gated onmatrix.backend == 'IL2CPP', confirmsgccandg++are on PATH and prints a remediation message if missing (sudo apt install -y build-essential).Test execution and diagnostics
Run PlayMode tests (Linux)mirrors the macOS bash variant (tee Unity log, propagate exit viapipefail).Capture player log (Linux)copiesPlayer.logfrom~/.config/unity3d/<Company>/<Product>/into artifacts.Surface Unity compile errors (Linux)promoteserror CS####:andCompilation failed:lines to::error::annotations, matching the macOS counterpart.Out of scope (separate tickets)
Linear: SDK-255