Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ jobs:
if-no-files-found: error

build-matlab:
name: Build Matlab MEX (${{ matrix.os }})
name: Build Matlab MEX (${{ matrix.os }}${{ matrix.intel && ', Intel' || '' }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -176,6 +176,15 @@ jobs:
matlab: R2024b
- os: macos-15
matlab: R2025a
# Intel Macs need pyraview.mexmaci64, and there is no Intel macOS
# runner. setup-matlab installs the Intel (maci64) build of any
# release before R2023b on an Apple silicon runner and runs it under
# Rosetta 2, so mex there builds and loads a genuine x86_64 MEX.
# R2023a is the newest release that gets the Intel build; MEX files
# are forward compatible, so newer Intel MATLABs load it too.
- os: macos-15
matlab: R2023a
intel: true
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -249,10 +258,24 @@ jobs:
# Run the updated build script which handles paths correctly
command: cd('src/matlab'); build_pyraview;

# Fail if the Intel job produced anything but an x86_64 mexmaci64, e.g.
# because the arm64 MATLAB was installed instead of the Intel one.
- name: Check Intel MEX Architecture
if: matrix.intel
shell: bash
run: |
set -e
MEX=src/matlab/+pyraview/pyraview.mexmaci64
ls -l src/matlab/+pyraview/
test -f "$MEX" || { echo "$MEX was not built"; exit 1; }
file "$MEX"
ARCHS=$(lipo -archs "$MEX")
[ "$ARCHS" = "x86_64" ] || { echo "$MEX is [$ARCHS], expected [x86_64]"; exit 1; }

- name: Upload MEX Artifact
uses: actions/upload-artifact@v4
with:
name: mex-${{ matrix.os }}
name: mex-${{ matrix.os }}${{ matrix.intel && '-intel' || '' }}
path: src/matlab/+pyraview/*.mex* # Capture all MEX files in the package
if-no-files-found: error

Expand Down
25 changes: 24 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
PYRAVIEW_LIB= python -c "import os, pyraview; assert os.path.dirname(pyraview._lib_path) == os.path.dirname(pyraview.__file__), pyraview._lib_path; print('bundled:', pyraview._lib_path)"

build-matlab:
name: Build & Test Matlab (${{ matrix.os }})
name: Build & Test Matlab (${{ matrix.os }}${{ matrix.intel && ', Intel' || '' }})
needs: build_and_test
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -132,6 +132,15 @@ jobs:
matlab: R2024b
- os: macos-15
matlab: R2025a
# Intel Macs need pyraview.mexmaci64, and there is no Intel macOS
# runner. setup-matlab installs the Intel (maci64) build of any
# release before R2023b on an Apple silicon runner and runs it under
# Rosetta 2, so mex there builds and loads a genuine x86_64 MEX.
# R2023a is the newest release that gets the Intel build; MEX files
# are forward compatible, so newer Intel MATLABs load it too.
- os: macos-15
matlab: R2023a
intel: true
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -205,6 +214,20 @@ jobs:
# Run the updated build script which handles paths correctly
command: cd('src/matlab'); build_pyraview;

# Fail if the Intel job produced anything but an x86_64 mexmaci64, e.g.
# because the arm64 MATLAB was installed instead of the Intel one.
- name: Check Intel MEX Architecture
if: matrix.intel
shell: bash
run: |
set -e
MEX=src/matlab/+pyraview/pyraview.mexmaci64
ls -l src/matlab/+pyraview/
test -f "$MEX" || { echo "$MEX was not built"; exit 1; }
file "$MEX"
ARCHS=$(lipo -archs "$MEX")
[ "$ARCHS" = "x86_64" ] || { echo "$MEX is [$ARCHS], expected [x86_64]"; exit 1; }

- name: Run Matlab Tests
uses: matlab-actions/run-command@v2
with:
Expand Down
Loading