matlab-actions / run-build

Run a build using the MATLAB build tool.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support the equivalent of working-directory for run-tests and run-build

acampbel opened this issue · comments

The run step has a working-directory option. We have receive customer feedback that the lack of this options preventing the use of actions like run-tests and run-build

Just hit this as well - this this would be really useful.

Just hit this as well - this this would be really useful.

Hi Richard,

Can you share the repository structure or use case you were trying to support? A link to the repo and where you would've liked to put the buildfile or call buildtool from would help with context. I am curious if this is something impacts both local buildtool and CI workflows.

Thanks,
David

David,

The repo I was thinking of was https://github.com/mathworks/Machine-Learning-with-MATLAB-and-Amazon-Sagemaker-Demo

This repo has multiple parts with different languages and technologies so putting the buildfile down one level in a subfolder was my first thought.

Here is another project looking for this functionality:

https://github.com/ebenetce/SDMX

It feels like a bug (or at least an xbug) that specifying -sd subfolder as a startup option does not work as expected.

I would expect this to print the path of the subfolder but it prints the path of the workspace folder.

- name: Run in subfolder
  uses: matlab-actions/run-command@v1
  with:
    command: pwd
    startup-options: -sd subfolder

It feels like a bug (or at least an xbug) that specifying -sd subfolder as a startup option does not work as expected.

I would expect this to print the path of the subfolder but it prints the path of the workspace folder.

- name: Run in subfolder
  uses: matlab-actions/run-command@v1
  with:
    command: pwd
    startup-options: -sd subfolder

Agreed, I tried that as well. The script invoking buildtool is explicitly cding to the root of the repo.

The -sd startup option now works as expected in all run-*@v2 tasks. You can use -sd to change the working directory for run-command, run-tests and run-build.