From db5cfb11a4b39d32e3e1a00c6caf1ae04148c8a2 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 3 Oct 2026 13:18:38 +0000 Subject: [PATCH] CI: build macOS MEX on macos-15 with MATLAB R2025a The macos-14 runner image is retired on November 2, 2026. macos-15 images ship only Xcode 16 and newer, which R2024b's mex linker does not support, so the macOS MATLAB jobs in test.yml and release.yml move to R2025a and select an Xcode 16.x instead of 15.x. Linux and Windows MATLAB jobs and the packaging job stay on R2024b. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01TadFsoLEZPjEtQzjrYA7pq --- .github/workflows/release.yml | 25 ++++++++++++++++--------- .github/workflows/test.yml | 25 ++++++++++++++++--------- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6bc80f8..be95083 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eebeac5..09fc7cb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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"