Skip to content

ci(app): add an iOS simulator compile check to Mobile App Checks - #14358

Merged
Git-on-my-level merged 7 commits into
mainfrom
task/msd-ci-v6-ios-compile-check
Sep 18, 2026
Merged

Git-on-my-level merged 7 commits into
mainfrom
task/msd-ci-v6-ios-compile-check

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

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/Runner is caught only by the Codemagic internal build after merge. This PR adds an iOS Compile Check job on GitHub-hosted macos-26, path-gated through the existing detect-changes action.

Path gate (has_app_ios_compile)

Wakes on:

  • app/ios/** (includes generated Pigeon Swift)
  • Pigeon definitions: app/lib/pigeon_interfaces.dart, app/lib/phone_mic_interface.dart
  • app/pubspec.yaml, app/pubspec.lock
  • selector changes (detect-changes / this workflow / the predictor)

Ordinary app/lib/**/*.dart does not claim a hosted Mac. Android compile smoke still does.

Job shape

  • runs-on: macos-26
  • Xcode pin: desktop/macos/scripts/run-swift-ci.sh --select-toolchain (same as Desktop Swift CI; reads desktop/macos/ci/xcode-pin.json, currently 26.6 / 17F113). No version literal copied into this workflow.
  • Flutter 3.44.5 (repo pin). Pin floor for Flutter-installing jobs is now 6.
  • Same Prepare Flutter dev compile inputs as the Android job, plus the iOS GoogleService-Info-Local.plist stub into ios/Config/Dev, ios/Config/Prod, and ios/Runner.
  • CocoaPods cache keyed on app/ios/Podfile.lock.
  • flutter build ios --simulator --debug --flavor dev --no-codesign
  • Flavor scheme is dev (Debug-dev). dev.xcscheme already has customLLDBInitFile. omiWatchApp.xcscheme does not — Flutter prints a non-fatal warning; the compile still proceeds. The dev scheme builds Runner only, not the watch app.
  • No secrets. Fork PRs work.

Timeout / expected duration

Local cold Xcode time was 334 s on an M-series Mac. Hosted macos-26 is also Apple Silicon but still pays Flutter SDK, pub get, build_runner, and CocoaPods. Expect ~20–30 min warm / ~35 min cold. timeout-minutes: 40 is 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 Check job is the verification.

GitHub never started Mobile App Checks on the first #14358 run: on.pull_request.branches was main and this PR's base is task/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 wakes has_app_ios_compile from this workflow file itself.

Checked locally:

  • actionlint -shellcheck "" .github/workflows/mobile-app-checks.yml
  • python3 .github/scripts/test_pre_push_ci_prediction.py
  • uv run --python 3.11.15 --with pytest pytest --noconftest backend/tests/unit/test_workflow_contracts.py
  • OMI_PR_BODY_FILE=.local/pr-body-v6.md make preflight

Product 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_compile false for ordinary Dart and Android-only paths; true for app/ios/**, Pigeon defs, pubspec, selector
  • app-ios-compile is not a pre-push phase
  • iOS job: macos-26, --select-toolchain, Podfile.lock cache, plist stub, --simulator --debug --flavor dev --no-codesign, no ${{ secrets., timeout-minutes: 40, fetch-depth: 1
  • Flutter-installing job pin floor 6

Decision for the owner: this PR now also changes when Mobile App Checks runs

Every workflow in this repo, including this one, triggers on pull_request with branches: 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 the main-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 retargets main. 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: actionlint clean. 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

Git-on-my-level and others added 5 commits September 17, 2026 16:34
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.
Base automatically changed from task/msd-ci-v5-apk-artifact to main September 17, 2026 17:00
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"
@Git-on-my-level
Git-on-my-level merged commit ca8be0c into main Sep 18, 2026
56 checks passed
@Git-on-my-level
Git-on-my-level deleted the task/msd-ci-v6-ios-compile-check branch September 18, 2026 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants