diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 47dde97..0faea78 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -13,6 +13,7 @@ integration-tests: &integration-tests orb-tools/pack, integration-test-install, integration-test-install-release, + integration-test-install-release-macos-intel-on-arm, integration-test-run-command, integration-test-run-tests ] @@ -60,14 +61,16 @@ jobs: parameters: executor: type: executor + release: + type: string executor: <> steps: - checkout - matlab/install: - release: "R2023bU1" + release: <> no-output-timeout: 30m - matlab/run-command: - command: "assert(strcmp(version('-release'),'2023b') && strcmp(version('-description'),'Update 1'))" + command: "exp='<>'; assert(strcmp(version('-release'),exp(2:6)))" integration-test-run-command: parameters: @@ -466,6 +469,12 @@ workflows: matrix: parameters: executor: [linux, windows, macos, macos-arm] + release: [R2023bU1] + + - integration-test-install-release: + name: integration-test-install-release-macos-intel-on-arm + executor: macos-arm + release: R2023aU1 - integration-test-run-command: matrix: diff --git a/src/scripts/install.sh b/src/scripts/install.sh index b58388e..3dd2d7e 100644 --- a/src/scripts/install.sh +++ b/src/scripts/install.sh @@ -57,11 +57,16 @@ if [[ $os = Linux ]]; then wget \ unzip \ ca-certificates" -elif [[ $os = Darwin && $arch == arm64 ]]; then - # install Java runtime - jdkpkg="$tmpdir/jdk.pkg" - curl -sfL https://corretto.aws/downloads/latest/amazon-corretto-8-aarch64-macos-jdk.pkg -o $jdkpkg - sudoIfAvailable -c "installer -pkg $jdkpkg -target /" +elif [[ $os = Darwin && $arch = arm64 ]]; then + if [[ $mpmrelease < "r2023b" ]]; then + # install Rosetta 2 + sudoIfAvailable -c "softwareupdate --install-rosetta --agree-to-license" + else + # install Java runtime + jdkpkg="$tmpdir/jdk.pkg" + curl -sfL https://corretto.aws/downloads/latest/amazon-corretto-8-aarch64-macos-jdk.pkg -o $jdkpkg + sudoIfAvailable -c "installer -pkg $jdkpkg -target /" + fi fi # set os specific options @@ -72,7 +77,7 @@ if [[ $os = CYGWIN* || $os = MINGW* || $os = MSYS* ]]; then mpmdir=$(cygpath "$mpmdir") batchdir=$(cygpath "$batchdir") elif [[ $os = Darwin ]]; then - if [[ $arch == arm64 ]]; then + if [[ $arch = arm64 && ! $mpmrelease < "r2023b" ]]; then mwarch="maca64" else mwarch="maci64"