Skip to content

ci: build an Intel Mac MATLAB MEX (mexmaci64) under Rosetta - #33

Merged
stevevanhooser merged 1 commit into
mainfrom
ci/matlab-intel-mac-mex
Oct 14, 2026
Merged

stevevanhooser merged 1 commit into
mainfrom
ci/matlab-intel-mac-mex

Conversation

@stevevanhooser

@stevevanhooser stevevanhooser commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Why

The macOS MEX is only built on the arm64 macos-15 runner, so v0.4.1 ships pyraview.mexmaca64 but no pyraview.mexmaci64. On Intel-Mac MATLAB the toolbox has no binary. The auto-download fallback in pyraview.m then asks for releases/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-matlab installs 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:

  • In both test.yml and release.yml, the build-matlab matrix gets a macos-15 / R2023a / intel: true entry. R2023a is the newest release that gets the Intel build. MEX files are forward-compatible, so newer Intel MATLABs load it too.
  • mex in that job produces pyraview.mexmaci64 natively for x86_64. In test.yml the MATLAB test suite then runs against it in Intel MATLAB under Rosetta.
  • A new Check Intel MEX Architecture step fails the job unless pyraview.mexmaci64 exists and lipo -archs reports exactly x86_64.
  • The job name gets an , Intel suffix and the artifact name gets -intel, so neither collides with the arm64 entry. Existing job names are unchanged. package-matlab already merges mex-*, so the release toolbox and release assets pick up the .mexmaci64 with no further change.

Results (CI on this PR)

  • setup-matlab installed Rosetta 2 and R2023a. mex chose bin/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 error is deprecated" warning.
  • Check step: pyraview.mexmaci64: Mach-O 64-bit bundle x86_64, lipo -archs = x86_64.
  • pyraview.unittest.TestDataset passed in the Intel MATLAB (5/5).
  • All other checks are green; the existing arm64/Linux/Windows MATLAB jobs are unchanged.

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

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
@stevevanhooser
stevevanhooser merged commit a38878f into main Oct 14, 2026
11 checks passed
@stevevanhooser
stevevanhooser deleted the ci/matlab-intel-mac-mex branch October 14, 2026 23:01
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.

2 participants