Skip to content

fix(ci): add setup_simulator action and standardize Xcode 26 matrix - #1882

Merged
ncooke3 merged 2 commits into
mainfrom
nc.ci.xcode-matrix
Oct 28, 2026
Merged

ncooke3 merged 2 commits into
mainfrom
nc.ci.xcode-matrix

Conversation

@ncooke3

@ncooke3 ncooke3 commented Oct 28, 2026

Copy link
Copy Markdown
Member

GitHub Actions macOS runners vary in pre-installed simulator device types across Xcode releases (e.g., iPhone 15 Pro vs. iPhone 16/17 Pro), causing hardcoded device names in scripts/test.sh and workflow files to fail when upgrading Xcode.

This PR adopts the setup_simulator composite action pattern from firebase-ios-sdk to dynamically provision standardized simulator names (Firebase-iPhone-15-Pro, Firebase-Apple-TV-4K-Gen-2, Firebase-Apple-Watch-Ultra-2) matched to the active Xcode SDK runtime, and standardizes all product workflows on Xcode 26.2 (macos-15) and Xcode 26.4 (macos-26).

@ncooke3
ncooke3 added this pull request to stack #1884 October 28, 2026 15:52

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a standardized simulator setup mechanism by adding a .github/actions/setup_simulator/action.yml composite action and a corresponding scripts/setup_simulator.sh script. It also updates scripts/test.sh to automatically invoke the setup script when the required simulator is missing. The review feedback suggests several improvements to make the scripts more robust: explicitly invoking the setup script with bash to handle potential permission issues, using grep -Fq for literal string matching, handling potential leading whitespace in simctl output, cleaning up existing but unavailable duplicate simulators, and restricting automatic setup in test.sh to only Firebase- prefixed devices.

Comment thread scripts/setup_simulator.sh Resolved
Comment thread scripts/setup_simulator.sh Resolved
Comment thread scripts/setup_simulator.sh Resolved
Comment thread scripts/test.sh Resolved

@ncooke3 ncooke3 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll look into addressing above feedback in follow-ups.

Also:

  • Script execution permissions: In .github/actions/setup_simulator/action.yml and scripts/test.sh, explicitly prepend bash when invoking ./scripts/setup_simulator.sh to prevent Permission denied failures if the script was committed without executable (+x) permissions.
  • Simulator cleanup & duplicate naming: In scripts/setup_simulator.sh, xcrun simctl list devices available misses existing simulators that are in an unavailable state. Creating a new one can result in duplicate devices with identical names, causing destination resolution ambiguity in Xcode. Clean up unavailable devices matching ${sim_name} prior to creation.
  • Literal matching in grep checks: Use grep -Fq instead of grep -q when checking for device and simulator strings in setup_simulator.sh and test.sh to avoid regex parsing quirks on device names.
  • Leading whitespace in runtime parsing: In setup_simulator.sh, update the regex matching xcrun simctl list runtimes available from ^${platform_prefix} to ^[[:space:]]*${platform_prefix} to guard against format changes or indented output across different Xcode toolchains.
  • Tracking issue for temporary override: Add a reminder/issue in quickstart-ios to remove continue-on-error: ${{ matrix.xcode == '26.2' }} in firestore.yml once firebase-ios-sdk 13.2.0 lands with upstream fix #16944.
  • Guarding custom simulator creation: In scripts/test.sh, restrict the automatic setup_simulator.sh fallback so it only triggers if DEVICE starts with Firebase-. If a caller provides a custom device name that is missing, running the default setup script will not create it and will fail anyway.
  • Increased CI runner minutes: Monitor CI runner consumption now that fail-fast: false is enabled across all 14 matrix workflows, as builds will run all permutations to completion even on early failures.
  • Verification of firebaseai.yml toolchain requirements: Confirm that dropping Xcode 26.6 / iOS 26.5 in favor of standardizing on Xcode 26.2 and Xcode 26.4 does not remove required coverage for any Swift 6 / modern AI SDK APIs.

@ncooke3

ncooke3 commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

@paulb777 , the firestore Xcode 26.2 failure is expected. It will be fixed by Andrew's 26.2 trait workaround in upcoming firebase-ios-sdk@13.2.0

@ncooke3
ncooke3 force-pushed the nc.ci.xcode-matrix branch from cedc027 to 2a6c0d1 Compare October 28, 2026 17:05
@ncooke3
ncooke3 enabled stacked auto-merge (squash) October 28, 2026 17:07
@ncooke3
ncooke3 disabled stacked auto-merge October 28, 2026 17:07
@ncooke3
ncooke3 merged commit d5bc97b into main Oct 28, 2026
79 of 80 checks passed
@ncooke3
ncooke3 deleted the nc.ci.xcode-matrix branch October 28, 2026 17:07
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