11name : ' setup-headless-display-action'
22description : ' Setup a headless display on Linux and Windows'
33author : PyVista Developers'
4+ inputs :
5+ pyvista :
6+ description : " Set PyVista env vars for headless mode"
7+ required : false
8+ default : true
9+ qt :
10+ description : " Install libraries required for Qt on Linux"
11+ required : false
12+ default : false
413branding :
514 icon : ' monitor'
615 color : ' blue'
716runs :
817 using : " composite"
918 steps :
10- - name : Install Linux GL Dependencies
19+
20+ - name : Install Linux dependencies
1121 if : runner.os == 'Linux'
1222 shell : bash
13- run : sudo apt-get update && sudo apt-get install libgl1-mesa-glx xvfb -y
23+ # TODO: Pyvista uses `xset` which is part of x11-xserver-utils, maybe a better way to check?
24+ run : sudo apt update && sudo apt install libgl1-mesa-glx xvfb x11-xserver-utils -y
25+
26+ - name : Install Linux Qt dependencies
27+ if : runner.os == 'Linux' && inputs.qt != 'false'
28+ shell : bash
29+ run : sudo apt install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 libegl1 libosmesa6 mesa-utils libxcb-shape0
1430
1531 - name : Install Windows GL Dependencies
1632 if : runner.os == 'Windows'
@@ -28,19 +44,15 @@ runs:
2844 export DISPLAY=:99.0
2945 echo "DISPLAY=:99.0" >> $GITHUB_ENV
3046 Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
31-
32- - name : Give xvfb some time to start on Linux
33- if : runner.os == 'Linux'
34- shell : bash
35- run : sleep 3
47+ sleep 3
3648
3749 - name : Configure for PyVista on Linux and macOS
38- if : runner.os != 'Windows'
50+ if : runner.os != 'Windows' && inputs.pyvista != 'false'
3951 shell : bash
4052 run : echo "PYVISTA_OFF_SCREEN=true" >> $GITHUB_ENV
4153
4254 - name : Configure for PyVista on Windows
43- if : runner.os == 'Windows'
55+ if : runner.os == 'Windows' && inputs.pyvista != 'false'
4456 shell : powershell
4557 run : |
4658 chcp 65001 #set code page to utf-8
0 commit comments