feat(audience): per-platform build size check in CI#803
Merged
Conversation
1171057 to
43d1306
Compare
Audience SDK — Build Size
No size limits set yet. Set baselineBytes and maxBytes in |
JCSanPedro
reviewed
Jun 25, 2026
JCSanPedro
reviewed
Jun 25, 2026
43d1306 to
daee102
Compare
JCSanPedro
previously approved these changes
Jun 26, 2026
JCSanPedro
reviewed
Jun 26, 2026
95361b9 to
d122e43
Compare
Every Audience PR now gets a comment showing the build size for Android, iOS, Windows, and macOS, with a delta against a committed baseline. Android and Windows build on ubuntu via GameCI (Windows added to the existing mobile-build matrix). iOS and macOS build on the self-hosted macOS ARM64 runner: iOS via Unity batch mode then xcodebuild with CODE_SIGNING_ALLOWED=NO (no Apple certs needed), macOS via Unity batch mode directly. Size limits are absolute (not delta-based) and configured per-platform in .github/audience-build-budget.json. Limits default to 0 (disabled) until set after the first real run on main. The comment always posts regardless — the sizes are visible even before limits are configured. After merging: run workflow_dispatch on main, record the four byte counts, then set baselineBytes and maxBytes in the budget file and commit to main. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
d122e43 to
96cdca6
Compare
JCSanPedro
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
We had no way to tell customers how large the Audience SDK is, and no guardrail to catch it growing. Now every Audience PR gets a size comment:
```
Audience SDK — Build Size
Fails if any platform exceeds its absolute size limit.
```
The comment always posts. It only blocks merge once you set a
maxBytesper platform in.github/audience-build-budget.json. Limits are absolute, not delta-based, so an intentional 500 KB bump is fine as long as the total stays under the ceiling.How each platform builds
mobile-buildmatrix, no new runners)xcodebuild CODE_SIGNING_ALLOWED=NO(no Apple certs).appdirectlyBudget file
.github/audience-build-budget.json:baselineBytesfeeds the delta column,maxBytesis the hard limit. Both start at0(disabled) until set from the first real run.When the check runs
build-size-checkneeds all three build jobs to succeed. If any is skipped or failed it skips too. The three share triggers, so all run on an Audience PR and all skip on a no-change or fork PR.mobile-buildis afail-fast: falsematrix (Android/iOS/Windows), so one failed leg fails the job and skips the check.How the gate decides
ci-gatechecks two things, because a skippedbuild-size-checkcan't tell a broken build from a no-op:mobile-build,build-size-ios,build-size-macosdirectly catch broken builds.build-size-checkcatches over-budget builds (it's the only job that measures and callssetFailed).skippedpasses, so no-change PRs are clean.Test plan
workflow_dispatchonmainto get real numbers (written to the job summary)baselineBytesandmaxBytesper platform and commit tomainmaxBytesis blockedCloses SDK-540
🤖 Generated with Claude Code