Skip to content

Research: fetch the pinned iOS ONNX Runtime source from a fallback remote - #1661

Merged
AnthonyRonning merged 2 commits into
masterfrom
ios-onnxruntime-source-fallback
Nov 20, 2026
Merged

AnthonyRonning merged 2 commits into
masterfrom
ios-onnxruntime-source-fallback

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #1657 and #1658, which moved the desktop ONNX Runtime libraries to NuGet after github.com/microsoft/onnxruntime began returning 404 on November 17. iOS was left: its library is built from a pinned source commit fetched from that same repository.

iOS builds work today only because the CI cache holds the built library (the build-ios run on master at 20:19 UTC on November 19 restored it). An evicted cache or a new Xcode build needs a source build, and that fails at the fetch.

Change

  • onnxruntime-pins.sh gains an ordered remote list and a fetch helper. Microsoft's repository is tried first, then this organization's fork (MaplePrivacyLabs/onnxruntime), then Intel's public fork (intel/onnxruntime). Both forks carry the same commit.
  • The organization's fork names the pinned commit with the tag maple-pin-v1.23.2, so it stays available there whatever other forks do. A new pin needs a new tag.
  • Both iOS build scripts fetch through the helper instead of a hardcoded origin.
  • The fetch sets GIT_TERMINAL_PROMPT=0. GitHub answers a missing repository with a login challenge, which would stall a local build at a prompt before the fallback is tried.

Why a fallback remote is safe here

A remote decides availability, never content:

  • the source commit a83fc4d58cb48eb68890dd689f94f28288cf2278 is pinned and checked after checkout, as before;
  • the device library, simulator library and XCFramework are pinned by SHA-256 per Xcode build, as before.

Nothing about the pins changed.

Verification

  • New scripts/ci/test_ios_onnxruntime_source.py (6 tests, local repositories, no network): the next remote is used when the first is gone or lacks the commit, the first wins when it serves it, and the fetch fails when none does.
  • python3 -I -m unittest discover -s scripts/ci: 662 tests pass. Research Rust tests pass.
  • The build's own checkout step (checkout_onnxruntime_source, run alone against the real remotes): Microsoft's repository answered "repository not found", the organization's fork served the commit, and the checkout ended on the pinned commit with tree b5dda94ef2878d4682e18d1b0c5f150b09054f42, VERSION_NUMBER 1.23.2 and every submodule initialized.
  • A commit-only fetch from Intel's fork also returned the pinned commit.

Not run: the compile after the checkout. CI's research-ios lane reuses the cached library, so this PR's CI exercises neither the fetch nor a cold build. The compile steps are unchanged.

🤖 Generated with Claude Code


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

AnthonyRonning and others added 2 commits November 19, 2026 15:44
…mote

The iOS library is built from a pinned Microsoft source commit, and
Microsoft's repository has returned 404 since November 17. iOS builds keep
working only while the CI cache holds the built library: an evicted cache or
a new Xcode build would fail at the source fetch.

Both build scripts now fetch the pinned commit from an ordered list of
remotes: Microsoft's repository first, then Intel's public fork, which
carries the same commit. The commit ID pins the source and the pinned
library hashes pin the output, so a remote decides availability only. The
fetch no longer prompts for a login when a repository is missing.

Co-Authored-By: Claude <[email protected]>
MaplePrivacyLabs/onnxruntime keeps the pinned iOS source commit under the
tag maple-pin-v1.23.2, so the fallback no longer depends on another
organization keeping a commit that none of its refs name. Intel's fork
stays as the last remote.

Co-Authored-By: Claude <[email protected]>
@AnthonyRonning
AnthonyRonning merged commit 1e2357a into master Nov 20, 2026
21 checks passed
@AnthonyRonning
AnthonyRonning deleted the ios-onnxruntime-source-fallback branch November 20, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant