Skip to content

Commit

Permalink
Fix missing Qt on headless CI (#864)
Browse files Browse the repository at this point in the history
* Fix Qt xcb error as [documented by conda-forge FAQ](https://conda-forge.org/docs/maintainer/maintainer_faq.html#mfaq-qt-load-xcb)

* Remove xvfb and DISPLAY

    Shouldn't be needed with `QT_QPA_PLATFORM=offscreen`?

* Fixes #862
  • Loading branch information
guyer committed May 13, 2022
1 parent 8660fcf commit a05bf61
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions .azure/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,6 @@ stages:
conda env export --name myEnvironment
displayName: Environment
- bash: |
# lack of display causes tests to abort at VtkViewer
# Workaround @ http://docs.enthought.com/mayavi/mayavi/tips.html#rendering-using-the-virtual-framebuffer
# and https://github.com/wpilibsuite/RobotBuilder/blob/main/azure-pipelines.yml
sudo apt-get update
sudo apt-get --yes install xvfb
Xvfb :10 &
displayName: 'Install and start xvfb'
condition: startsWith(variables.image, 'ubuntu')
- bash: |
source activate myEnvironment
python setup.py install
Expand All @@ -202,7 +192,7 @@ stages:
FIPY_SOLVERS: $(FIPY_SOLVERS)
MPIRUN: $(MPIRUN)
OMP_NUM_THREADS: 1
DISPLAY: ':10'
QT_QPA_PLATFORM: offscreen
displayName: Test
- stage: Package
Expand Down Expand Up @@ -301,16 +291,6 @@ stages:
displayName: Build package
condition: startsWith(variables.image, 'windows')
- bash: |
# lack of display causes tests to abort at VtkViewer
# Workaround @ http://docs.enthought.com/mayavi/mayavi/tips.html#rendering-using-the-virtual-framebuffer
# and https://github.com/wpilibsuite/RobotBuilder/blob/main/azure-pipelines.yml
sudo apt-get update
sudo apt-get --yes install xvfb
Xvfb :10 &
displayName: 'Install and start xvfb'
condition: startsWith(variables.image, 'ubuntu')
- bash: |
source activate myEnvironment
FIPY_VERSION=`python setup.py --version`
Expand All @@ -323,7 +303,7 @@ stages:
cd ..
python -c "import fipy; fipy.test()"
env:
DISPLAY: ':10'
QT_QPA_PLATFORM: offscreen
displayName: Test package
condition: startsWith(variables.image, 'ubuntu')
Expand Down

0 comments on commit a05bf61

Please sign in to comment.