Skip to content

Research: take macOS ONNX Runtime from NuGet - #1658

Merged
AnthonyRonning merged 1 commit into
masterfrom
research-onnxruntime-nuget-macos
Nov 19, 2026
Merged

AnthonyRonning merged 1 commit into
masterfrom
research-onnxruntime-nuget-macos

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #1657, which moved the Linux and Windows providers to Microsoft's NuGet package. This does the same for macOS, the last desktop provider that still downloaded from the GitHub repository that returns 404. Until this lands a fresh macOS checkout cannot build Research or run its Rust checks.

Why this one changes a pin

On Linux and Windows the NuGet libraries are byte-identical to the ones we pinned, so #1657 changed no library pin. macOS is different. The release archive carried one universal library; NuGet carries one library per architecture, and Microsoft signed those separately. The code is the same, the signatures are not, so the old pin can never match.

What was compared, against the universal library pinned until now:

x86_64 arm64
Size identical to that half identical to that half
Bytes outside the signature identical identical
Code-directory hash d2231eaa…c64ed1, same d73b7d4b…81c108, same
Signature valid, Developer ID Application: Microsoft Corporation (UBF8T346G9) same signer

Change

  • provide-macos-onnxruntime.sh extracts both libraries from the NuGet package, checks each against a new pin, and joins them with lipo at the path the bundle already reads.
  • The joined library is verified one architecture at a time against those two pins on every run, so the result does not depend on how a given lipo lays out the file.
  • A library left over from the old release archive fails that check once and is fetched again instead of stopping the build.
  • The pins for the universal archive and universal library are removed; nothing reads them now.
  • The NuGet helper extracts several libraries from one download. The Linux and Windows providers call it the same way as before.

Checked

  • The macOS provider end to end on an arm64 Mac: real download, package pin, both library pins, join, per-architecture check. The joined library has a valid signature and loads.
  • Reuse (no second download), replacing a library from the old archive, and a truncated package (refused, nothing left behind).
  • The Linux x64, Linux aarch64 and Windows paths against the same package after the helper change: all three still match their unchanged pins.
  • Research's pre-commit checks with the new library in place (format, Clippy, 93 Rust tests).

This pull request carries the ci:package label so the macOS, Linux and Windows desktop lanes run. That is also the first run of the Windows provider on Windows since #1657.

Still open: iOS builds ONNX Runtime from source out of the same repository and works only while its cached build is available.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

The macOS provider still downloaded a release archive from a GitHub
repository that returns 404, so a fresh macOS checkout could not build
or run Research's checks.

It now extracts the x86_64 and arm64 libraries from the same NuGet
package the Linux and Windows providers use and joins them with lipo.
Each has the code-directory hash of the matching half of the universal
library pinned until now, and a valid Microsoft Developer ID signature.
Microsoft signed them separately from that universal library, though,
so the file hashes are new: the provider pins the two files and checks
the joined library one architecture at a time. A library from the old
release archive fails that check once and is fetched again.

The package helper now extracts several libraries from one download.

Co-Authored-By: Claude <noreply@anthropic.com>
@AnthonyRonning AnthonyRonning added the ci:package Build unsigned packages on this PR label Nov 19, 2026
@AnthonyRonning
AnthonyRonning merged commit 1bee5cc into master Nov 19, 2026
21 checks passed
@AnthonyRonning
AnthonyRonning deleted the research-onnxruntime-nuget-macos branch November 19, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:package Build unsigned packages on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant