-
Notifications
You must be signed in to change notification settings - Fork 433
Optimize iOS build pipeline: Increase RAM and conditional Cocoapods #4309
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
Optimize iOS build pipeline: Increase RAM and conditional Cocoapods #4309
Conversation
…t Cocoapods installation. - Increased ByteCodeTranslator heap size to 2048MB in IPhoneBuilder. - Made `pod install` conditional in IPhoneBuilder to avoid unnecessary execution for projects without pods. - Added support for `ios.pods.skipInstall` build hint to allow external scripts to handle pod installation. - Updated `scripts/build-ios-app.sh` and `scripts/run-ios-ui-tests.sh` to support building directly from `.xcodeproj` when no `.xcworkspace` is present.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
|
Compared 30 screenshots: 30 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
|
- Increased ByteCodeTranslator heap size to 2048MB in IPhoneBuilder. - Made `pod install` conditional in IPhoneBuilder to avoid redundant execution. - Added `ios.pods.skipInstall` support. - Refactored `scripts/build-ios-app.sh` and `scripts/run-ios-ui-tests.sh` to remove `eval` and correctly handle arguments with spaces (like "iPhone 16"). - Updated scripts to support building from `.xcodeproj` when `.xcworkspace` is absent.
- Increased ByteCodeTranslator heap size to 2048MB in IPhoneBuilder to address potential memory bottlenecks. - Made `pod install` conditional in IPhoneBuilder; it now skips if not required or if `ios.pods.skipInstall` is set, reducing build overhead. - Refactored `scripts/build-ios-app.sh` and `scripts/run-ios-ui-tests.sh` to remove `eval` and correctly handle arguments with spaces (like simulator names), preventing syntax errors. - Updated iOS build scripts to fallback to `.xcodeproj` if `.xcworkspace` is missing (due to skipped pods). - Updated `.github/workflows/scripts-ios.yml` to use `iPhone 15` as the simulator destination to fix CI failures on runners where `iPhone 16` is unavailable.
- Increased ByteCodeTranslator heap size to 2048MB in IPhoneBuilder to address potential memory bottlenecks. - Made `pod install` conditional in IPhoneBuilder; it now skips if not required or if `ios.pods.skipInstall` is set, reducing build overhead. - Refactored `scripts/build-ios-app.sh` and `scripts/run-ios-ui-tests.sh` to remove `eval` and correctly handle arguments with spaces (like simulator names), preventing syntax errors. - Updated iOS build scripts to fallback to `.xcodeproj` if `.xcworkspace` is missing (due to skipped pods). - Updated `.github/workflows/scripts-ios.yml` to remove the hardcoded `IOS_SIM_DESTINATION` variable, allowing `scripts/run-ios-ui-tests.sh` to dynamically select a valid, available simulator, resolving CI failures where specific devices (like iPhone 16) were missing.
Restored `IOS_SIM_DESTINATION` environment variable in `.github/workflows/scripts-ios.yml` to force usage of "iPhone 15" instead of relying on auto-detection which led to CI failures with "iPhone 16 Pro".
This change optimizes the iOS build pipeline performance, specifically targeting the "VM Translation Time" which was significantly longer than the actual translation process due to bundled
pod installexecution.IPhoneBuilder Optimization:
ByteCodeTranslatorprocess from 384MB to 2048MB to prevent GC thrashing on large projects.runPodslogic to be conditional. It now only defaults totrueifios.podsis non-empty, Google Ads are used, orios.useCocoapods/ios.pods.alwaysRunare explicitly set to true. This prevents creating aPodfileand runningpod installfor projects that don't need it (likeHelloCodenameOne).ios.pods.skipInstall=true. If set,IPhoneBuilderwill generate thePodfile(if needed) but skip the actualpod initandpod installcommands. This allows downstream scripts (like the CI pipeline) to handle dependency installation, ensuring better separation of concerns and more accurate timing metrics.Pipeline Script Compatibility:
scripts/build-ios-app.shto check for.xcworkspacefirst, and fallback to.xcodeprojif not found. This ensures the build continues successfully even ifIPhoneBuilderskipped Pod generation (because no pods were needed).scripts/run-ios-ui-tests.shto dynamically select-workspaceor-projectflags forxcodebuildbased on the artifact found. This ensures the UI tests can run against pure project builds.These changes are expected to significantly reduce the reported time for the VM translation step in the CI pipeline for basic apps and improve stability for large apps.
PR created automatically by Jules for task 13147782294296998022 started by @shai-almog