Repository navigation
Test Iroh on Intel iOS Simulator - #8485
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughChangesiOS Simulator Compatibility
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant CIWorkflow
participant TestScript
participant Simulator as iOS Simulator
participant XcodeBuild as xcodebuild
participant Validators as xcresulttool and lipo
CIWorkflow->>TestScript: Invoke for x86_64 matrix entry
TestScript->>Simulator: Ensure runtime, create, and boot device
TestScript->>XcodeBuild: Run CMUXMobileCore and CmuxIrohTransport tests
XcodeBuild-->>TestScript: Produce test results and binaries
TestScript->>Validators: Validate results and architectures
Suggested reviewers: 🚥 Pre-merge checks | ✅ 25✅ Passed checks (25 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR introduces a new CI job step and script (
Confidence Score: 4/5Safe to merge — the script is well-guarded, uses a real event-based boot wait, and cleans up the simulator on exit regardless of outcome. The only finding is a missing diagnostic message when the post-download has_ios_runtime check still fails, which affects CI log readability but not correctness. The core logic — simulator lifecycle, architecture enforcement, and test result validation — is sound. scripts/ci/run-iroh-ios-simulator-package-tests.sh — the post-download runtime re-check at line 47 exits silently on failure. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[CI: matrix.expected_arch == x86_64] --> B[run-iroh-ios-simulator-package-tests.sh]
B --> C{iOS runtime available?}
C -- No --> D[xcodebuild -downloadPlatform iOS]
D --> E{Runtime available now?}
E -- No --> F[exit 1 silent]
E -- Yes --> G[Create unique iOS Simulator]
C -- Yes --> G
G --> H[trap cleanup EXIT]
H --> I[simctl boot + bootstatus via run_with_timeout.py]
I --> J[run_package_tests CMUXMobileCore]
J --> K[xcresulttool arch + pass checks]
K --> L[lipo binary arch check]
L --> M[run_package_tests CmuxIrohTransport]
M --> N[xcresulttool + lipo checks]
N --> O[cleanup: simctl shutdown + delete]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[CI: matrix.expected_arch == x86_64] --> B[run-iroh-ios-simulator-package-tests.sh]
B --> C{iOS runtime available?}
C -- No --> D[xcodebuild -downloadPlatform iOS]
D --> E{Runtime available now?}
E -- No --> F[exit 1 silent]
E -- Yes --> G[Create unique iOS Simulator]
C -- Yes --> G
G --> H[trap cleanup EXIT]
H --> I[simctl boot + bootstatus via run_with_timeout.py]
I --> J[run_package_tests CMUXMobileCore]
J --> K[xcresulttool arch + pass checks]
K --> L[lipo binary arch check]
L --> M[run_package_tests CmuxIrohTransport]
M --> N[xcresulttool + lipo checks]
N --> O[cleanup: simctl shutdown + delete]
Reviews (1): Last reviewed commit: "ci: test Iroh in Intel iOS Simulator" | Re-trigger Greptile |
| if ! has_ios_runtime; then | ||
| echo "No available iOS Simulator runtime; downloading the iOS platform." | ||
| xcodebuild -downloadPlatform iOS | ||
| has_ios_runtime | ||
| fi |
There was a problem hiding this comment.
Silent failure after platform download — if the iOS runtime is still not found after
xcodebuild -downloadPlatform iOS, set -e causes the script to exit with code 1 from the Python subprocess but no message is printed to stderr. A developer reading CI logs would see a bare non-zero exit with no context about why the post-download check failed.
| if ! has_ios_runtime; then | |
| echo "No available iOS Simulator runtime; downloading the iOS platform." | |
| xcodebuild -downloadPlatform iOS | |
| has_ios_runtime | |
| fi | |
| if ! has_ios_runtime; then | |
| echo "No available iOS Simulator runtime; downloading the iOS platform." | |
| xcodebuild -downloadPlatform iOS | |
| if ! has_ios_runtime; then | |
| echo "iOS Simulator runtime still not available after downloading the iOS platform." >&2 | |
| exit 1 | |
| fi | |
| fi |
Summary
Testing
CMUX_EXPECTED_SIMULATOR_ARCH=arm64 ./scripts/ci/run-iroh-ios-simulator-package-tests.sh(226 CMUXMobileCore tests and 407 CmuxIrohTransport tests passed in an isolated local iOS Simulator)bash -n scripts/ci/run-iroh-ios-simulator-package-tests.shbash tests/test_ci_self_hosted_guard.shgit diff --checkIssues
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by cubic
Adds a CI step to run
CMUXMobileCoreandCmuxIrohTransporttests on an x86_64 iOS Simulator in the Intel Sonoma compatibility lane. Ensures tests actually run on x86_64 and fail fast if the runtime, device, or binaries don’t match.scripts/ci/run-iroh-ios-simulator-package-tests.shcreates a fresh iOS Simulator, downloads an iOS runtime if missing, and boots it.CMUXMobileCoreandCmuxIrohTransportwithONLY_ACTIVE_ARCH=YESand the expected arch..xcresult: all tests passed, nonzero count, and device architecture is x86_64.lipo..github/workflows/ci-macos-compat.ymland executes only whenmatrix.expected_arch == 'x86_64'viaCMUX_EXPECTED_SIMULATOR_ARCH.Written for commit a05d628. Summary will update on new commits.
Summary by CodeRabbit