From 69a42d31e5a685fce8540dea4b9753f3a6923424 Mon Sep 17 00:00:00 2001 From: ImmutableJeffrey Date: Thu, 7 May 2026 11:31:33 +1000 Subject: [PATCH] ci(audience): trim playmode PR to 8 cells, add weekly 12-cell run (SDK-327) - Trims playmode PR matrix from 12 to 8 cells. - Keeps Unity 2021.3.45f2 (LTS floor) and 6000.4.0f1 (current major) on every PR. - Drops Unity 2022.3.62f2 from PR runs. - Retains both backends (IL2CPP, Mono2x) and both targets (Windows, macOS) per Unity version. - Adds weekly schedule trigger (cron '0 14 * * 6') so the full 12-cell matrix runs on the default branch. Saturday 14:00 UTC maps to Sunday 00:00 Sydney AEST in winter, Sunday 01:00 AEDT in summer. - Keeps workflow_dispatch as the on-demand path for the full matrix. - Restructures playmode matrix from a flat 12-entry include list to cross-product axes (unity x target x backend), with include entries supplying changeset by unity and runner by target. - Sets matrix.exclude conditionally via fromJSON so only PR runs drop the 2022 cells. - One job, steps unchanged. - Collapses mobile-build matrix to the same cross-product shape (target x unity) with method added by target via include. Cell list and behaviour unchanged. - Single self-hosted Windows runner serializes 6 Windows cells per PR. - Cut is expected to drop PR runner-hold from ~120 min to ~80 min. - Unity 2022 LTS coverage on every PR remains via the mobile-build job (Android + iOS). Linear: https://linear.app/imtbl/issue/SDK-327 Co-Authored-By: Claude Opus 4.7 (1M context) --- .../workflows/test-audience-sample-app.yml | 92 +++++-------------- 1 file changed, 24 insertions(+), 68 deletions(-) diff --git a/.github/workflows/test-audience-sample-app.yml b/.github/workflows/test-audience-sample-app.yml index 4ef74e74d..3dbdf01d0 100644 --- a/.github/workflows/test-audience-sample-app.yml +++ b/.github/workflows/test-audience-sample-app.yml @@ -12,6 +12,13 @@ on: - 'examples/audience/Packages/**' - 'examples/audience/ProjectSettings/**' - '.github/workflows/test-audience-sample-app.yml' + schedule: + # Weekly full-matrix run on the default branch. + # Cron is UTC; cron has no DST awareness, so the local time shifts by one + # hour twice a year. Saturday 14:00 UTC maps to: + # Sun 00:00 Sydney AEST / Sun 02:00 NZ NZST (winter, Apr to Oct) + # Sun 01:00 Sydney AEDT / Sun 03:00 NZ NZDT (summer, Oct to Apr) + - cron: '0 14 * * 6' workflow_dispatch: concurrency: @@ -19,73 +26,34 @@ concurrency: cancel-in-progress: true jobs: + # Reduced matrix on pull_request, full matrix on schedule and + # workflow_dispatch. The self-hosted Windows runner pool is small, so + # trimming PR cells keeps PR feedback fast. `matrix.exclude` below is + # the source of truth for which cells are dropped on pull_request. playmode: - if: github.event.pull_request.head.repo.fork == false || github.event_name == 'workflow_dispatch' + if: | + (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) + || github.event_name == 'schedule' + || github.event_name == 'workflow_dispatch' name: ${{ matrix.target }} / ${{ matrix.backend }} / Unity ${{ matrix.unity }} strategy: fail-fast: false matrix: + unity: ['2021.3.45f2', '6000.4.0f1', '2022.3.62f2'] + target: [StandaloneWindows64, StandaloneOSX] + backend: [IL2CPP, Mono2x] include: - - target: StandaloneWindows64 - backend: IL2CPP - unity: 2021.3.45f2 - changeset: 88f88f591b2e - runner: [self-hosted, Windows, X64] - - target: StandaloneWindows64 - backend: Mono2x - unity: 2021.3.45f2 + - unity: '2021.3.45f2' changeset: 88f88f591b2e - runner: [self-hosted, Windows, X64] - - target: StandaloneOSX - backend: IL2CPP - unity: 2021.3.45f2 - changeset: 88f88f591b2e - runner: [self-hosted, macOS, ARM64] - - target: StandaloneOSX - backend: Mono2x - unity: 2021.3.45f2 - changeset: 88f88f591b2e - runner: [self-hosted, macOS, ARM64] - - target: StandaloneWindows64 - backend: IL2CPP - unity: 6000.4.0f1 - changeset: 8cf496087c8f - runner: [self-hosted, Windows, X64] - - target: StandaloneWindows64 - backend: Mono2x - unity: 6000.4.0f1 - changeset: 8cf496087c8f - runner: [self-hosted, Windows, X64] - - target: StandaloneOSX - backend: IL2CPP - unity: 6000.4.0f1 + - unity: '6000.4.0f1' changeset: 8cf496087c8f - runner: [self-hosted, macOS, ARM64] - - target: StandaloneOSX - backend: Mono2x - unity: 6000.4.0f1 - changeset: 8cf496087c8f - runner: [self-hosted, macOS, ARM64] - - target: StandaloneWindows64 - backend: IL2CPP - unity: 2022.3.62f2 + - unity: '2022.3.62f2' changeset: 7670c08855a9 - runner: [self-hosted, Windows, X64] - target: StandaloneWindows64 - backend: Mono2x - unity: 2022.3.62f2 - changeset: 7670c08855a9 runner: [self-hosted, Windows, X64] - target: StandaloneOSX - backend: IL2CPP - unity: 2022.3.62f2 - changeset: 7670c08855a9 - runner: [self-hosted, macOS, ARM64] - - target: StandaloneOSX - backend: Mono2x - unity: 2022.3.62f2 - changeset: 7670c08855a9 runner: [self-hosted, macOS, ARM64] + exclude: ${{ fromJSON(github.event_name == 'pull_request' && '[{"unity":"2022.3.62f2"}]' || '[]') }} runs-on: ${{ matrix.runner }} # Healthy cells finish in ~10 min. 30 min covers cold caches + # IL2CPP + Unity 6 startup; anything past that is a hang. Capping @@ -450,24 +418,12 @@ jobs: strategy: fail-fast: false matrix: + target: [Android, iOS] + unity: ['2021.3.45f2', '2022.3.62f2', '6000.4.5f1'] include: - target: Android - unity: 2021.3.45f2 - method: AndroidBuilder.Build - - target: Android - unity: 2022.3.62f2 - method: AndroidBuilder.Build - - target: Android - unity: 6000.4.5f1 method: AndroidBuilder.Build - target: iOS - unity: 2021.3.45f2 - method: IosBuilder.Build - - target: iOS - unity: 2022.3.62f2 - method: IosBuilder.Build - - target: iOS - unity: 6000.4.5f1 method: IosBuilder.Build steps: