matlab-actions / setup-matlab

Set up your GitHub Actions workflow with a specific version of MATLAB.
BSD 3-Clause "New" or "Revised" License
77 stars 12 forks source link

[BUG] cannot install on macOS latest with version 2.1.1 and matlab R2021a #111

Closed Remi-Gau closed 6 months ago

Remi-Gau commented 6 months ago

See workflow output here: https://github.com/Remi-Gau/matlab_set_up/actions/runs/8966423110

Other combinations I have tested seem fine for that action.

Tested with:

---
name: 'matlab: tests'

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

on:
  push:
    branches:
    - main
  pull_request:
    branches: ['*']

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

jobs:
  test:

    strategy:
      fail-fast: false
      matrix:
        version: [R2021a, R2023a]
        os: [ubuntu-latest, macos-latest, windows-latest]

    runs-on: ${{matrix.os}}

    steps:

    - name: Install MATLAB
      uses: matlab-actions/setup-matlab@v2.1.1
      with:
        release: ${{matrix.version}}

Raw log of failures

2024-05-06T08:43:17.8523510Z Current runner version: '2.316.0'
2024-05-06T08:43:17.8542850Z ##[group]Operating System
2024-05-06T08:43:17.8543300Z macOS
2024-05-06T08:43:17.8543560Z 14.4.1
2024-05-06T08:43:17.8543820Z 23E224
2024-05-06T08:43:17.8544090Z ##[endgroup]
2024-05-06T08:43:17.8544400Z ##[group]Runner Image
2024-05-06T08:43:17.8544740Z Image: macos-14-arm64
2024-05-06T08:43:17.8545060Z Version: 20240422.3
2024-05-06T08:43:17.8545820Z Included Software: https://github.com/actions/runner-images/blob/macos-14-arm64/20240422.3/images/macos/macos-14-arm64-Readme.md
2024-05-06T08:43:17.8546840Z Image Release: https://github.com/actions/runner-images/releases/tag/macos-14-arm64%2F20240422.3
2024-05-06T08:43:17.8547470Z ##[endgroup]
2024-05-06T08:43:17.8547780Z ##[group]Runner Image Provisioner
2024-05-06T08:43:17.8548210Z 2.0.369.1+55cddbb57f254a369b6e7b3b508cebdbee5d24be
2024-05-06T08:43:17.8548640Z ##[endgroup]
2024-05-06T08:43:17.8549350Z ##[group]GITHUB_TOKEN Permissions
2024-05-06T08:43:17.8550220Z Contents: read
2024-05-06T08:43:17.8550550Z Metadata: read
2024-05-06T08:43:17.8550850Z Packages: read
2024-05-06T08:43:17.8551200Z ##[endgroup]
2024-05-06T08:43:17.8553080Z Secret source: Actions
2024-05-06T08:43:17.8553470Z Prepare workflow directory
2024-05-06T08:43:17.9014550Z Prepare all required actions
2024-05-06T08:43:17.9115390Z Getting action download info
2024-05-06T08:43:18.0531910Z Download action repository 'matlab-actions/setup-matlab@v2.1.1' (SHA:63fa229806aa98007d182e8a09827d2873d1a6d8)
2024-05-06T08:43:19.4411980Z Complete job name: test (R2021a, macos-latest)
2024-05-06T08:43:19.5089210Z ##[group]Run matlab-actions/setup-matlab@v2.1.1
2024-05-06T08:43:19.5089790Z with:
2024-05-06T08:43:19.5090110Z   release: R2021a
2024-05-06T08:43:19.5090440Z   cache: false
2024-05-06T08:43:19.5090770Z ##[endgroup]
2024-05-06T08:43:19.8565560Z ##[group]Preparing system for MATLAB
2024-05-06T08:43:21.3740680Z [command]/usr/bin/sudo installer -pkg /Users/runner/work/_temp/jdk.pkg -target /
2024-05-06T08:43:23.3952190Z installer: Package name is Amazon Corretto 8
2024-05-06T08:43:23.3984220Z installer: Installing at base path /
2024-05-06T08:43:23.3984990Z installer: The install was successful.
2024-05-06T08:43:23.3986030Z ##[endgroup]
2024-05-06T08:43:23.3986540Z ##[group]Setting up MATLAB
2024-05-06T08:43:23.4004730Z [command]/usr/bin/sudo launchctl limit maxfiles 65536 200000
2024-05-06T08:43:24.9935240Z [command]/bin/chmod +x /Users/runner/work/_temp/mpm
2024-05-06T08:43:24.9972920Z [command]/Users/runner/work/_temp/mpm install --release=r2021a --destination=/Users/runner/hostedtoolcache/MATLAB/2021.1.999/arm64/MATLAB.app --products MATLAB
2024-05-06T08:43:27.6039590Z Installing with the following parameters:
2024-05-06T08:43:27.6043490Z --destination=/Users/runner/hostedtoolcache/MATLAB/2021.1.999/arm64/MATLAB.app
2024-05-06T08:43:27.6068200Z --doc=false
2024-05-06T08:43:27.6069990Z --release=R2021a
2024-05-06T08:43:27.6071180Z --products=MATLAB
2024-05-06T08:43:27.6072240Z ---------------------------------------------
2024-05-06T08:43:38.4565960Z Error: Unable to find installation candidates for these products:
2024-05-06T08:43:38.4567430Z MATLAB
2024-05-06T08:43:38.4813290Z ##[endgroup]
2024-05-06T08:43:38.4857990Z ##[error]Error: The process '/Users/runner/work/_temp/mpm' failed with exit code 255
2024-05-06T08:43:38.5235890Z Cleaning up orphan processes
mcafaro commented 6 months ago

Hi @Remi-Gau , thanks for reporting this issue. macos-latest now resolves to macos-14, which are Apple silicon runners. The first release of MATLAB that natively supports Apple silicon Macs is R2023b. To test against earlier MATLAB releases you need to specify an Intel-based runner (macos-13 or below).

I have created an issue for us to consider installing the Intel-based version of MATLAB when requesting a release prior to R2023b on an Apple silicon runner.

Remi-Gau commented 6 months ago

ha cool thanks!!

probably worth adding a note in the README

I can PR that quickly if you want

Remi-Gau commented 6 months ago

Can also do that for : https://github.com/matlab-actions/run-command/issues/59

mcafaro commented 6 months ago

setup-matlab@v2.2.0 now automatically installs an Intel version of MATLAB when a release prior to R2023b is requested on an Apple silicon runner.

Remi-Gau commented 6 months ago

thanks