Skip to content

Commit 4119762

Browse files
authored
Use PyVista headless display action (#825)
Use the PyVista - provided action to configure a headless display, instead of manually installing / using `xvfb` and the `LIBGL_ALWAYS_SOFTWARE` environment variable.
1 parent 640f22d commit 4119762

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/ci_cd.yml

+11-9
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,10 @@ jobs:
386386
- name: Install OS packages
387387
run: |
388388
sudo apt update
389-
sudo apt-get install pandoc xvfb
389+
sudo apt-get install pandoc
390+
391+
- name: Set up headless display
392+
uses: pyvista/setup-headless-display-action@48066dd0b79cf46babc16223a1dce3aa4803ec43 # v4.0
390393

391394
- name: Configure Local Product Launcher for ACP
392395
working-directory: tests/unittests
@@ -405,13 +408,12 @@ jobs:
405408
run: |
406409
docker pull $IMAGE_NAME
407410
docker pull ghcr.io/ansys/tools-filetransfer:latest
408-
xvfb-run poetry run make -C doc doctest
411+
poetry run make -C doc doctest
409412
env:
410413
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
411414
IMAGE_NAME: ${{ env.DOCKER_IMAGE_NAME }}
412415
PYACP_DOC_SKIP_GALLERY: "true"
413416
PYACP_DOC_SKIP_API: "true"
414-
LIBGL_ALWAYS_SOFTWARE: 1
415417

416418
docs:
417419
name: Build Documentation
@@ -448,7 +450,10 @@ jobs:
448450
- name: Install OS packages
449451
run: |
450452
sudo apt update
451-
sudo apt-get install pandoc xvfb
453+
sudo apt-get install pandoc
454+
455+
- name: Set up headless display
456+
uses: pyvista/setup-headless-display-action@48066dd0b79cf46babc16223a1dce3aa4803ec43 # v4.0
452457

453458
- name: Install library, with dev group
454459
run: |
@@ -496,7 +501,7 @@ jobs:
496501

497502
- name: Build HTML
498503
run: |
499-
xvfb-run poetry run make -C doc html SPHINXOPTS="-W --keep-going -v $SPHINXOPT_NITPICKY"
504+
poetry run make -C doc html SPHINXOPTS="-W --keep-going -v $SPHINXOPT_NITPICKY"
500505
env:
501506
PYMAPDL_IP: "127.0.0.1"
502507
PYMAPDL_PORT: "50557"
@@ -505,7 +510,6 @@ jobs:
505510
SPHINXOPT_NITPICKY: ${{ matrix.build_type == 'quick' && ' ' || '-n' }}
506511
PYACP_DOC_SKIP_GALLERY: ${{ matrix.build_type == 'quick' && 'true' || 'false' }}
507512
PYACP_DOC_SKIP_API: ${{ matrix.build_type == 'quick' && 'true' || 'false' }}
508-
LIBGL_ALWAYS_SOFTWARE: 1
509513

510514
- name: Stop and clean up MAPDL and DPF servers
511515
run: |
@@ -534,10 +538,8 @@ jobs:
534538
if: ${{ matrix.build_type == 'full' }}
535539

536540
- name: Build PDF Documentation
537-
run: xvfb-run poetry run make -C doc pdf
541+
run: poetry run make -C doc pdf
538542
if: ${{ matrix.build_type == 'full' }}
539-
env:
540-
LIBGL_ALWAYS_SOFTWARE: 1
541543

542544
- name: Upload PDF Documentation
543545
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)