Test visualisation demos #1514
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
fenicsx-refs: | |
uses: ./.github/workflows/fenicsx-refs.yml | |
pyvista: | |
runs-on: ubuntu-latest | |
needs: fenicsx-refs | |
container: ghcr.io/fenics/test-env:current-openmpi | |
env: | |
# For pyvista/pyvistaqt | |
DISPLAY: ":99.0" | |
PYVISTA_OFF_SCREEN: true | |
PYVISTA_QT_VERSION: 0.11.1 | |
PYVISTA_VERSION: 0.44.1 | |
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: [linux-gnu-real64-32, linux-gnu-complex128-32] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install FEniCS Python components | |
run: | | |
python -m pip install git+https://github.com/fenics/ufl.git@${{ needs.fenicsx-refs.outputs.ufl_ref }} | |
python -m pip install git+https://github.com/fenics/basix.git@${{ needs.fenicsx-refs.outputs.basix_ref }} | |
python -m pip install git+https://github.com/fenics/ffcx.git@${{ needs.fenicsx-refs.outputs.ffcx_ref }} | |
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 | |
pip install pyvista==${PYVISTA_VERSION} | |
pip install pyqt5 pyvistaqt==${PYVISTA_QT_VERSION} | |
pip install --no-build-isolation -r python/build-requirements.txt | |
- 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/[test]' | |
- name: Run pyvista demos (Python, serial) | |
run: | | |
pip install pytest-xdist | |
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 |