Repository navigation
ci(app): add an iOS simulator compile check to Mobile App Checks - #14358
Merged
Merged
Conversation
The APK build stays android-arm64 on every event, matching main since c8f3506. Extra ABIs still OOM ubuntu-latest. Co-authored-by: Cursor <[email protected]>
CI wiring lives in MOBILE_VERIFY.md so app/AGENTS.md stays inside its lean budget. Co-authored-by: Cursor <[email protected]>
Warn mode does not downgrade a cache-state serialization failure of builtInKotlinServices. Generate the gitignored wrapper with --config-only so the parallel JVM job can run without an APK compile. Failure-Class: none Co-authored-by: Cursor <[email protected]>
Path-gated Swift/Pigeon/pubspec changes now compile unsigned Debug-dev for the simulator on macos-26 with the Desktop Xcode pin, before Codemagic. Co-authored-by: Cursor <[email protected]>
…om the workflow file Co-authored-by: Cursor <[email protected]> #14358 never started the workflow because pull_request was main-only while the PR base is the V5 branch. A skipped-or-missing iOS job is not verification.
…mpile-check Co-authored-by: Cursor <[email protected]>
flutter build ios --simulator without -d fails after pod install when omiWatchApp is present (run 35256673731). Timeout stays 40. Co-authored-by: Cursor <[email protected]>
Comment on lines
+485
to
+592
| name: iOS Compile Check | ||
| runs-on: macos-26 | ||
| needs: changes | ||
| if: needs.changes.outputs.has_app_ios_compile == 'true' | ||
| # Local cold Xcode time was 334s on an M-series Mac. Hosted macos-26 still | ||
| # pays Flutter SDK, pub get, build_runner, and CocoaPods on top of that. | ||
| # Expect ~20-30 min warm / ~35 min cold; 40 is the wedge-guard. | ||
| timeout-minutes: 40 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Select and assert pinned Xcode | ||
| run: desktop/macos/scripts/run-swift-ci.sh --select-toolchain | ||
|
|
||
| - name: Setup Flutter | ||
| uses: subosito/flutter-action@v2 | ||
| with: | ||
| channel: stable | ||
| flutter-version: 3.44.5 | ||
| cache: true | ||
|
|
||
| - name: Cache build_runner state | ||
| uses: actions/cache@v6 | ||
| with: | ||
| path: app/.dart_tool/build | ||
| key: ${{ runner.os }}-flutter-buildrunner-${{ hashFiles('app/pubspec.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-flutter-buildrunner-${{ hashFiles('app/pubspec.lock') }}- | ||
| ${{ runner.os }}-flutter-buildrunner- | ||
|
|
||
| - name: Cache CocoaPods | ||
| uses: actions/cache@v6 | ||
| with: | ||
| path: | | ||
| app/ios/Pods | ||
| ~/Library/Caches/CocoaPods | ||
| key: ${{ runner.os }}-cocoapods-${{ hashFiles('app/ios/Podfile.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-cocoapods- | ||
|
|
||
| - name: Resolve Flutter dependencies | ||
| working-directory: app | ||
| run: flutter pub get | ||
|
|
||
| - name: Prepare Flutter dev compile inputs | ||
| working-directory: app | ||
| run: | | ||
| mkdir -p android/app/src/dev/ android/app/src/prod/ ios/Config/Dev ios/Config/Prod | ||
| cp lib/firebase_options_local.dart lib/firebase_options_dev.dart | ||
| cp lib/firebase_options_local.dart lib/firebase_options_prod.dart | ||
| cp setup/prebuilt/google-services-local.json android/app/src/dev/google-services.json | ||
| cp setup/prebuilt/google-services-local.json android/app/src/prod/google-services.json | ||
| cp setup/prebuilt/key.properties android/key.properties | ||
| cp setup/prebuilt/GoogleService-Info-Local.plist ios/Config/Dev/GoogleService-Info.plist | ||
| cp setup/prebuilt/GoogleService-Info-Local.plist ios/Config/Prod/GoogleService-Info.plist | ||
| cp setup/prebuilt/GoogleService-Info-Local.plist ios/Runner/GoogleService-Info.plist | ||
| { | ||
| echo "API_BASE_URL=" | ||
| echo "USE_WEB_AUTH=true" | ||
| echo "USE_AUTH_CUSTOM_TOKEN=true" | ||
| echo "STAGING_API_URL=" | ||
| } > .dev.env | ||
| : > .env | ||
|
|
||
| - name: Generate Flutter code for iOS compile | ||
| working-directory: app | ||
| run: dart run build_runner build --delete-conflicting-outputs | ||
|
|
||
| # omiWatchApp is a watchOS companion. `flutter build ios --simulator` | ||
| # without `-d` fails after pod install: "A device ID is required to | ||
| # build an app with a watchOS companion app." (run 35256673731). | ||
| - name: Pick an iPhone simulator | ||
| run: | | ||
| python3 - <<'PY' | ||
| import json | ||
| import os | ||
| import subprocess | ||
| import sys | ||
|
|
||
| raw = subprocess.check_output( | ||
| ["xcrun", "simctl", "list", "devices", "available", "-j"], | ||
| text=True, | ||
| ) | ||
| data = json.loads(raw) | ||
| picked = None | ||
| for runtime, devices in data.get("devices", {}).items(): | ||
| if "iOS" not in runtime: | ||
| continue | ||
| for device in devices: | ||
| if device.get("isAvailable") and "iPhone" in device.get("name", ""): | ||
| picked = device | ||
| if picked is None: | ||
| print(raw, file=sys.stderr) | ||
| raise SystemExit("no available iPhone simulator") | ||
| udid = picked["udid"] | ||
| print(f"Using simulator {picked['name']} ({udid})") | ||
| with open(os.environ["GITHUB_ENV"], "a", encoding="utf-8") as handle: | ||
| handle.write(f"IOS_SIMULATOR_UDID={udid}\n") | ||
| PY | ||
|
|
||
| - name: Build Flutter iOS simulator debug | ||
| working-directory: app | ||
| # Flavor scheme is `dev` (Debug-dev). omiWatchApp.xcscheme lacks | ||
| # customLLDBInitFile; Flutter warns, the compile still proceeds. | ||
| run: flutter build ios --simulator --debug --flavor dev --no-codesign -d "$IOS_SIMULATOR_UDID" |
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.
What changed and why
Stacked on
task/msd-ci-v5-apk-artifact(#14330, green, not merged). Same workflow file:.github/workflows/mobile-app-checks.yml. No new workflow file.Today Swift breakage in
ios/Runneris caught only by the Codemagic internal build after merge. This PR adds an iOS Compile Check job on GitHub-hostedmacos-26, path-gated through the existing detect-changes action.Path gate (
has_app_ios_compile)Wakes on:
app/ios/**(includes generated Pigeon Swift)app/lib/pigeon_interfaces.dart,app/lib/phone_mic_interface.dartapp/pubspec.yaml,app/pubspec.lockOrdinary
app/lib/**/*.dartdoes not claim a hosted Mac. Android compile smoke still does.Job shape
runs-on: macos-26desktop/macos/scripts/run-swift-ci.sh --select-toolchain(same as Desktop Swift CI; readsdesktop/macos/ci/xcode-pin.json, currently 26.6 / 17F113). No version literal copied into this workflow.GoogleService-Info-Local.pliststub intoios/Config/Dev,ios/Config/Prod, andios/Runner.app/ios/Podfile.lock.flutter build ios --simulator --debug --flavor dev --no-codesigndev(Debug-dev).dev.xcschemealready hascustomLLDBInitFile.omiWatchApp.xcschemedoes not — Flutter prints a non-fatal warning; the compile still proceeds. Thedevscheme builds Runner only, not the watch app.Timeout / expected duration
Local cold Xcode time was 334 s on an M-series Mac. Hosted
macos-26is also Apple Silicon but still pays Flutter SDK,pub get,build_runner, and CocoaPods. Expect ~20–30 min warm / ~35 min cold.timeout-minutes: 40is the wedge-guard, not a performance target.Verification: this PR's own CI run
I cannot run a hosted macOS runner from here. The PR's own
Mobile App Checks/iOS Compile Checkjob is the verification.GitHub never started Mobile App Checks on the first #14358 run:
on.pull_request.brancheswasmainand this PR's base istask/msd-ci-v5-apk-artifact. The iOS job was not path-gate skipped — the workflow never existed. Follow-up drops the main-only PR filter and wakeshas_app_ios_compilefrom this workflow file itself.Checked locally:
actionlint -shellcheck "" .github/workflows/mobile-app-checks.ymlpython3 .github/scripts/test_pre_push_ci_prediction.pyuv run --python 3.11.15 --with pytest pytest --noconftest backend/tests/unit/test_workflow_contracts.pyOMI_PR_BODY_FILE=.local/pr-body-v6.md make preflightProduct invariants affected
none
Failure class (fixes)
Stacked V5 includes
fix(ci): drop Gradle configuration cache that broke AGP 8.11.1. This PR's own commit is not a fix.Failure-Class: none
Tests
has_app_ios_compilefalse for ordinary Dart and Android-only paths; true forapp/ios/**, Pigeon defs, pubspec, selectorapp-ios-compileis not a pre-push phasemacos-26,--select-toolchain, Podfile.lock cache, plist stub,--simulator --debug --flavor dev --no-codesign, no${{ secrets.,timeout-minutes: 40,fetch-depth: 1Decision for the owner: this PR now also changes when Mobile App Checks runs
Every workflow in this repo, including this one, triggers on
pull_requestwithbranches: main. A PR whose base is another branch therefore starts no workflow at all: this PR's first CI run never created the iOS job (not skipped — it did not exist), which reads as green and proves nothing. The second commit drops themain-only filter on this workflow so stacked PRs run it, and adds the workflow file to the iOS job's path gate so a change to the job exercises the job. That is a policy change for one workflow and is yours to accept or reject; without it, this PR cannot be verified until #14330 merges and it retargetsmain. The same limitation applies to every other stacked PR in this program: their checks have not run in CI, only locally.Part of the mobile self-driving program (CI and release lane, package V6). Stacked on #14330. Implemented by Cursor
cursor-grok-4.6-high. Coordinator verification:actionlintclean. A hosted macOS runner cannot be exercised locally, so this PR's own CI run is the verification; the first run will show whether the simulator build completes inside the 40-minute timeout.🤖 Generated with Claude Code