Skip to content

ci(audience): route all matrix jobs through set-matrix, harden Windows checkout (SDK-330)#749

Merged
ImmutableJeffrey merged 1 commit intomainfrom
ci/audience-restore-playmode-matrix
May 7, 2026
Merged

ci(audience): route all matrix jobs through set-matrix, harden Windows checkout (SDK-330)#749
ImmutableJeffrey merged 1 commit intomainfrom
ci/audience-restore-playmode-matrix

Conversation

@ImmutableJeffrey
Copy link
Copy Markdown
Collaborator

@ImmutableJeffrey ImmutableJeffrey commented May 7, 2026

Summary

  • Restores audience PlayMode CI on main. Since SDK-327 was merged, the playmode job has been silently expanding to 0 cells (only the 6 mobile-build cells ran on every PR). Root cause: the cross-product matrix had a unity-keyed include item that, after the conditional exclude removed Unity 2022 on PR runs, spawned an orphan combination missing target/backend/runner; runs-on: ${{ matrix.runner }} then evaluated to empty and GitHub aborted the entire matrix.
  • Replaces the cross-product + axis-matching includes with a set-matrix helper job that emits fully-specified JSON matrices for playmode, playmode-linux, and mobile-build, conditioned on github.event_name. Each cell in the JSON carries every key the steps need, so no augmentation step can silently drop keys.
  • All three matrix-driven jobs declare needs: set-matrix and consume matrix.include: fromJSON(needs.set-matrix.outputs.<key>). The workflow graph now shows all three matrix jobs hanging off set-matrix in one place; the matrix definitions are also colocated in one step for easier maintenance.
  • PR runs strip Unity 2022.3.62f2 cells from playmode (8/12), playmode-linux (4/6), and mobile-build (4/6) via a single jq filter. Schedule and workflow_dispatch get the full sets.
  • Hardens the Windows pre-checkout step. The previous Kill-stale step only matched a narrow Unity-family process list and slept 2 seconds before handing off to actions/checkout@v4, which would die with EBUSY on stuck files in examples/audience. The new step adds bee_backend and mono* to the kill list, sleeps 3 seconds, then force-removes the workspace contents in a 6-attempt retry loop so checkout's own cleanup is left with nothing to do.
  • SDK-329 (mobile-build trigger if-fix) and the upstream Unity 6 alignment (mobile 6000.4.5f1 → 6000.4.0f1) have since merged into main. This PR rebased on top, so mobile-build's if keeps the explicit (pull_request && !fork) || schedule || workflow_dispatch form and mobile uses 6000.4.0f1 like the other jobs.

Coverage matrix after merge

Job PR (non-fork) Schedule / workflow_dispatch
playmode (Win + macOS) 8 cells (IL2CPP + Mono2x × {2021, Unity 6}) 12 cells (adds 2022)
playmode-linux 4 cells (IL2CPP + Mono2x × {2021, Unity 6}) 6 cells (adds 2022)
mobile-build (Android + iOS) 4 cells (IL2CPP × {2021, Unity 6}) 6 cells (adds 2022)
Total 16 cells 24 cells

Mobile is IL2CPP-only by design (Unity mobile production builds don't use Mono2x); that predates SDK-327 and is unchanged.

Linear: SDK-330

@ImmutableJeffrey ImmutableJeffrey force-pushed the ci/audience-restore-playmode-matrix branch 3 times, most recently from d6b4d0a to 321f899 Compare May 7, 2026 05:09
nattb8
nattb8 previously approved these changes May 7, 2026
@ImmutableJeffrey ImmutableJeffrey marked this pull request as ready for review May 7, 2026 07:01
@ImmutableJeffrey ImmutableJeffrey requested review from a team as code owners May 7, 2026 07:01
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 321f899. Configure here.

Comment thread .github/workflows/test-audience-sample-app.yml Outdated
@ImmutableJeffrey ImmutableJeffrey force-pushed the ci/audience-restore-playmode-matrix branch from 321f899 to 586fe4c Compare May 7, 2026 07:17
@ImmutableJeffrey ImmutableJeffrey changed the title ci(audience): restore PlayMode cells via set-matrix helper job (SDK-330) ci(audience): restore PlayMode cells, trim mobile on PR, harden Windows pre-checkout (SDK-330) May 7, 2026
@ImmutableJeffrey ImmutableJeffrey force-pushed the ci/audience-restore-playmode-matrix branch from 586fe4c to e1bdff4 Compare May 7, 2026 07:55
…s checkout (SDK-330)

- Replaces the cross-product matrix (unity x target x backend with
  axis-matching include items) on `playmode` with a `set-matrix` helper
  job that emits a fully-specified JSON matrix.
- The cross-product approach silently expanded to zero playmode cells
  on every run since SDK-327, so Windows and macOS PlayMode tests have
  not actually run on PRs (verified on the SDK-327 merge commit and on
  PR #748). Root cause: a unity-keyed include item that has no cell to
  augment after the conditional `exclude` removes Unity 2022 on PR runs
  spawns an orphan combination missing `target`, `backend`, and
  `runner`; `runs-on: ${{ matrix.runner }}` then evaluates to empty and
  GitHub aborts the matrix.
- `set-matrix` runs on ubuntu-latest, defines the full 12-cell playmode
  matrix, 6-cell playmode-linux matrix and 6-cell mobile matrix inline
  as JSON, and uses jq to strip Unity 2022.3.62f2 cells when the
  trigger is pull_request. Schedule and workflow_dispatch get the full
  sets.
- All three matrix-driven jobs now declare `needs: set-matrix` and
  consume `matrix.include: fromJSON(needs.set-matrix.outputs.<key>)`.
  Each cell carries every key the steps need, so no axis-match
  augmentation step can silently drop keys, and the workflow graph
  shows all three jobs hanging off set-matrix in one place.
- `mobile-build` PR runs drop Unity 2022.3.62f2 to match the playmode
  and playmode-linux trim. Schedule and workflow_dispatch keep all 3
  Unity versions. Steps unchanged.
- `playmode-linux` matrix moved from cross-product + conditional
  exclude to the same set-matrix-fed include pattern. Same 6 cells on
  schedule, same 4 cells on PR; behaviour unchanged.
- Hardens the Windows pre-checkout cleanup. The previous Kill-stale step
  only covered Unity-family processes and slept 2 seconds, then handed
  off to actions/checkout@v4 which would die with EBUSY on stuck files
  in examples/audience. New step adds bee_backend and mono to the kill
  list, sleeps 3 seconds, and force-removes the workspace contents in a
  retry loop so checkout's own cleanup is left with nothing to do.

Linear: https://linear.app/imtbl/issue/SDK-330

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ImmutableJeffrey ImmutableJeffrey force-pushed the ci/audience-restore-playmode-matrix branch from e1bdff4 to bd9b905 Compare May 7, 2026 08:27
@ImmutableJeffrey ImmutableJeffrey changed the title ci(audience): restore PlayMode cells, trim mobile on PR, harden Windows pre-checkout (SDK-330) ci(audience): route all matrix jobs through set-matrix, harden Windows checkout (SDK-330) May 7, 2026
@ImmutableJeffrey ImmutableJeffrey merged commit 156b0b8 into main May 7, 2026
54 of 56 checks passed
@ImmutableJeffrey ImmutableJeffrey deleted the ci/audience-restore-playmode-matrix branch May 7, 2026 09:42
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