From be616aa32fbc341e70e3c3c91e8d63c0aa40d0f1 Mon Sep 17 00:00:00 2001 From: mcafaro Date: Mon, 6 May 2024 17:45:05 -0400 Subject: [PATCH] Install Intel version on Apple silicon prior to R2023b --- .github/workflows/bat.yml | 4 ++++ src/install.ts | 3 +++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/bat.yml b/.github/workflows/bat.yml index 77eba90..6be53c4 100644 --- a/.github/workflows/bat.yml +++ b/.github/workflows/bat.yml @@ -58,6 +58,10 @@ jobs: products: Symbolic_Math_Toolbox check-matlab: matlabVer = ver('matlab'); assert(~isempty(matlabVer)); check-toolbox: symbolicVer = ver('symbolic'); assert(~isempty(symbolicVer)); + - os: macos-14 + release: R2023a + check-matlab: matlabVer = ver('matlab'); assert(strcmp(matlabVer.Release,'(R2023a)')); + check-toolbox: symbolicVer = ver('symbolic'); assert(strcmp(symbolicVer.Release,'(R2023a)')); steps: - uses: actions/download-artifact@v4 with: diff --git a/src/install.ts b/src/install.ts index 6d4b0df..2fc83be 100644 --- a/src/install.ts +++ b/src/install.ts @@ -23,6 +23,9 @@ export async function install(platform: string, architecture: string, release: s if (releaseInfo.name < "r2020b") { return Promise.reject(Error(`Release '${releaseInfo.name}' is not supported. Use 'R2020b' or a later release.`)); } + if (platform === "darwin" && architecture === "arm64" && releaseInfo.name < "r2023b") { + architecture = "x86"; + } await core.group("Preparing system for MATLAB", async () => matlab.installSystemDependencies(platform, architecture, releaseInfo.name)