Repository navigation
ci: build an Intel Mac MATLAB MEX (mexmaci64) under Rosetta - #33
Merged
Merged
Conversation
The macOS MEX was only built on the arm64 runner, so releases carried pyraview.mexmaca64 but no pyraview.mexmaci64: the toolbox had no binary for Intel-Mac MATLAB and the auto-download fallback had nothing to fetch. There is no Intel macOS runner, but setup-matlab installs the Intel build of releases before R2023b on Apple silicon and runs it under Rosetta 2. Add an R2023a macos-15 entry to the MATLAB matrix in test.yml and release.yml; its mex builds a genuine x86_64 mexmaci64, the MATLAB tests run against it in test.yml, and a lipo check fails the job if it is anything else. The release packages it into the toolbox alongside the others. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NDx6PbBsjPuycBAhTwC6Ho
Merged
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
The macOS MEX is only built on the arm64
macos-15runner, so v0.4.1 shipspyraview.mexmaca64but nopyraview.mexmaci64. On Intel-Mac MATLAB the toolbox has no binary. The auto-download fallback inpyraview.mthen asks forreleases/latest/download/pyraview.mexmaci64, which doesn't exist, so users get the "could not download" error. (Found while investigating #32.)What
GitHub has no Intel macOS runner. On an Apple silicon runner,
setup-matlabinstalls the Intel (maci64) build of any MATLAB release before R2023b and runs it under Rosetta 2 (src/install.ts:darwin && arm64 && release < r2023b → x64). So:test.ymlandrelease.yml, thebuild-matlabmatrix gets amacos-15/ R2023a /intel: trueentry. R2023a is the newest release that gets the Intel build. MEX files are forward-compatible, so newer Intel MATLABs load it too.pyraview.mexmaci64natively for x86_64. Intest.ymlthe MATLAB test suite then runs against it in Intel MATLAB under Rosetta.pyraview.mexmaci64exists andlipo -archsreports exactlyx86_64., Intelsuffix and the artifact name gets-intel, so neither collides with the arm64 entry. Existing job names are unchanged.package-matlabalready mergesmex-*, so the release toolbox and release assets pick up the.mexmaci64with no further change.Results (CI on this PR)
setup-matlabinstalled Rosetta 2 and R2023a. mex chosebin/maci64/mexopts/clang++_maci64.xml(ARCH : maci64) and compiled with-arch x86_64 -mmacosx-version-min=10.15. It accepted the runner's Xcode 16.4 (SDK 15.5) and linked cleanly; the only output was ld's "-undefined erroris deprecated" warning.pyraview.mexmaci64: Mach-O 64-bit bundle x86_64,lipo -archs=x86_64.pyraview.unittest.TestDatasetpassed in the Intel MATLAB (5/5).So Intel-Mac MATLAB users need macOS 10.15+ (R2023a's mex default). That matches what Intel MATLAB releases of that era require anyway.
Independent of #32 (Python wheels); either can merge first.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NDx6PbBsjPuycBAhTwC6Ho