From 056dff8b76a48852e03249e315f1940b900f0af4 Mon Sep 17 00:00:00 2001 From: Natalie Bunduwongse Date: Fri, 26 Jun 2026 19:33:56 +1200 Subject: [PATCH 1/2] feat(audience): drop Mono from CI matrix and fix Android build size IL2CPP covers the cases that matter (mobile is IL2CPP-only); Mono was doubling the desktop test count for negligible extra coverage. Adds exportAsGoogleAndroidProject = false to AndroidBuilder so the build always produces a direct APK rather than a Gradle project directory, which was causing the build-size check to report 0.00 MB for Android. Co-Authored-By: Claude Sonnet 4.6 --- .github/scripts/audience/matrix-shared.json | 2 +- .github/workflows/test-audience-sample-app.yml | 2 +- examples/audience/Assets/Editor/AndroidBuilder.cs | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/scripts/audience/matrix-shared.json b/.github/scripts/audience/matrix-shared.json index f96114f38..5110371c0 100644 --- a/.github/scripts/audience/matrix-shared.json +++ b/.github/scripts/audience/matrix-shared.json @@ -4,7 +4,7 @@ { "version": "6000.4.0f1", "changeset": "8cf496087c8f" }, { "version": "2022.3.62f2", "changeset": "7670c08855a9" } ], - "scripting_backends": ["IL2CPP", "Mono2x"], + "scripting_backends": ["IL2CPP"], "desktop_targets": [ { "target": "StandaloneWindows64", "runner": ["self-hosted", "Windows", "X64"], "install_unity_script": ".github/scripts/audience/install-unity-windows.ps1", "run_playmode_script": ".github/scripts/audience/playmode-windows.ps1" }, { "target": "StandaloneOSX", "runner": ["self-hosted", "macOS", "ARM64"], "install_unity_script": ".github/scripts/audience/install-unity-macos.sh", "run_playmode_script": ".github/scripts/audience/playmode-macos.sh" }, diff --git a/.github/workflows/test-audience-sample-app.yml b/.github/workflows/test-audience-sample-app.yml index ee985b214..196d78ccc 100644 --- a/.github/workflows/test-audience-sample-app.yml +++ b/.github/workflows/test-audience-sample-app.yml @@ -1,4 +1,4 @@ -name: Audience SDK PlayMode (IL2CPP + Mono) +name: Audience SDK PlayMode (IL2CPP) on: pull_request: diff --git a/examples/audience/Assets/Editor/AndroidBuilder.cs b/examples/audience/Assets/Editor/AndroidBuilder.cs index a0eb77ce0..0a3e15fe3 100644 --- a/examples/audience/Assets/Editor/AndroidBuilder.cs +++ b/examples/audience/Assets/Editor/AndroidBuilder.cs @@ -21,6 +21,12 @@ public static void Build() { string buildPath = GetArgValue("--buildPath") ?? DefaultBuildPath; + // Force a direct APK output. exportAsGoogleAndroidProject outputs a Gradle project + // directory and buildAppBundle outputs a .aab — either causes the *.apk glob in CI + // to find nothing and report 0 bytes. + EditorUserBuildSettings.exportAsGoogleAndroidProject = false; + EditorUserBuildSettings.buildAppBundle = false; + var options = new BuildPlayerOptions { scenes = new[] { "Assets/SampleApp/Scenes/SampleApp.unity" }, From d026fb0c5a91cdc50ae30e7fec8717a077a1b0e0 Mon Sep 17 00:00:00 2001 From: Natalie Bunduwongse Date: Sun, 28 Jun 2026 17:03:38 +1200 Subject: [PATCH 2/2] fix(audience): use dirSize for Android build size measurement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit apkSize() only scanned the top level of the downloaded artifact directory. The combined upload path (Android + Windows globs) causes upload-artifact to set the common ancestor to Builds/, so the APK lands at artifacts/Android/Android/audience.apk — one level deeper than apkSize expected. dirSize() already walks recursively so it finds the APK regardless of nesting, and the Android artifact only ever contains the APK so the result is the same. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/test-audience-sample-app.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/test-audience-sample-app.yml b/.github/workflows/test-audience-sample-app.yml index 196d78ccc..a27bbff8e 100644 --- a/.github/workflows/test-audience-sample-app.yml +++ b/.github/workflows/test-audience-sample-app.yml @@ -454,13 +454,8 @@ jobs: return total; } - function apkSize(dir) { - const apk = fs.readdirSync(dir).find(f => f.endsWith('.apk')); - return apk ? fs.statSync(path.join(dir, apk)).size : 0; - } - const measured = { - Android: apkSize('artifacts/Android'), + Android: dirSize('artifacts/Android'), Windows: dirSize('artifacts/Windows'), iOS: dirSize('artifacts/iOS'), macOS: dirSize('artifacts/macOS'),