Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose the root directory of MATLAB #62

Closed
zaikunzhang opened this issue Mar 21, 2023 · 2 comments
Closed

Choose the root directory of MATLAB #62

zaikunzhang opened this issue Mar 21, 2023 · 2 comments

Comments

@zaikunzhang
Copy link

zaikunzhang commented Mar 21, 2023

Is it possible to provide an option that supports a user-defined root directory of MATLAB?

In my project, I would like to modify the xml files under 'mexopts', which is read only. In addition, GitHub actions do not support chmod.

Thank you for your consideration.

@mcafaro
Copy link
Member

mcafaro commented Mar 21, 2023

You can modify the MATLAB root with setup-matlab@v2-beta, as shown:

name: Run MATLAB Build on GitHub-Hosted Runner
on: [push]
jobs:
  my-job:
    name: Run MATLAB Build
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository
        uses: actions/checkout@v3
      - name: Set up MATLAB
        id: set-up-matlab
        uses: matlab-actions/setup-matlab@v2-beta
      - name: Add file to mexopts folder
        run: touch ${{steps.set-up-matlab.outputs.matlabroot}}/bin/glnxa64/mexopts/my_mexopts.xml
      - name: List files in mexopts folder
        run: ls ${{steps.set-up-matlab.outputs.matlabroot}}/bin/glnxa64/mexopts

Because of the way setup-matlab@v1 works, it is not possible to modify the MATLAB root folder even if we support specifying a user-defined location.

@zaikunzhang
Copy link
Author

@mcafaro Thank you! It works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants