Skip to content

ci(audience): add StandaloneLinux64 PlayMode cells (SDK-255)#742

Draft
ImmutableJeffrey wants to merge 5 commits intomainfrom
jeffreywong/sdk-255-il2cpp-compatibility-testing-on-linux-standalonelinux64
Draft

ci(audience): add StandaloneLinux64 PlayMode cells (SDK-255)#742
ImmutableJeffrey wants to merge 5 commits intomainfrom
jeffreywong/sdk-255-il2cpp-compatibility-testing-on-linux-standalonelinux64

Conversation

@ImmutableJeffrey
Copy link
Copy Markdown
Collaborator

Summary

Adds StandaloneLinux64 cells to the audience PlayMode matrix in test-audience-sample-app.yml and the Linux-specific steps that resolve, license, and run Unity on the new self-hosted Linux runner.

Matrix additions

  • StandaloneLinux64 / IL2CPP / 2021.3.45f2 and StandaloneLinux64 / Mono2x / 2021.3.45f2, both targeting runner: [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) calls unityhub --headless install for 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 exports UNITY_PATH to $GITHUB_ENV.

License activation

  • Activate Unity license (Linux) uses the existing UNITY_EMAIL / UNITY_PASSWORD / UNITY_SERIAL secrets to activate once and cache. Detects ~/.local/share/unity3d/Unity/Unity_lic.ulf and 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 on matrix.backend == 'IL2CPP', confirms gcc and g++ 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 via pipefail).
  • Capture player log (Linux) copies Player.log from ~/.config/unity3d/<Company>/<Product>/ into artifacts.
  • Surface Unity compile errors (Linux) promotes error CS####: and Compilation failed: lines to ::error:: annotations, matching the macOS counterpart.

Out of scope (separate tickets)

  • Audience runtime Linux portability (paths, permissions, locale, case-sensitivity): SDK-317.
  • Sample app Linux build verification: SDK-318.
  • Wider matrix expansion (Unity 2022.3 and 6000.x): SDK-316.

Linear: SDK-255

ImmutableJeffrey and others added 3 commits May 6, 2026 17:05
- 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>
Comment thread .github/workflows/test-audience-sample-app.yml Outdated
ImmutableJeffrey and others added 2 commits May 7, 2026 01:18
…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>
@ImmutableJeffrey ImmutableJeffrey force-pushed the jeffreywong/sdk-255-il2cpp-compatibility-testing-on-linux-standalonelinux64 branch from e604408 to e969255 Compare May 6, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants