Skip to content

ci: Pin macOS deployment target for libicu dylibs - #35

Merged
ajpinedam merged 1 commit into
mainfrom
dev/anpi/fix.macos.deployment.target
Sep 18, 2026
Merged

ajpinedam merged 1 commit into
mainfrom
dev/anpi/fix.macos.deployment.target

Conversation

@ajpinedam

Copy link
Copy Markdown
Contributor

GitHub Issue (If applicable): unoplatform/uno#24496

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Build or CI related changes

What is the current behavior?

The build_libicu_osx job runs runConfigureICU macOS on macos-15 / macos-15-intel runners without a deployment target, so clang stamps the runner's OS version into the dylibs. Every published Uno.icu-macos (77.1.2, 77.2.1, 77.3.2) therefore carries LC_BUILD_VERSION minos 15.0 on both slices, while libUnoNativeMac.dylib in Uno.WinUI.Runtime.Skia.MacOS is stamped 10.15 / 11.0 and .NET itself supports macOS 14+. The iOS and tvOS jobs already pin -mios-version-min / -mtvos-version-min; the macOS job was the odd one out.

Full analysis, including why dyld does not enforce the stamp at load time, is in unoplatform/uno#24496.

What is the new behavior?

  • A workflow-level ICU_MACOS_DEPLOYMENT_TARGET (10.15, matching libUnoNativeMac) is exported as MACOSX_DEPLOYMENT_TARGET for configure and make in build_libicu_osx. The arm64 slice is clamped to 11.0 by the toolchain.
  • build_libicu_osx_universal gains a Verify deployment target step that fails the build if either slice of either dylib drifts from the expected value, so a future runner-image bump cannot silently move the floor again.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Docs have been added/updated which fit documentation template. (for bug fixes / features) — N/A, CI-only change
  • Unit Tests and/or UI Tests for the changes have been added (for bug fixes / features) (if applicable) — N/A, the new CI verification step is the test
  • Wasm UI Tests are not showing unexpected any differences. Validate PR Screenshots Compare Test Run results. — N/A
  • Contains NO breaking changes
  • Updated the Release Notes — N/A
  • Associated with an issue (GitHub or internal)

Other information

Validation

  • Runtime, local (Intel Mac, macOS 26.6, Xcode 26.2): built ICU 77.1 with the exact build_libicu_osx commands plus MACOSX_DEPLOYMENT_TARGET=10.15. Build succeeded with no deployment-target warnings; both libicuuc.dylib and libicudata.dylib come out stamped minos 10.15 (SDK 26.2). Loaded through NativeLibrary.Load in the same order Uno uses (icudata, then icuuc): u_getVersion_77 returns 77.1.0.0 and u_isupper_77 answers correctly.
  • Runtime, local: the Verify deployment target script was run against the shipped 77.3.2 dylibs and fails as intended (libicuuc (x86_64) is stamped for macOS 15.0, expected 10.15), and passes against the locally built dylib.
  • Code review: sort -V and the otool/awk extraction were exercised on macOS (BSD userland), which is what the runners use.
  • The arm64 leg (11.0 clamp) is exercised by this PR's own CI run since no arm64 Mac was available locally.

Follow-ups

  • Uno 6.7 consumers pin Uno.icu-macos 77.3.2, so this should be backported to release/stable/77.3 and shipped as 77.3.x, then UnoICUVersion bumped in unoplatform/uno (master and the active release branches).

Internal Issue (If applicable):

🤖 Generated with Claude Code

Copilot AI lite review requested due to automatic review settings September 12, 2026 14:46
@ajpinedam ajpinedam added area/build Categorizes an issue or PR as relevant to build infrastructure kind/bug Something isn't working labels Sep 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved review issues were identified.

Pull request overview

Pins the macOS ICU dylib deployment target and verifies both architecture slices.

Changes:

  • Sets MACOSX_DEPLOYMENT_TARGET=10.15.
  • Validates x86_64 and arm64 deployment targets before packaging.
File summaries
File Description
.github/workflows/main.yml Pins and validates macOS dylib deployment targets.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@morning4coffe-dev morning4coffe-dev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 548cc9182d2c. The deployment-target environment is exported before both configure and make, and verification runs on the universal outputs before upload/packaging.

CI evidence: run 34700276970 is associated with this exact PR head and completed successfully. Both macOS architecture jobs and the universal job passed. The verifier logged libicuuc and libicudata at minos 10.15 for x86_64 and 11.0 for arm64.

I also downloaded only that run's libicu_osx_universal artifact (10299623554) and independently decoded the actual Mach-O fat headers/load commands on Windows. Both dylibs contain the expected x86_64 and arm64 slices, platform macOS, with minimum versions 10.15.0 and 11.0.0 respectively. This checks the resulting binaries, not merely the configured environment variable.

The lower target remains separate from the consuming .NET runtime's supported OS floor. The intended release-branch/package follow-up is also still needed before consumers receive these binaries.

Validation scope: source review, actual CI logs and binary-header inspection. I did not locally load or execute the dylibs on macOS.

@mergify

mergify Bot commented Sep 12, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@ajpinedam
ajpinedam merged commit 8b9fa6a into main Sep 18, 2026
29 of 30 checks passed
@ajpinedam
ajpinedam deleted the dev/anpi/fix.macos.deployment.target branch September 18, 2026 19:15
@welcome

welcome Bot commented Sep 18, 2026

Copy link
Copy Markdown

Congrats on your first pull-request! We ❤ the people who are involved in this project, and we’d love to pay it forward by sending you some swag. If you have any feedback (or ideas how to improve Uno as a open-source project) please open a feedback issue.
giphy
Merci beaucoup 👋

@agneszitte

Copy link
Copy Markdown
Member

/unobot prepare-release --commit-message-pattern "ci: Set version to '{0}'"

@unodevops

Copy link
Copy Markdown
Contributor

The release branch release/stable/77.4 has been created from f887e00 and the PR #40 has been created for the version bump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Categorizes an issue or PR as relevant to build infrastructure kind/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uno.icu-macos dylibs are stamped with a macOS 15.0 minimum (build runs on macos-15 with no deployment target)

5 participants