Skip to content

fix(ci): harden simulator setup script and runtime matching - #1886

Merged
ncooke3 merged 3 commits into
mainfrom
nc.ci.sim-hardening
Oct 29, 2026
Merged

ncooke3 merged 3 commits into
mainfrom
nc.ci.sim-hardening

Conversation

@ncooke3

@ncooke3 ncooke3 commented Oct 28, 2026

Copy link
Copy Markdown
Member

Follow-up to #1882 to harden simulator provisioning when multiple point-release runtimes or unavailable duplicate devices exist on shared macOS runners.

This PR updates scripts/setup_simulator.sh, .github/actions/setup_simulator/action.yml, and scripts/test.sh to:

  • Prefer exact major.minor SDK runtime matching (e.g., iOS 26.4 for Xcode 26.4 on macos-26 where 26.2, 26.4, and 26.5 runtimes are installed side-by-side) before falling back to major-version matching.
  • Delete any existing unavailable simulators with the same name prior to creation to prevent duplicate-destination ambiguity.
  • Use literal grep -Fq device matching, tolerate leading whitespace in simctl list runtimes, explicitly invoke setup_simulator.sh via bash, and only auto-run setup_simulator.sh from scripts/test.sh when DEVICE uses a Firebase- prefix.

@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 improves simulator setup and testing scripts by explicitly invoking them with bash, refining runtime detection to match major and minor versions, and cleaning up existing unavailable simulators before creation. Feedback on these changes suggests optimizing version extraction using Bash's built-in regex matching instead of subshells, correcting backslash escaping in parameter expansion for runtime filtering, and making the UUID regex case-insensitive to robustly handle lowercase characters.

Comment thread scripts/setup_simulator.sh Resolved
Comment thread scripts/setup_simulator.sh Resolved
Comment thread scripts/setup_simulator.sh Resolved
@ncooke3
ncooke3 requested review from andrewheard and daymxn October 29, 2026 16:49
@ncooke3
ncooke3 enabled auto-merge (squash) October 29, 2026 16:49
@ncooke3

ncooke3 commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

Firestore failure is expected

#1882 (comment)

@ncooke3
ncooke3 merged commit 7c2c5c7 into main Oct 29, 2026
108 of 109 checks passed
@ncooke3
ncooke3 deleted the nc.ci.sim-hardening branch October 29, 2026 21:22
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