[ci] Fix simulator install failures and artifact publishing for all pipeline types#33999
Merged
mattleibow merged 10 commits intomainfrom Feb 13, 2026
Merged
[ci] Fix simulator install failures and artifact publishing for all pipeline types#33999mattleibow merged 10 commits intomainfrom
mattleibow merged 10 commits intomainfrom
Conversation
…ontinuing - Change exit 0 to exit 1 when Xcode version is not found - Remove continueOnError: true from Install Simulator Runtimes step - Stop treating exit code 70 as success - retry on any failure - Add verification step that checks simulator runtimes were actually installed - Unify download logic for Xcode 26.0.x and other versions
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens macOS CI provisioning so simulator runtime installation failures are surfaced immediately, avoiding hard-to-diagnose downstream build errors.
Changes:
- Fail the “Select Xcode Version” step when no matching Xcode is found (exit 1 instead of exit 0).
- Remove
continueOnError: truefrom “Install Simulator Runtimes” so failures properly fail the job. - Unify simulator runtime download + retry flow and add a post-download verification that at least one runtime is installed.
Member
Author
|
/azp run maui-pr-devicetests |
Member
Author
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
|
Azure Pipelines successfully started running 1 pipeline(s). |
The templateContext.outputs for pipelineArtifact used incorrect field names (artifact/path) instead of the 1ES-required names (artifactName/targetPath), causing internal builds to silently skip publishing MacNativeArtifacts, APIScanFiles, and Metadata artifacts.
The dotnet-maui-build definition uses ci.yml which does NOT have the 1ES extends template wrapper. Without that wrapper, templateContext.outputs is just ignored metadata - no publish step is ever generated. Fix: Remove the runAsPublic guard on the inline publish: step so it runs for ALL builds. Also remove the templateContext.outputs for MacNativeArtifacts since the inline publish: step now handles all cases (avoiding duplicate artifact conflicts when ci-official.yml runs with 1ES wrapper).
…builds" This reverts commit 9f9cdb0.
…k.yml" This reverts commit d384cb6.
…nism The previous approach used runAsPublic to select between templates-official (1ES) and templates (non-official). This conflated 'internal build' with '1ES managed pipeline'. dotnet-maui-build uses ci.yml (no 1ES extends) with runAsPublic: false, so it got templates-official which puts outputs in templateContext - but without the 1ES extends wrapper, nothing processes templateContext into actual publish tasks. Fix: Add is1ESPipeline parameter (default: false). Only ci-official.yml passes is1ESPipeline: true. Template selection and publish mechanism are now keyed off is1ESPipeline: - 1ES (ci-official.yml): templateContext.outputs → 1ES wrapper processes - Non-1ES (ci.yml): inline publish: steps → works everywhere
…publishing Replace conditional templateContext.outputs (1ES only) and inline publish: (non-1ES only) with the arcade core-templates/steps/publish-pipeline-artifacts step template. This template automatically dispatches to the correct task: - 1ES pipelines: 1ES.PublishPipelineArtifact@1 - Non-1ES pipelines: PublishPipelineArtifact@1 This eliminates all conditional publish logic while maintaining 1ES compliance. Applies to MacNativeArtifacts, APIScanFiles, and Metadata artifacts.
Member
Author
|
/azp run maui-pr-devicetests |
Member
Author
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
|
Azure Pipelines successfully started running 1 pipeline(s). |
The arcade SDK Version.BeforeCommonTargets.targets expects OfficialBuildId in format 'yyyyMMdd.r'. The dotnet-maui-build pipeline uses BUILD.BUILDNUMBER which depends on the Azure DevOps default format. Fix: Explicitly set the build number format in ci.yml using the 'name:' property. This ensures BUILD.BUILDNUMBER always has the correct format for arcade.
b3c2df0 to
aad2333
Compare
Member
Author
|
/azp run maui-pr-devicetests |
Member
Author
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
|
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced Feb 14, 2026
TamilarasanSF4853
pushed a commit
to TamilarasanSF4853/maui
that referenced
this pull request
Mar 2, 2026
…ipeline types (dotnet#33999) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description of Change Three CI pipeline fixes: 1. **Simulator install error handling** — Stop silently swallowing simulator installation failures 2. **Artifact publishing for all pipelines** — Use arcade publish template so artifacts are published on all pipeline types 3. **Build number format for arcade SDK** — Set explicit format so version calculation works --- ## Fix 1: Simulator Install Failures The "Install Simulator Runtimes" CI step was silently swallowing failures. ### Problems Fixed 1. **`exit 0` when Xcode not found** — Changed to `exit 1` 2. **Exit code 70 treated as success** — Now triggers retry 3. **`continueOnError: true`** — Removed ### What Changed (provision.yml) - Any non-zero exit from `xcodebuild -downloadPlatform` triggers a retry - After download, verify at least one simulator runtime is installed - If no runtimes found, build fails with clear error --- ## Fix 2: Artifact Publishing `dotnet-maui-build` was not publishing MacNativeArtifacts because `templateContext.outputs` only works with 1ES `extends:` wrapper. ### Solution Use arcade `core-templates/steps/publish-pipeline-artifacts.yml` for all artifact publishing: | Pipeline | `is1ESPipeline` | Task Used | |---|---|---| | `maui-pr` (public) | `false` | `PublishPipelineArtifact@1` | | `dotnet-maui-build` (internal) | `false` | `PublishPipelineArtifact@1` | | `dotnet-maui` (official) | `true` | `1ES.PublishPipelineArtifact@1` | ### What Changed (stage-pack.yml, ci-official.yml) - Added `is1ESPipeline` parameter to `stage-pack.yml` - Replaced all conditional publish logic with unified arcade step template --- ## Fix 3: Build Number Format `dotnet-maui-build` failed with: ``` error MSB4186: Method '[MSBuild]::Add' not found ``` ### Root Cause The arcade SDK `Version.BeforeCommonTargets.targets` expects `OfficialBuildId` in format `yyyyMMdd.r` (e.g., `20260212.1`). The code used `$(BUILD.BUILDNUMBER)` which depends on the Azure DevOps pipeline's build number format — not guaranteed to match the expected format. ### Solution Set the build number format explicitly in `ci.yml` using the `name:` property: ```yaml name: $(Date:yyyyMMdd).$(Rev:r) ``` This ensures `$(BUILD.BUILDNUMBER)` always has the correct format for arcade SDK version calculation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
Three CI pipeline fixes:
Fix 1: Simulator Install Failures
The "Install Simulator Runtimes" CI step was silently swallowing failures.
Problems Fixed
exit 0when Xcode not found — Changed toexit 1continueOnError: true— RemovedWhat Changed (provision.yml)
xcodebuild -downloadPlatformtriggers a retryFix 2: Artifact Publishing
dotnet-maui-buildwas not publishing MacNativeArtifacts becausetemplateContext.outputsonly works with 1ESextends:wrapper.Solution
Use arcade
core-templates/steps/publish-pipeline-artifacts.ymlfor all artifact publishing:is1ESPipelinemaui-pr(public)falsePublishPipelineArtifact@1dotnet-maui-build(internal)falsePublishPipelineArtifact@1dotnet-maui(official)true1ES.PublishPipelineArtifact@1What Changed (stage-pack.yml, ci-official.yml)
is1ESPipelineparameter tostage-pack.ymlFix 3: Build Number Format
dotnet-maui-buildfailed with:Root Cause
The arcade SDK
Version.BeforeCommonTargets.targetsexpectsOfficialBuildIdin formatyyyyMMdd.r(e.g.,20260212.1). The code used$(BUILD.BUILDNUMBER)which depends on the Azure DevOps pipeline's build number format — not guaranteed to match the expected format.Solution
Set the build number format explicitly in
ci.ymlusing thename:property:This ensures
$(BUILD.BUILDNUMBER)always has the correct format for arcade SDK version calculation.