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
25 changes: 16 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,32 +166,39 @@ jobs:
fail-fast: false
matrix:
# Matlab actions support limited OS versions, check availability.
# macOS is pinned to macos-14 (arm64) because the macos-latest image
# ships an Xcode too new for R2024b's mex linker.
os: [ubuntu-latest, windows-latest, macos-14]
# macOS uses macos-15 (arm64), whose images ship only Xcode 16 and
# newer. R2024b's mex linker needs Xcode 15, so macOS builds with
# R2025a, which supports Xcode 16. Linux and Windows stay on R2024b.
include:
- os: ubuntu-latest
matlab: R2024b
- os: windows-latest
matlab: R2024b
- os: macos-15
matlab: R2025a
steps:
- uses: actions/checkout@v4

- uses: matlab-actions/setup-matlab@v2
with:
release: 'R2024b'
release: ${{ matrix.matlab }}

# MATLAB R2024b's mex linker is incompatible with the very new Xcode on
# the default image, so select a supported Xcode 15.x.
# Pin an Xcode 16.x that R2025a's mex supports, rather than whatever
# (possibly newer) Xcode the image defaults to.
- name: Select Xcode for MEX (macOS)
if: runner.os == 'macOS'
shell: bash
run: |
set -e
XC=""
for v in 15.4 15.3 15.2 15.1 15.0.1 15.0; do
for v in 16.4 16.3 16.2 16.1 16.0; do
if [ -d "/Applications/Xcode_${v}.app" ]; then XC="/Applications/Xcode_${v}.app"; break; fi
done
if [ -z "$XC" ]; then
XC=$(ls -d /Applications/Xcode_15*.app 2>/dev/null | sort -V | tail -1 || true)
XC=$(ls -d /Applications/Xcode_16*.app 2>/dev/null | sort -V | tail -1 || true)
fi
if [ -z "$XC" ]; then
echo "No Xcode 15.x found on runner; available Xcodes:"; ls -d /Applications/Xcode_*.app || true; exit 1
echo "No Xcode 16.x found on runner; available Xcodes:"; ls -d /Applications/Xcode_*.app || true; exit 1
fi
echo "Selecting $XC"
sudo xcode-select -s "$XC/Contents/Developer"
Expand Down
25 changes: 16 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,32 +122,39 @@ jobs:
fail-fast: false
matrix:
# Matlab actions support limited OS versions, check availability.
# macOS is pinned to macos-14 (arm64) because the macos-latest image
# ships an Xcode too new for R2024b's mex linker.
os: [ubuntu-latest, windows-latest, macos-14]
# macOS uses macos-15 (arm64), whose images ship only Xcode 16 and
# newer. R2024b's mex linker needs Xcode 15, so macOS builds with
# R2025a, which supports Xcode 16. Linux and Windows stay on R2024b.
include:
- os: ubuntu-latest
matlab: R2024b
- os: windows-latest
matlab: R2024b
- os: macos-15
matlab: R2025a
steps:
- uses: actions/checkout@v4

- uses: matlab-actions/setup-matlab@v2
with:
release: 'R2024b'
release: ${{ matrix.matlab }}

# MATLAB R2024b's mex linker is incompatible with the very new Xcode on
# the default image, so select a supported Xcode 15.x.
# Pin an Xcode 16.x that R2025a's mex supports, rather than whatever
# (possibly newer) Xcode the image defaults to.
- name: Select Xcode for MEX (macOS)
if: runner.os == 'macOS'
shell: bash
run: |
set -e
XC=""
for v in 15.4 15.3 15.2 15.1 15.0.1 15.0; do
for v in 16.4 16.3 16.2 16.1 16.0; do
if [ -d "/Applications/Xcode_${v}.app" ]; then XC="/Applications/Xcode_${v}.app"; break; fi
done
if [ -z "$XC" ]; then
XC=$(ls -d /Applications/Xcode_15*.app 2>/dev/null | sort -V | tail -1 || true)
XC=$(ls -d /Applications/Xcode_16*.app 2>/dev/null | sort -V | tail -1 || true)
fi
if [ -z "$XC" ]; then
echo "No Xcode 15.x found on runner; available Xcodes:"; ls -d /Applications/Xcode_*.app || true; exit 1
echo "No Xcode 16.x found on runner; available Xcodes:"; ls -d /Applications/Xcode_*.app || true; exit 1
fi
echo "Selecting $XC"
sudo xcode-select -s "$XC/Contents/Developer"
Expand Down
Loading