Skip to content

Commit e56ebf6

Browse files
ci(audience): restore PlayMode cells via set-matrix helper job (SDK-330)
- Replaces the cross-product matrix (unity x target x backend with axis-matching include items) 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). - `set-matrix` runs on ubuntu-latest, defines the full 12-cell 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 all 12. - `playmode` declares `needs: set-matrix` and consumes the JSON via `matrix.include: fromJSON(needs.set-matrix.outputs.playmode)`. - Each cell in the JSON carries every key the steps need (target, backend, unity, changeset, runner), so there is no axis-match augmentation step that can silently drop keys. - mobile-build job and steps unchanged in this PR; mobile-build trigger fix lives in SDK-329 and rebases on top. Linear: https://linear.app/imtbl/issue/SDK-330 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d8e56f0 commit e56ebf6

1 file changed

Lines changed: 35 additions & 19 deletions

File tree

.github/workflows/test-audience-sample-app.yml

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,41 @@ concurrency:
2626
cancel-in-progress: true
2727

2828
jobs:
29-
# Reduced matrix on pull_request, full matrix on schedule and
30-
# workflow_dispatch. The self-hosted Windows runner pool is small, so
31-
# trimming PR cells keeps PR feedback fast. `matrix.exclude` below is
32-
# the source of truth for which cells are dropped on pull_request.
29+
# The PlayMode matrix is built by `set-matrix` below and consumed by
30+
# `playmode` via fromJSON. PR runs trim Unity 2022.3.62f2 cells (so 8
31+
# of 12 run) to keep the self-hosted Windows runner pool serving PR
32+
# feedback fast; schedule and workflow_dispatch run the full 12.
33+
set-matrix:
34+
runs-on: ubuntu-latest
35+
outputs:
36+
playmode: ${{ steps.set.outputs.playmode }}
37+
steps:
38+
- id: set
39+
shell: bash
40+
run: |
41+
full='[
42+
{"target":"StandaloneWindows64","backend":"IL2CPP","unity":"2021.3.45f2","changeset":"88f88f591b2e","runner":["self-hosted","Windows","X64"]},
43+
{"target":"StandaloneWindows64","backend":"Mono2x","unity":"2021.3.45f2","changeset":"88f88f591b2e","runner":["self-hosted","Windows","X64"]},
44+
{"target":"StandaloneOSX","backend":"IL2CPP","unity":"2021.3.45f2","changeset":"88f88f591b2e","runner":["self-hosted","macOS","ARM64"]},
45+
{"target":"StandaloneOSX","backend":"Mono2x","unity":"2021.3.45f2","changeset":"88f88f591b2e","runner":["self-hosted","macOS","ARM64"]},
46+
{"target":"StandaloneWindows64","backend":"IL2CPP","unity":"6000.4.0f1","changeset":"8cf496087c8f","runner":["self-hosted","Windows","X64"]},
47+
{"target":"StandaloneWindows64","backend":"Mono2x","unity":"6000.4.0f1","changeset":"8cf496087c8f","runner":["self-hosted","Windows","X64"]},
48+
{"target":"StandaloneOSX","backend":"IL2CPP","unity":"6000.4.0f1","changeset":"8cf496087c8f","runner":["self-hosted","macOS","ARM64"]},
49+
{"target":"StandaloneOSX","backend":"Mono2x","unity":"6000.4.0f1","changeset":"8cf496087c8f","runner":["self-hosted","macOS","ARM64"]},
50+
{"target":"StandaloneWindows64","backend":"IL2CPP","unity":"2022.3.62f2","changeset":"7670c08855a9","runner":["self-hosted","Windows","X64"]},
51+
{"target":"StandaloneWindows64","backend":"Mono2x","unity":"2022.3.62f2","changeset":"7670c08855a9","runner":["self-hosted","Windows","X64"]},
52+
{"target":"StandaloneOSX","backend":"IL2CPP","unity":"2022.3.62f2","changeset":"7670c08855a9","runner":["self-hosted","macOS","ARM64"]},
53+
{"target":"StandaloneOSX","backend":"Mono2x","unity":"2022.3.62f2","changeset":"7670c08855a9","runner":["self-hosted","macOS","ARM64"]}
54+
]'
55+
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
56+
matrix=$(jq -c '[.[] | select(.unity != "2022.3.62f2")]' <<<"$full")
57+
else
58+
matrix=$(jq -c '.' <<<"$full")
59+
fi
60+
echo "playmode=$matrix" >> "$GITHUB_OUTPUT"
61+
3362
playmode:
63+
needs: set-matrix
3464
if: |
3565
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false)
3666
|| github.event_name == 'schedule'
@@ -39,21 +69,7 @@ jobs:
3969
strategy:
4070
fail-fast: false
4171
matrix:
42-
unity: ['2021.3.45f2', '6000.4.0f1', '2022.3.62f2']
43-
target: [StandaloneWindows64, StandaloneOSX]
44-
backend: [IL2CPP, Mono2x]
45-
include:
46-
- unity: '2021.3.45f2'
47-
changeset: 88f88f591b2e
48-
- unity: '6000.4.0f1'
49-
changeset: 8cf496087c8f
50-
- unity: '2022.3.62f2'
51-
changeset: 7670c08855a9
52-
- target: StandaloneWindows64
53-
runner: [self-hosted, Windows, X64]
54-
- target: StandaloneOSX
55-
runner: [self-hosted, macOS, ARM64]
56-
exclude: ${{ fromJSON(github.event_name == 'pull_request' && '[{"unity":"2022.3.62f2"}]' || '[]') }}
72+
include: ${{ fromJSON(needs.set-matrix.outputs.playmode) }}
5773
runs-on: ${{ matrix.runner }}
5874
# Healthy cells finish in ~10 min. 30 min covers cold caches +
5975
# IL2CPP + Unity 6 startup; anything past that is a hang. Capping

0 commit comments

Comments
 (0)