Upgrade to Xcode 26#29468
Conversation
Bump the ADO pipelines' Xcode version to 26.3 by centralizing the default in use-xcode-version.yml and removing redundant explicit parameters. The iOS packaging pipeline moves to Xcode 26.3 with iOS simulator runtime 26.2, and the dormant post-merge job is pinned to 15.3.0. In GitHub Actions, the macOS build-and-test workflow's Xcode version is now a per-matrix-entry override (dead x86_64 branches removed), and the cpu job adds a Release build on Xcode 26.3 for new-toolchain coverage. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Flip the reusable macOS build-and-test workflow default to Xcode 26.3 so the coreml, xnnpack, and webgpu jobs build with it too, matching the packaging pipelines. Invert the cpu matrix to keep a Release build on Xcode 16 as a legacy canary. Bump the iphone_simulator job and ios.yml to Xcode 26.3 / iOS simulator 26.2, moving ios.yml from the deprecated macos-14 runner to macos-15. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot, please fix CI pipeline failures. |
Fixed in commit ab10544. The |
ab10544 to
737557f
Compare
This reverts commit 737557f.
The iOS 18+/macOS 15+ SDK <math.h> unconditionally declares _Float16, which clang supports on x86 only when SSE2 is enabled. XNNPACK compiles its SSE microkernels with -mno-sse2, so under the new SDK the system math module fails to precompile with "_Float16 is not supported on this target", breaking the x86_64 iOS-simulator build. x86_64 always has SSE2 as its baseline, so compile the SSE microkernels with -msse2 -mno-sse3 (matching the SSE2 tier) on Apple x86_64 instead of -msse -mno-sse2. Other targets are unchanged. Verified with the iphonesimulator x86_64 framework build. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…raries
The macOS Catalyst (macabi) static-framework prelink copies each internal
library's object files out of its CMake object directory, which was assumed
to be ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/<lib>.dir. Libraries added via
add_subdirectory (e.g. model_package) instead place their objects under a
nested <target_binary_dir>/CMakeFiles/<lib>.dir, so the wrong directory was
walked, zero .o files were copied, and the library's symbols were silently
dropped from the prelinked object. This surfaced as undefined ModelPackage_*
symbols when linking the maccatalyst test app.
Derive each library's object directory from its own BINARY_DIR target
property so both top-level and subdirectory-defined targets resolve correctly.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The iOS simulator runtime requested for the Apple framework test is not present on the ACES pool image, so get_simulator_device_info.py fails to find a matching simulator. Move the test to a separate job on the Microsoft-hosted macOS-15 image (which has the required runtime), consuming the xcframework artifact published by the build job. The heavier xcframework build stays on the faster ACES pool. The test job remains in the iOS_Full_xcframework stage, so a test failure still blocks the downstream NuGet packaging stage. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… included before.
There was a problem hiding this comment.
Pull request overview
This PR updates Apple CI pipelines and packaging builds to use Xcode 26 (with a retained Xcode 16 build for legacy toolchain coverage), and includes build-system fixes needed to keep Apple builds working with newer SDK/toolchain behavior.
Changes:
- Switch most Azure Pipelines and GitHub Actions macOS/iOS workflows to Xcode 26.3 + iOS simulator runtime 26.2, while keeping a legacy Xcode 16 build in the macOS workflow matrix.
- Patch XNNPACK build flags to avoid Apple x86_64 simulator SDK build issues related to
_Float16and SSE2 requirements. - Fix Mac Catalyst static framework object-file staging by using the target’s own binary directory for object discovery/copying.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/ci_build/github/azure-pipelines/templates/use-xcode-version.yml | Updates the default Xcode selection used across Azure Pipelines templates. |
| tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml | Removes hard-coded Xcode 16.4, inheriting the new default Xcode version. |
| tools/ci_build/github/azure-pipelines/templates/py-macos.yml | Removes hard-coded Xcode 16.4, inheriting the new default Xcode version. |
| tools/ci_build/github/azure-pipelines/templates/mac-cpu-packing-jobs.yml | Removes hard-coded Xcode 16.4, inheriting the new default Xcode version. |
| tools/ci_build/github/azure-pipelines/templates/c-api-cpu.yml | Updates iOS full xcframework build to Xcode 26.3, adds a hosted test job with simulator runtime selection, and stages artifacts more explicitly. |
| tools/ci_build/github/azure-pipelines/stages/plugin-mac-webgpu-stage.yml | Removes hard-coded Xcode 16.4, inheriting the new default Xcode version. |
| tools/ci_build/github/azure-pipelines/post-merge-jobs.yml | Pins a post-merge iOS dynamic framework stage to Xcode 15.3.0 to preserve older toolchain coverage. |
| tools/ci_build/github/azure-pipelines/mac-ios-packaging-pipeline.yml | Updates packaging pipeline parameters to Xcode 26.3 and simulator runtime 26.2. |
| cmake/patches/xnnpack/AddEmscriptenAndIosSupport.patch | Adjusts XNNPACK microkernel compile flags for Apple toolchains (armv7-a workaround and Apple x86_64 SSE2 handling). |
| cmake/onnxruntime.cmake | Fixes Mac Catalyst object file staging by locating object dirs via the target’s binary dir. |
| .github/workflows/macos-ci-build-and-test-workflow.yml | Forces macOS CI to run on macos-15 and defaults Xcode to 26.3 (with per-matrix override support). |
| .github/workflows/mac.yml | Adds an Xcode 16 matrix entry for legacy coverage and bumps simulator/Xcode versions for iOS packaging. |
| .github/workflows/ios.yml | Moves iOS CI to macos-15, switches simulator arch to arm64, and bumps Xcode/runtime versions. |
tianleiwu
left a comment
There was a problem hiding this comment.
Review: Upgrade to Xcode 26
Overall this is a clean, well-scoped toolchain upgrade. The Apple pipelines move to Xcode 26.3 / iOS 26.2 simulator while retaining an Xcode 16 Release leg for legacy-toolchain coverage. A few notes.
Well done
use-xcode-version.ymldefault bumped 15.3.0 → 26.3 with a full caller audit. Templates intended to move forward drop their explicit16.4and inherit the new default, whilepost-merge-jobs.ymlis explicitly pinned back to15.3.0to preserve its prior behavior. No caller is silently regressed.- Splitting
iOS_Full_xcframeworkinto a build job (ACES Sequoia pool) + a dependent test job (hosted macOS-15 with the required simulator runtime) is a sensible way to work around the missing simulator runtime on the build pool. Thetest_files.zipstaging keeps the test inputs self-contained, and the publishedonnxruntime-ios-full-xcframeworkartifact content (the versioned xcframework zip at the artifact root) is unchanged, so the downstream nuget packaging consumer is unaffected. - The XNNPACK SSE2 workaround is correct and well-commented. Apple x86_64 always has SSE2, so forcing
-msse2on the SSE microkernels to satisfy the_Float16declaration in the newer SDK's<math.h>is safe and does not affect runtime CPU dispatch. - The Mac Catalyst object-copy fix (
get_target_property(... BINARY_DIR)) correctly locates objects foradd_subdirectorytargets (e.g.model_package) whoseCMakeFiles/<lib>.diris nested rather than directly underCMAKE_CURRENT_BINARY_DIR.
Minor
- I agree with the existing observation on
macos-ci-build-and-test-workflow.ymlthat the inline matrix docs still presentx86_64as amachineoption; since theruns-onternary now maps it tomacos-15-intel(and the arch assertion inmacos-ci-setupwould fail on a mismatched machine), it is worth trimming/updating that comment for clarity. (Consolidated with the already-posted inline comment rather than re-posted.) - Not in this diff, but related:
.github/actions/macos-ci-setup/action.ymlstill defaultsxcode_version: "16". The reusable workflow now always passes an explicit value, so this default is dead, but it is a stale value worth aligning in a future cleanup.
No blocking issues from my side.
### Description <!-- Describe your changes. --> Update most Apple pipelines to use Xcode 26. Keep a build on Xcode 16 for coverage of the older toolchain. Other fixes: - Patch XNNPACK to fix an iphonesimulator x86_64 build error with the newer iphonesimulator SDK. - Fix issue where object files were not copied from the right location for the Mac Catalyst static framework build. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Upgrade to a newer Xcode version. Xcode 16 is no longer available on some build images. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This cherry-picks the following commits for the release: | Commit ID | PR Number | Commit Title | |-----------|-----------|-------------| | 56f6fee | #29038 | [CUDA] QMoE GEMV fast path for batch-1 decode | | a2c7c3b | #29081 | Fix QMoE CPU livelock by eliminating nested intra-op parallelism | | bd0cb9a | #28571 | [MLAS] KleidiAI fix igemm regression | | 5eb4aee | #29574 | Fix CustomOp forward compatibility: cap version instead of rejecting | | 5f49a37 | #29274 | fix(ci): incorrect identity for azcopy | | bb9ba7e | #29468 | Upgrade to Xcode 26 | | 36c6b7e | #29450 | Fix brew install applesimutils failure by trusting wix/brew tap | | a491809 | #29575 | Don't echo command when setting VSO variable in mac-cpu-packing-jobs.yml. | | a06675e | #29609 | Fix web e2e (npm/vite) and Python DML CI pipelines | Also fixed version missed by version update script. --------- Signed-off-by: Qxiang Xu <Qixiang.Xu@arm.com> Signed-off-by: Jonathan Clohessy <Jonathan.Clohessy@arm.com> Signed-off-by: Martin Klacer <martin.klacer@arm.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: tlwu <tlwu@example.com> Co-authored-by: Martin Klacer <martin.klacer@arm.com> Co-authored-by: Jonathan Clohessy <Jonathan.Clohessy@arm.com> Co-authored-by: Damien Dooley <damien.dooley@arm.com> Co-authored-by: Chi Lo <54722500+chilo-ms@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Sanaa Hamel <sanaahamel@microsoft.com> Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
Description
Update most Apple pipelines to use Xcode 26. Keep a build on Xcode 16 for coverage of the older toolchain.
Other fixes:
Motivation and Context
Upgrade to a newer Xcode version. Xcode 16 is no longer available on some build images.