-
-
Notifications
You must be signed in to change notification settings - Fork 357
chore(ci): Dynamically select available iPhone simulator for tests #5577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The OS=latest parameter in xcodebuild destination is unreliable on GitHub's macos-15 runners due to frequent simulator runtime deprecations. By omitting the OS version, xcodebuild automatically selects any available iPhone 16 simulator, making the tests more stable across runner image updates. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
Android (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 136effd+dirty | 398.57 ms | 494.91 ms | 96.34 ms |
| d916aa3 | 425.37 ms | 427.02 ms | 1.65 ms |
| 5691430+dirty | 433.98 ms | 478.49 ms | 44.51 ms |
| 4604da9+dirty | 366.44 ms | 398.10 ms | 31.66 ms |
| b80b14f+dirty | 505.06 ms | 534.32 ms | 29.26 ms |
| 8e653ac+dirty | 360.28 ms | 372.04 ms | 11.76 ms |
| a2bb688+dirty | 409.65 ms | 410.45 ms | 0.80 ms |
| 7480abe+dirty | 411.60 ms | 405.81 ms | -5.78 ms |
| 9a81842+dirty | 412.23 ms | 416.56 ms | 4.33 ms |
| ec14be7+dirty | 403.50 ms | 411.46 ms | 7.96 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 136effd+dirty | 43.75 MiB | 47.99 MiB | 4.23 MiB |
| d916aa3 | 17.75 MiB | 20.15 MiB | 2.41 MiB |
| 5691430+dirty | 43.75 MiB | 48.04 MiB | 4.29 MiB |
| 4604da9+dirty | 17.75 MiB | 19.74 MiB | 2.00 MiB |
| b80b14f+dirty | 43.75 MiB | 48.04 MiB | 4.29 MiB |
| 8e653ac+dirty | 17.75 MiB | 19.75 MiB | 2.00 MiB |
| a2bb688+dirty | 17.75 MiB | 19.70 MiB | 1.95 MiB |
| 7480abe+dirty | 17.75 MiB | 19.68 MiB | 1.94 MiB |
| 9a81842+dirty | 43.75 MiB | 48.08 MiB | 4.33 MiB |
| ec14be7+dirty | 17.75 MiB | 19.69 MiB | 1.94 MiB |
Android (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 136effd+dirty | 451.30 ms | 450.87 ms | -0.43 ms |
| d751a5d+dirty | 341.61 ms | 403.06 ms | 61.45 ms |
| 5691430+dirty | 376.70 ms | 401.58 ms | 24.88 ms |
| 1226664+dirty | 377.65 ms | 453.94 ms | 76.29 ms |
| b80b14f+dirty | 320.33 ms | 376.06 ms | 55.73 ms |
| 785ffb1+dirty | 380.65 ms | 451.83 ms | 71.18 ms |
| 8e653ac+dirty | 304.49 ms | 308.84 ms | 4.35 ms |
| 21c9e75+dirty | 356.73 ms | 381.06 ms | 24.33 ms |
| 161947d+dirty | 349.27 ms | 435.09 ms | 85.82 ms |
| d1fd647+dirty | 374.46 ms | 409.51 ms | 35.05 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 136effd+dirty | 43.94 MiB | 48.81 MiB | 4.88 MiB |
| d751a5d+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| 5691430+dirty | 43.94 MiB | 48.87 MiB | 4.93 MiB |
| 1226664+dirty | 7.15 MiB | 8.46 MiB | 1.30 MiB |
| b80b14f+dirty | 43.94 MiB | 48.87 MiB | 4.93 MiB |
| 785ffb1+dirty | 7.15 MiB | 8.42 MiB | 1.27 MiB |
| 8e653ac+dirty | 7.15 MiB | 8.46 MiB | 1.31 MiB |
| 21c9e75+dirty | 7.15 MiB | 8.42 MiB | 1.27 MiB |
| 161947d+dirty | 7.15 MiB | 8.43 MiB | 1.28 MiB |
| d1fd647+dirty | 7.15 MiB | 8.43 MiB | 1.28 MiB |
Instead of hardcoding device name and OS version, dynamically find the first available iPhone simulator using xcrun simctl. This prevents failures when specific device/OS combinations aren't available on CI runners. Also adds a debug step to list available simulators for troubleshooting. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
iOS (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| df1f7df+dirty | 1217.00 ms | 1213.27 ms | -3.73 ms |
| c771b48+dirty | 1189.46 ms | 1191.15 ms | 1.69 ms |
| 459a438+dirty | 1218.39 ms | 1226.14 ms | 7.75 ms |
| 55b77fc+dirty | 1213.08 ms | 1218.19 ms | 5.11 ms |
| 60cd796+dirty | 1206.08 ms | 1213.36 ms | 7.28 ms |
| 69602ce+dirty | 1230.59 ms | 1230.84 ms | 0.24 ms |
| fdbea8b+dirty | 1196.19 ms | 1212.09 ms | 15.90 ms |
| 294387d+dirty | 1199.23 ms | 1204.16 ms | 4.93 ms |
| 3099014+dirty | 1234.04 ms | 1243.22 ms | 9.18 ms |
| fa7bb7e+dirty | 1226.27 ms | 1241.88 ms | 15.61 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| df1f7df+dirty | 3.44 MiB | 4.59 MiB | 1.15 MiB |
| c771b48+dirty | 3.41 MiB | 4.58 MiB | 1.17 MiB |
| 459a438+dirty | 3.19 MiB | 4.55 MiB | 1.36 MiB |
| 55b77fc+dirty | 3.41 MiB | 4.58 MiB | 1.17 MiB |
| 60cd796+dirty | 3.44 MiB | 4.67 MiB | 1.23 MiB |
| 69602ce+dirty | 3.19 MiB | 4.48 MiB | 1.29 MiB |
| fdbea8b+dirty | 3.41 MiB | 4.59 MiB | 1.18 MiB |
| 294387d+dirty | 3.41 MiB | 4.59 MiB | 1.18 MiB |
| 3099014+dirty | 3.19 MiB | 4.55 MiB | 1.36 MiB |
| fa7bb7e+dirty | 3.19 MiB | 4.58 MiB | 1.39 MiB |
iOS (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| df1f7df+dirty | 1219.21 ms | 1224.28 ms | 5.07 ms |
| c771b48+dirty | 1224.02 ms | 1219.72 ms | -4.30 ms |
| 459a438+dirty | 1222.12 ms | 1214.60 ms | -7.53 ms |
| 55b77fc+dirty | 1223.71 ms | 1224.12 ms | 0.41 ms |
| 60cd796+dirty | 1204.87 ms | 1202.71 ms | -2.17 ms |
| 69602ce+dirty | 1235.65 ms | 1230.82 ms | -4.83 ms |
| fdbea8b+dirty | 1210.38 ms | 1211.96 ms | 1.57 ms |
| 294387d+dirty | 1197.73 ms | 1208.35 ms | 10.61 ms |
| 3099014+dirty | 1226.75 ms | 1236.56 ms | 9.81 ms |
| fa7bb7e+dirty | 1216.23 ms | 1225.04 ms | 8.81 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| df1f7df+dirty | 3.44 MiB | 4.59 MiB | 1.15 MiB |
| c771b48+dirty | 3.41 MiB | 4.58 MiB | 1.17 MiB |
| 459a438+dirty | 2.63 MiB | 3.98 MiB | 1.35 MiB |
| 55b77fc+dirty | 3.41 MiB | 4.58 MiB | 1.17 MiB |
| 60cd796+dirty | 3.44 MiB | 4.67 MiB | 1.23 MiB |
| 69602ce+dirty | 2.63 MiB | 3.91 MiB | 1.28 MiB |
| fdbea8b+dirty | 3.41 MiB | 4.59 MiB | 1.18 MiB |
| 294387d+dirty | 3.41 MiB | 4.59 MiB | 1.18 MiB |
| 3099014+dirty | 2.63 MiB | 3.98 MiB | 1.35 MiB |
| fa7bb7e+dirty | 2.63 MiB | 4.01 MiB | 1.38 MiB |
.github/workflows/native-tests.yml
Outdated
| DESTINATION: 'platform=iOS Simulator,OS=latest,name=iPhone 16' | ||
| run: | | ||
| # Find first available iPhone simulator | ||
| DEVICE_ID=$(xcrun simctl list devices available iPhone -j | jq -r '.devices | to_entries[].value[] | select(.isAvailable == true) | .udid' | head -1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One quick question: I noticed that this command does return "iPhone 16" with iOS 18.6 when I run it so it seems like there is no sorting applied there, at least from what I see when running this locally. Could it be that the destination will become some older simulator with some older version of iOS or is it practically impossible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rerun the test a couple of times with the latest changes and stayed 🟢
@alwx Ready for another pass 🙇
Improves device selection to explicitly choose from the latest available iOS runtime, preventing tests from running on older iOS versions. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
lucas-zimerman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works locally, LGTM!
📢 Type of change
📜 Description
Instead of hardcoding device name and OS version, dynamically find the first
available iPhone simulator using xcrun simctl. This prevents failures when
specific device/OS combinations aren't available on CI runners.
💡 Motivation and Context
Fixes #5572
💚 How did you test it?
CI, I've run the native ios test twice and was 🟢
📝 Checklist
sendDefaultPIIis enabled🔮 Next steps
#skip-changelog