[devops] Run macOS tests on macOS Golden Gate 🌉#25784
Conversation
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
… bots. The macOS test stages call common/provision.yml to install p7zip (so '7z' is available to extract the test package), but they never generated provision-shared.csx first. provision-brew-packages.csx does '#load "provision-shared.csx"', and that file is git-ignored and generated from provision-shared.in.csx by the 'provisioning' make target, so provisioning failed with "provision-shared.csx could not be opened" (CS1504), breaking all four macOS test stages. Add the 'make ... provisioning' step that every other common/provision.yml caller (build, simulator tests, windows reserve-mac) already runs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Expose VM_VENDOR=ACES on the Golden Gate (ACES virtual-machine) stage so tests gated by TestRuntime.AssertNotVirtualMachine are ignored there, matching the simulator ACES path. The existing ioreg-based detection only recognizes VMware/VirtualBox/Parallels, so the ACES image would otherwise run hardware-only tests (Metal/MPS/AVAudio/VideoToolbox) that fail on a VM. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
brew brew brew 🐍
If we're running on macOS 27+, we're running on an Apple CPU, so there's no need to test x64.
There was a problem hiding this comment.
Pull request overview
This PR updates the macOS CI test pipeline to add a new macOS 27 (“Golden Gate”) test stage (arm64), including VM-aware test gating, and adjusts related test/binding infrastructure to keep macOS test runs stable on newer runtimes/SDKs.
Changes:
- Add a new
mac_27_arm64macOS test stage targeting the Golden Gate image/pool, and plumbVM_VENDORinto the mac test stage. - Enable/repair provisioning for macOS test jobs (generate the provisionator shared csx first; add
python3to brew provisioning). - Update bindings/tests: mark
UIScreendefault init as obsolete to avoid ctor-init runtime traps, and addNSCopyingconformance forMTLTensorExtents.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/devops/README.md | Updates the documented macOS stage list to include mac_27_arm64. |
| tools/devops/provision-shared.in.csx | Adds python3 to Brew packages provisioned on bots. |
| tools/devops/automation/templates/tests-stage.yml | Adds the mac_27_arm64 stage configuration and passes vmVendor through to mac stages. |
| tools/devops/automation/templates/mac/stage.yml | Introduces a vmVendor parameter and conditionally exports VM_VENDOR for test gating. |
| tools/devops/automation/templates/mac/build.yml | Ensures the generated provisionator shared csx exists and enables brew provisioning for mac test jobs. |
| tools/devops/automation/templates/common/configure.yml | Adds the mac_golden_gate label/config to the test configuration list. |
| tests/xtro-sharpie/api-annotations-dotnet/tvOS-Metal.todo | Drops the MTLTensorExtents NSCopying conformance todo (now bound). |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-Metal.todo | Drops the MTLTensorExtents NSCopying conformance todo (now bound). |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Metal.todo | Drops the MTLTensorExtents NSCopying conformance todo (now bound). |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-Metal.todo | Drops the MTLTensorExtents NSCopying conformance todo (now bound). |
| tests/test-dependencies.sh | Adds --ignore-python3 to align with updated dependency checks. |
| tests/packaged-macos-tests.mk | Skips executing x64 macOS/MacCatalyst packaged tests on macOS 27+ (but still builds them). |
| tests/introspection/iOSApiCtorInitTest.cs | Removes the UIScreen ctor-init skip (now handled via [Obsolete] skipping). |
| src/uikit.cs | Disables default ctor generation for UIScreen and adds an obsolete init binding to prevent runtime-trap introspection crashes. |
| src/metal.cs | Makes MTLTensorExtents conform to NSCopying. |
| @echo "ℹ️ Executing the '$(1)' test for Mac Catalyst/.NET (x64) ℹ️" | ||
| $$(Q) $(LAUNCH_WITH_TIMEOUT$(3)) "./$(1)/dotnet/MacCatalyst/bin/$(CONFIG)/$(DOTNET_TFM)-maccatalyst/maccatalyst-x64/$(2).app/Contents/MacOS/$(2)" $(LAUNCH_ARGUMENTS) | ||
| else | ||
| @echo "⚠️ Not executing the '$(1)' test for macOS/.NET (x64) - not executing x64 on macOS 27+ ⚠️" |
| @echo "ℹ️ Executing the '$(2)' test for macOS/.NET (x64) ℹ️" | ||
| $$(Q) $(LAUNCH_WITH_TIMEOUT) "./linker/$(2)/dotnet/macOS/bin/$(CONFIG)/$(DOTNET_TFM)-macos/osx-x64/$(2).app/Contents/MacOS/$(2)" | ||
| else | ||
| @echo "⚠️ Not executing the '$(1)' test for macOS/.NET (x64) - not executing x64 on macOS 27+ ⚠️" |
| @echo "ℹ️ Executing the '$(2)' test for Mac Catalyst/.NET (x64) ℹ️" | ||
| $$(Q) $(LAUNCH_WITH_TIMEOUT) "./linker/$(2)/dotnet/MacCatalyst/bin/$(CONFIG)/$(DOTNET_TFM)-maccatalyst/maccatalyst-x64/$(2).app/Contents/MacOS/$(2)" $(LAUNCH_ARGUMENTS) | ||
| else | ||
| @echo "⚠️ Not executing the '$(1)' test for macOS/.NET (x64) - not executing x64 on macOS 27+ ⚠️" |
| // view.Window.WindowScene.Screen), so the never-useful default ctor is removed in the next major (like the | ||
| // sibling 'UIScreenMode'). Until then the binding keeps the ctor for API compatibility, and the introspection | ||
| // ctor-init probe stays skipped for UIScreen on iOS/tvOS 27+ (see iOSApiCtorInitTest). | ||
| [Obsolete ("Do not use, this will crash. A UIScreen must always be obtained from the view hierarchy (e.g. view.Window.WindowScene.Screen).")] |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #030399d] Build passed (Build macOS tests) ✅Pipeline on Agent |
✅ [PR Build #030399d] Build passed (Build packages) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #030399d] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
🔥 [CI Build #030399d] Test results 🔥Test results❌ Tests failed on VSTS: test results 0 tests crashed, 1 tests failed, 199 tests passed. Failures❌ monotouch tests (macOS) [attempt 2]1 tests failed, 19 tests passed.Failed tests
Html Report (VSDrops) Download Successes✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
No description provided.