Skip to content

Test visualisation demos #253

Test visualisation demos

Test visualisation demos #253

Workflow file for this run

name: Test visualisation demos
on:
# Uncomment the below to trigger tests on push
# push:
# branches:
# - "**"
schedule:
# '*' is a special character in YAML, so string must be quoted
- cron: "0 1 * * *"
workflow_dispatch: ~
jobs:
pyvista:
if: "!(contains(github.event.head_commit.message, '[ci skip]') || contains(github.event.head_commit.message, '[skip ci]'))"
runs-on: ubuntu-latest
container: ghcr.io/fenics/test-env:current-openmpi
env:
# For pyvista/pyvistaqt
DISPLAY: ":99.0"
PYVISTA_OFF_SCREEN: true
PYVISTA_QT_VERSION: 0.11.0
PYVISTA_VERSION: 0.43.10
QT_DEBUG_PLUGINS: 1
PETSC_ARCH: ${{ matrix.petsc_arch }}
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
strategy:
matrix:
# petsc_arch: [real, complex]
petsc_arch: [linux-gnu-real64-32, linux-gnu-complex128-32]
steps:
- uses: actions/checkout@v4
- name: Install FEniCS Python components
run: |
python3 -m pip install git+https://github.com/FEniCS/ufl.git
python3 -m pip install git+https://github.com/FEniCS/basix.git
python3 -m pip install git+https://github.com/FEniCS/ffcx.git
apt-get update
apt-get install -y --no-install-recommends libgl1-mesa-dev xvfb # pyvista
apt-get install -y --no-install-recommends libqt5gui5t64 libgl1 # pyvistaqt
python3 -m pip install pyvista==${PYVISTA_VERSION}
python3 -m pip install pyqt5 pyvistaqt==${PYVISTA_QT_VERSION}
python3 -m pip install matplotlib ipython nanobind scikit-build-core[pyproject] pytest pytest-xdist scipy numba
- name: Configure C++
run: cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build -S cpp/
- name: Build and install C++ library
run: |
cmake --build build
cmake --install build
- name: Build Python interface
run: pip -v install --check-build-dependencies --config-settings=build-dir="build" --config-settings=cmake.build-type="Debug" --no-build-isolation python/
- name: Run pyvista demos (Python, serial)
run: python3 -m pytest -v -n 2 -m serial --durations=10 python/demo/test.py
- name: Run pyvista demos (Python, MPI (np=2))
run: python3 -m pytest -v -m mpi --num-proc=2 python/demo/test.py