matlab-actions / setup-matlab

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

MATLAB won't start on R2020b and R2021a Windows runners (v2-beta) #76

Closed H0R5E closed 8 months ago

H0R5E commented 10 months ago

Hi, we were having some trouble with testing Windows runners for R2020b and R2021a with the v2-beta version of setup-matlab. For some reason, they won't start up properly when using the run-command action. The step just hangs until timeout.

I created a repository to demonstrate the issue. You can see the workflow here and the failed runs here.

Any help greatly appreciated, as always!

mcafaro commented 10 months ago

Thanks for the report @H0R5E. We are looking into it.

H0R5E commented 8 months ago

@mcafaro, I'm just checking to see if there is any update on this one?

Many thanks,

Mat

H0R5E commented 8 months ago

Just to note, I seem to be having some similar issues with R2023b, but this is more intermittent than with the versions reported in this issue.

See this run for example.

EDIT: This was fixed for R2023b after I removed the command savepath pathdef.m. So I guess this is a different issue, maybe?

H0R5E commented 8 months ago

Never mind! Seems to be fixed!

Thanks for your help,

Mat

acampbel commented 8 months ago

Note, that at least for 20b, there is an issue on windows where it does not produce any log output. You can see for example that your hello world output never got to the GitHub log even though it ran successfully.

This is unfortunate, but not likely to change as it requires large changes to 20b to make that a reality.

In the context of CI, this may look like a stall if you are running a long MATLAB session doing "real" work. For 21a though I would not expect this problem. Let us know if this happens in the future.

H0R5E commented 8 months ago

Note, that at least for 20b, there is an issue on windows where it does not produce any log output.

Yeah, I guess this will be a problem if we are trying to diagnose a 2020b specific failure. We'll see how it goes.

mcafaro commented 8 months ago

One potential workaround is to use the -logfile startup option and print out the log file after MATLAB runs, as shown:

- name: Run MATLAB command
  uses: matlab-actions/run-command@v1
  with:
    command: disp('hello world'); error('BAM!');
    startup-options: -logfile matlab.log

- name: Print matlab.log
  if: success() || failure()
  run: cat matlab.log