Enable Sentry Size Analysis#143
Conversation
- Update sentry-cli to latest (≥3.3.5 required for size analysis) - Add step to archive app and upload XCArchive to Sentry Size Analysis Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #143 +/- ##
=============================================
+ Coverage 29.460% 37.565% +8.105%
=============================================
Files 14 14
Lines 1334 1339 +5
Branches 385 385
=============================================
+ Hits 393 503 +110
+ Misses 928 817 -111
- Partials 13 19 +6 see 4 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Passes --head-sha and --head-ref so each build is linked to its exact commit and branch in the Sentry Size Analysis timeline. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pinning to a specific version is more stable for CI — avoids unexpected breaking changes from future sentry-cli releases. 3.3.5 is the minimum version required for Size Analysis. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reduces asset from 29MB to 13MB (~55% smaller) while still large enough to trigger frozen frames and app hangs for Sentry perf demos. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
--vcs-provider and --head-repo-name are required by Sentry's API whenever head-sha/head-ref are passed, otherwise the upload fails. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
itaybre
left a comment
There was a problem hiding this comment.
Looks like the app is built twice during the release process, so it might be doing rework there.
Also, it might be a good idea to analyze the build on each PR, so we get build comparisons: https://docs.sentry.io/product/size-analysis/integrating-into-ci/
| - name: Upload to Sentry Size Analysis | ||
| run: | | ||
| xcodebuild archive \ | ||
| -project EmpowerPlant.xcodeproj \ | ||
| -scheme EmpowerPlant \ | ||
| -configuration Release \ | ||
| -destination "generic/platform=iOS" \ | ||
| -archivePath build/EmpowerPlant.xcarchive \ | ||
| CODE_SIGNING_REQUIRED=NO \ | ||
| CODE_SIGNING_ALLOWED=NO \ | ||
| -quiet | ||
| sentry-cli build upload build/EmpowerPlant.xcarchive \ | ||
| --org ${{ secrets.SENTRY_ORG }} \ | ||
| --project ${{ secrets.SENTRY_PROJECT }} \ | ||
| --build-configuration Release \ | ||
| --head-sha ${{ github.sha }} \ | ||
| --head-ref "${{ github.ref_name }}" \ | ||
| --vcs-provider github \ | ||
| --head-repo-name ${{ github.repository }} |
There was a problem hiding this comment.
m: While this works, looks like the deploy script already builds the app once, so it might be a good idea to avoid building it twice.
There was a problem hiding this comment.
Got it - gonna strip the xcodebuild archive out of release.yml then.
On push to master: uploads a base build for comparison baseline. On pull_request: uploads head build with base-sha, base-ref, and pr-number so Sentry can produce a per-PR size diff. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Moves xcodebuild archive into deploy_project.sh alongside the simulator build, so release.yml only does the sentry-cli upload. Addresses reviewer feedback about the app being built twice in CI. Note: two separate builds remain necessary — simulator for the Saucelabs/GitHub release zip, real device for Size Analysis — but both are now managed in one place. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Summary
2.21.2tolatest(v3.3.5+ required for Size Analysis)release.ymlthat:generic/platform=iOS(code signing disabled — no distribution cert in CI)sentry-cli build uploadso Sentry can track binary size across releasesThe existing simulator build and GitHub release zip steps are unchanged.
Test plan
release.ymlworkflow viaworkflow_dispatch🤖 Generated with Claude Code