Repository navigation
ci: split workflows and add E2E simulator run - #36
Conversation
- build.yml: renamed to 'Build and Publish', contains only build/pack and publish jobs. Tests extracted to dedicated workflow. - test.yml: new 'Tests' workflow running all test suites (AppleDev, Tool.Tests, FbIdb) with test result reporting. - run.yml: new 'Run iOS Simulator' E2E workflow that creates a simulator, boots it, verifies it is running, and cleans up. Both build.yml and test.yml add explicit dotnet-version: 10.0.x. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR refactors the monolithic CI workflow (formerly build.yml) into three focused workflows: a pure build-and-publish workflow, a dedicated test workflow (test.yml), and a new end-to-end simulator workflow (run.yml). This fits cleanly into the repository's CI infrastructure.
Changes:
build.ymlrenamed to "Build and Publish", test job removed, explicitdotnet-version: 10.0.xadded to bothsetup-dotnetsteps.test.yml(new) runs the three test projects on every PR and push to main, with its own concurrency group anddorny/test-reporter@v2for publishing TRX results.run.yml(new) exercises the CLI's simulator commands end-to-end: build → list → create → boot → verify → delete.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/build.yml |
Renamed to "Build and Publish"; removed test job; pinned dotnet-version: 10.0.x on both setup-dotnet steps |
.github/workflows/test.yml |
New dedicated test workflow with concurrency group, IDB Companion install, and TRX-based test reporting |
.github/workflows/run.yml |
New E2E simulator workflow that builds the CLI, creates/boots/verifies/deletes a simulator |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Follow the Do/Validate pattern from the Android SDK Tools run workflow. Uses MauiApp7.app test fixture for install/launch/uninstall validation. Captures screenshot and logs as uploadable artifacts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
E2E workflow now tests: create, boot, install (MauiApp7.app), launch (Settings), screenshot, logs, uninstall, delete. Follows Do/Validate pattern from AndroidSdk.Tools. Fix bug in Extensions.cs where --output path validation used GetInvalidFileNameChars() (which includes '/') instead of GetInvalidPathChars(), rejecting valid paths like 'artifacts/file.png'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The launch command already fails on error. The screenshot taken right after serves as real validation that the simulator is responsive. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Validate the app actually launched by checking system logs for the Preferences process and verifying it appears in the app list, with a retry loop matching the Android workflow pattern. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Instead of using a stub .app from testdata, build a real iOS app on CI using 'dotnet new ios' + 'dotnet build -r iossimulator-arm64'. Adds the ios workload install step. All Do/Validate steps now use the real app: install, launch (verified via app list), screenshot, logs, uninstall. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The .NET 10 iOS workload requires Xcode 26.2 but the runner defaults to Xcode 16.4. Add xcode-select step to pick the right version. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The iOS workload may expect a specific Xcode version (e.g. 26.2) while the runner has a newer one (26.3). Use -p:_XcodeVersionCheck=false to allow building the test app with a compatible but not exact Xcode match. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Select the latest Xcode 26.x before installing the iOS workload, then run 'dotnet workload update' to ensure the workload version matches the selected Xcode. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The iOS workload may lag behind the runner's Xcode version. Use -p:ValidateXcodeVersion=false (from Xamarin.Shared.Sdk.targets) to allow building the E2E test app with a slightly newer Xcode. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The runner's Xcode 26.3 RC2 has incomplete SDKs and the .NET 10 iOS workload requires exactly Xcode 26.2. Build the E2E test app with .NET 9 and the default Xcode 16.4 which are compatible. The CLI tool still runs on .NET 10. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The ios template doesn't support --framework. Create with dotnet new, then sed the csproj to net9.0-ios for Xcode 16.4 compatibility. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Select Xcode 26.3, create MacOSX.sdk symlink if missing (RC builds may have versioned SDK names), skip Xcode version check for the build, and use net10.0-ios directly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The .NET iOS workload requires an exact Xcode version match (26.2) but the CI runner only has Xcode 26.3 RC2 with broken MacOSX.sdk. Switch to building a minimal native Obj-C iOS app with clang directly using the iphonesimulator SDK - no workload dependency needed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add NSLog(E2E_APP_STARTED_SUCCESSFULLY) to the native test app and validate launch by grepping simulator logs for the marker in a retry loop — matching the Do/Validate pattern from AndroidSdk.Tools. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use xcrun simctl spawn directly with --predicate filter and --info flag instead of going through the CLI tool, which may garble output in table format. Adds debug log dump on failure for easier troubleshooting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use 'dotnet $TOOL simulator logs' with --format json and --predicate to validate the app launch marker. The E2E workflow should only use the CLI tool - that's the whole point of testing it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a pre-built MAUI iOS simulator app (com.companyname.e2etestapp) to testdata as a zip, matching the Android approach of committing a pre-built APK. The app logs E2E_APP_STARTED_SUCCESSFULLY on MainPage.OnAppearing. The workflow now extracts the zip instead of building with clang, removing the Xcode version dependency entirely. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
….Test - Rename AppleDev.Tool.Tests -> AppleDev.Tool.Test for consistent *.Test.csproj naming - Update solution file, InternalsVisibleTo, and namespace - Split test workflow into matrix: each test project runs in parallel - Only install idb-companion for the FbIdb test job - Each matrix job publishes its own test results via dorny/test-reporter Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 9 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add explicit dotnet-version: 10.0.x to setup-dotnet in build.yml and test.yml - Update upload-artifact@v4 to @v5 in run.yml for consistency - Fix timestamp race condition: capture 5s before launch for log filtering - Fix log validation: check file size > 0, not just existence - Fix uninstall validation: remove || true that masked failures Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 9 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add env.SIMULATOR_UDID != '' condition to uninstall/validate/cleanup steps so they skip gracefully if the simulator was never created. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
actions/setup-dotnet respects global.json for SDK version detection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Splits the monolithic CI workflow into 3 focused workflows, parallelizes tests, and adds an end-to-end simulator test pipeline.
Changes
Workflow restructuring
build.yml— Renamed to "Build and Publish", removed test job, addeddotnet-version: 10.0.xtest.yml(NEW) — Dedicated test workflow using matrix strategy to run each test project in parallel, with individual test result reporting via dorny/test-reporterrun.yml(NEW) — Comprehensive E2E simulator workflowTest parallelization (
test.yml)idb-companion(no wasted time for other jobs)E2E simulator pipeline (
run.yml)Full app lifecycle following the Do/Validate pattern (modeled after AndroidSdk.Tools run.yml):
simulator listBootedsimulator app listE2E_APP_STARTED_SUCCESSFULLYmarker found insimulator logsoutput--forceEvery validation step uses only
dotnet $TOOLCLI commands (no rawxcrun/simctl) — the whole point is to test the CLI tool itself.Pre-built test app
AppleDev.Test/testdata/com.companyname.e2etestapp.zip(NEW) — Pre-built MAUI iOS simulator app, matching the Android approach of committing a pre-built APK. The app logsE2E_APP_STARTED_SUCCESSFULLYviaConsole.WriteLineinMainPage.OnAppearing.Rename
AppleDev.Tool.Tests→AppleDev.Tool.Test— Consistent*.Testnaming convention across all test projectsBug fix
AppleDev.Tool/Extensions.cs— Fixed--outputpath validation:GetInvalidFileNameChars()→GetInvalidPathChars()so paths likeartifacts/screenshot.pngare accepted (the/separator was incorrectly rejected)