Repository navigation
ci: Spike NativeAOT and tvOS tests on GHA - #24952
MartinZikmund wants to merge 2 commits into
Conversation
|
Claude finished @MartinZikmund's task in 3m 34s —— View job Review complete ✅
Verdict: ship (fix-first optional) — this is CI-only infra (no 4 inline findings posted, all low/medium severity — none block merge, but worth a look before/after landing since this is a CI spike meant to be compared against ADO numbers:
No cross-cutting architectural concerns — the new |
| fi | ||
|
|
||
| for attempt in 1 2 3; do | ||
| if uno-check -v --ci --non-interactive --fix "${SKIPS[@]}" --pre-major --tfm "$NET_TFM-${{ inputs.uno-check-tfm }}"; then |
There was a problem hiding this comment.
Possible mirroring gap: missing --preview-major.
The ADO templates invoke uno-check as --pre-major ${{ parameters.UnoCheckParameters }}, where UnoCheckParameters is '--preview-major --tfm $(netCurrentTargetFramework)-android' (linux) / '--preview-major --tfm $(netCurrentTargetFramework)-tvos' (mac) — see build/ci/tests/.azure-devops-tests-android-nativeaot-skia-build.yml:26 and build/ci/templates/dotnet-mobile-install-{linux,mac}.yml. So ADO always passes both --pre-major and --preview-major.
This action only passes --pre-major, dropping --preview-major. If these aren't aliases in uno-check, workload/version resolution could behave differently here than on ADO (e.g. missing a preview workload needed for the android/tvos TFMs), which would only surface as a flaky/failing build on this new workflow. Worth double-checking uno-check's flag semantics, or adding --preview-major to match the ADO invocation exactly.
| fi | ||
|
|
||
| for attempt in 1 2 3; do | ||
| if uno-check -v --ci --non-interactive --fix "${SKIPS[@]}" --pre-major --tfm "$NET_TFM-${{ inputs.uno-check-tfm }}"; then |
There was a problem hiding this comment.
Minor hardening: ${{ inputs.uno-check-tfm }} is interpolated directly into the run: script body rather than passed through an env var.
Today the only callers in this PR pass literal strings (android, tvos), so there's no real injection risk right now. But this is a reusable composite action, and GitHub's own security guidance for Actions recommends never substituting ${{ }} expressions directly into a shell script — always route them through env: + "$VAR" — specifically so a future caller can't accidentally (or an attacker via some upstream untrusted value) inject shell metacharacters into the command. Low severity given current usage, but worth fixing while this file is new, e.g.:
run: |
...
for attempt in 1 2 3; do
if uno-check -v --ci --non-interactive --fix "${SKIPS[@]}" --pre-major --tfm "$NET_TFM-$UNO_CHECK_TFM"; then
env:
UNO_CHECK_TFM: ${{ inputs.uno-check-tfm }}| for attempt in 1 2 3; do | ||
| if sudo xcodebuild -downloadPlatform "$PLATFORM"; then | ||
| break | ||
| fi | ||
| if [ "$attempt" -eq 3 ]; then | ||
| echo "::error::$PLATFORM simulator runtime download failed after $attempt attempts." | ||
| exit 1 | ||
| fi | ||
| echo "Download failed (attempt $attempt). Retrying in 30s..." | ||
| sleep 30 | ||
| done |
There was a problem hiding this comment.
Divergence from the ADO template this mirrors: build/ci/templates/ios-build-select-version.yml re-runs sudo xcodebuild -runFirstLaunch before each retry of -downloadPlatform:
if [ "$attempt" -lt 3 ]; then
...
sudo xcodebuild -runFirstLaunch
sleep 30
fiThis loop only sleeps and retries the download, without the -runFirstLaunch reset in between. If that call exists in the ADO template to recover from a bad Xcode first-launch state after a failed download (rather than just being a harmless no-op), dropping it here could make retries less effective at resolving transient failures on the GHA runner. Worth confirming this was an intentional simplification rather than an oversight.
| total = passed = failed = skipped = 0 | ||
| failures = [] | ||
| for path in files: | ||
| for case in ET.parse(path).getroot().iter("test-case"): |
There was a problem hiding this comment.
Minor robustness gap: if a matched results file exists but is truncated/corrupt (e.g. the device/runner was killed mid-write, which is plausible given this parses output from emulator/simulator test runs that can crash), ET.parse(path) raises an uncaught ParseError. The step still ends up failing (good), but as an unhandled Python traceback instead of the friendly ### <title> summary this script is meant to produce in GITHUB_STEP_SUMMARY — so a crash mid-write looks like a tooling bug in the Actions log rather than "no/bad results produced". Consider wrapping the parse in a try/except and treating a parse failure the same as "no files" (fail with the friendly message) for easier triage.
|
Claude finished @MartinZikmund's task in 57s —— View job Review complete ✅
Verdict: ship — this I verified this against No new inline findings — the change is small, self-contained, and doesn't touch the three files from my prior review pass ( |
Spike resultsTwo runs: 37035371788 (tvOS green, Android build failed on uno-check's OpenJDK checkup, fixed in 93d6ede by using the Microsoft JDK) and 37039510028 (all green).
macOS slots: the tvOS path uses 1 slot for 19 min, then 2 for ~16 min (about 52 macOS runner-minutes per PR), out of the org's 5. Fork PRs would draw from the same pool. Differences from ADO: tests run on the Xcode 26.6 / tvOS 26.5 simulator, not Xcode 15.3 on macOS-14. The bundle is still |
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012psuk5dxG4cNcryRVL2VWS
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012psuk5dxG4cNcryRVL2VWS
93d6ede to
ab72fa2
Compare
|
Claude finished @MartinZikmund's task in 1m 21s —— View job Review complete ✅
Verdict: ship — the branch is unchanged since the last review pass (still I re-verified the diff against the ADO templates independently this pass rather than just reusing prior conclusions, specifically re-checking the one asymmetry that looked suspicious: the tvOS build job ( I also diffed the build/test steps in The 4 inline findings from the previous review pass (missing |
GitHub Issue: closes #24951
PR Type:
🏗️ Build or CI related changes
What changed? 🚀
Spike: a GitHub Actions workflow (
.github/workflows/runtime-tests-mobile.yml) that runs on PRs to master and mirrors two ADO stages, reusing their device scripts unchanged:ubuntu-24.04(samedotnet publishas.azure-devops-tests-android-nativeaot-skia-build.yml), then 5 test shards on KVM emulators (API 34) throughandroid-run-skia-runtime-tests.sh. Unlike ADO, the tests run on PRs.macos-26with the Xcode.vsts-ci.ymlpins (or the newest of the same major), then 2 test shards (max-parallel: 2) throughtvos-uitest-run.sh. Fewer shards than ADO's 4, because the org shares only 5 concurrent macOS jobs.Supporting pieces:
.github/actions/mobile-dotnet-setup: pinned SDK frombuild/ci/net11/_global.json, uno-check with the version read from.vsts-ci.yml..github/scripts/select-xcode.sh: GHA port ofios-build-select-version.yml..github/scripts/check-nunit-results.py: fails the job on failed/missing results and writes a job summary (ADO usesPublishTestResults@2for that).ADO stages are untouched. This PR only changes
.github/, which.vsts-ci.ymlexcludes, so it does not start an ADO run of its own. Comparison numbers will be posted in a comment.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code
https://claude.ai/code/session_012psuk5dxG4cNcryRVL2VWS