matlab-actions / setup-matlab

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

Setup with display for GUI testing? #51

Closed peterson-tim-j closed 2 months ago

peterson-tim-j commented 1 year ago

Hi, great work building these packages! Thanks.

I'm trying to use it to run GitHub hosted Actions testing of my package HydroSight. However, the tests are failing because my package uses graphical features and setup-matlab appears to start matlab with '-nodisplay'.

Given that my package is heavily dependent upon a range of graphical features, is there any way to change matlab-actions/setup-matlab to enable the graphical environment?

FYI, if relevant my .yml testing file is here.

mcafaro commented 1 year ago

Hi Tim,

GitHub-hosted runners currently require '-nodisplay'. We would like to remove this restriction in the future but at the moment you need to use a self-hosted runner to test features that require access to a display.

Best, Mark

peterson-tim-j commented 1 year ago

Hi Mark,

Thanks for the reply. Good to hear to that removing the -nodisplay restriction is on your radar.

Re solutions, unfortunately I'm very unlikely to be able to run a self-hosted runner for my public repo because of the security risks to my university. I see here that there are other CI systems that support Matlab. Do you happen to know if any support testing of graphical outputs?

Thanks, Tim

mcafaro commented 1 year ago

All of the service-hosted runners are currently restricted to -nodisplay.

acampbel commented 1 year ago

@peterson-tim-j we plan to build this into the actions, but in the meantime take a look at this repository to see how you can setup a virtual display. Note you can set up a virtual display like this for any release, but there were specific changes in R2023b to enable the MATLAB actions to be able to leverage it so that release is needed.

mcafaro commented 2 months ago

GUI testing is supported in more recent versions of the actions (-nodisplay is no longer required), so I am going to close this issue as complete. As @acampbel mentioned, you still need to set up a virtual display because GitHub-hosted Linux runners do not have a display by default.