chore: add Sentry Size Analysis uploads to nightly builds#28913
Conversation
Upload iOS xcarchive and Android AAB from nightly RC builds to Sentry Size Analysis for daily binary size tracking. The jobs run in parallel with existing cleanup jobs so they never block the critical path. Made-with: Cursor
The build pipeline zips the xcarchive via ditto before uploading as a GitHub Actions artifact. The glob *.xcarchive won't match the zipped *.xcarchive.zip file. Unzip it first so sentry-cli receives the directory format it expects. Made-with: Cursor
Without ref: github.sha, checkout resolves refs/heads/main at execution time. If commits land on main during the 1-2 hour build window, HEAD~1 would be the parent of a different commit than head-sha, giving Sentry an inconsistent head/base pair. Made-with: Cursor
Filenames starting with dashes could be interpreted as options. Using ./*.xcarchive.zip prevents this. Made-with: Cursor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9dc7207. Configure here.
sentry-cli build upload only supports xcarchive on ARM64 binaries. The x86_64 Linux binary rejects xcarchive files. macOS runners provide the ARM64 binary needed for xcarchive parsing. Made-with: Cursor
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Since no app code or test infrastructure is changed, there is no need to run any E2E test tags. The nightly build workflow itself is not a test pipeline — it's a build/release pipeline, and the addition of Sentry size analysis jobs does not require E2E validation. Performance Test Selection: |
|




Description
We have no visibility into how the native binary size (iOS xcarchive, Android AAB) changes over time. The existing JS bundle size check in CI only covers the JavaScript bundle, missing native libraries, assets, resources, and dex files that contribute to the install size users experience.
This PR integrates Sentry Size Analysis into the nightly build pipeline. After each nightly RC build completes, two new jobs download the build artifacts and upload them to Sentry for binary size tracking. Sentry then provides:
The upload jobs run in parallel with the existing cleanup jobs, so they never block the critical path (TestFlight upload, branch cleanup).
Key design decisions
build-configurationper platform (Release-iOS,Release-Android) — keeps Sentry comparisons scoped within the same platformbase-shaincluded — resolves the parent commit onmainso Sentry can generate accurate build-over-build diffsbuild.ymlPrerequisites
MM_SENTRY_AUTH_TOKENsecret must have theorg:ciscope (likely already the case since it's used for source map uploads)metamask-mobileSentry projectChangelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
Not applicable
Pre-merge reviewer checklist
Note
Medium Risk
Moderate risk because it changes the nightly GitHub Actions pipeline and introduces new external
sentry-cliuploads using a secret token, which could cause flaky/failed nightly runs if misconfigured.Overview
Nightly build CI now uploads RC iOS and Android artifacts to Sentry Size Analysis to track native binary size over time.
After
ios-rc/android-rccomplete, newsize-analysis-iosandsize-analysis-androidjobs download thexcarchive/aabartifacts, compute abase-shafrom the previous commit, and runsentry-cli build uploadwithMM_SENTRY_AUTH_TOKENand platform-specific--build-configurationmetadata.Reviewed by Cursor Bugbot for commit 02452e1. Bugbot is set up for automated code reviews on this repo. Configure here.