Skip to content

Commit 8dcdf43

Browse files
authored
adding an example about virtual display
1 parent 99cca12 commit 8dcdf43

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

overview.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,25 @@ steps:
125125
MLM_LICENSE_TOKEN: $(myToken)
126126
```
127127

128+
### Use Virtual Display on Linux Agent
129+
Microsoft-hosted Linux® agents do not provide a display. To run MATLAB code that requires a display, such as tests that interact with an app UI, first set up a virtual display on the agent by starting an Xvfb display server. For example, set up a virtual server to run the tests for an app created in MATLAB.
130+
131+
```YAML
132+
pool:
133+
vmImage: ubuntu-latest
134+
steps:
135+
- script: |
136+
sudo apt-get install -y xvfb
137+
Xvfb :99 &
138+
echo "##vso[task.setVariable variable=DISPLAY]:99"
139+
displayName: Start virtual display server
140+
condition: eq(variables['Agent.OS'],'Linux')
141+
- task: InstallMATLAB@1
142+
- task: RunMATLABTests@1
143+
```
144+
128145
### Build Across Multiple Platforms
129-
The **Install MATLAB** task supports the Linux®, Windows®, and macOS platforms. Use a `matrix` job strategy to run a build using the MATLAB build tool on all the supported platforms. This pipeline runs three jobs.
146+
The **Install MATLAB** task supports the Linux, Windows®, and macOS platforms. Use a `matrix` job strategy to run a build using the MATLAB build tool on all the supported platforms. This pipeline runs three jobs.
130147

131148
```YAML
132149
strategy:

0 commit comments

Comments
 (0)