setup-matlab icon indicating copy to clipboard operation
setup-matlab copied to clipboard

Document `matlabroot` output

Open externl opened this issue 1 year ago • 2 comments

It would be convenient to have an option to export the configured MATLAB install directory as an environment variable. It's useful when linking against MATLALB when developing an add-on. AFAICT, right now you kinda have to guess (on Linux at least).

MATLAB 2023b is located at /opt/hostedtoolcache/MATLAB/2023.2.999/x64

externl avatar Apr 25 '24 13:04 externl

The action has a matlabroot output that contains the path to the MATLAB root folder.

- name: Setup MATLAB
  id: setup-matlab
  uses: matlab-actions/setup-matlab@v2

- name: Print MATLAB root folder directly
  run: echo ${{ steps.setup-matlab.outputs.matlabroot }}

- name: Print MATLAB root folder from env var
  env:
    MATLAB_ROOT: ${{ steps.setup-matlab.outputs.matlabroot }}
  run: echo $MATLAB_ROOT

I will keep this issue open as a reminder for us to document this output.

mcafaro avatar Apr 25 '24 14:04 mcafaro

Thanks @mcafaro, that's exactly what I'm looking for!

externl avatar Apr 25 '24 14:04 externl