Skip to content

Update tutorials to G-ADOPT #33

Update tutorials to G-ADOPT

Update tutorials to G-ADOPT #33

Workflow file for this run

name: Test and deploy notebooks
on:
pull_request:
workflow_dispatch:
jobs:
build:
name: Test and deploy notebooks
runs-on: self-hosted
container:
image: firedrakeproject/firedrake:latest
options: --shm-size 2g
env:
OMP_NUM_THREADS: 1
steps:
- uses: actions/checkout@v3
- name: Load pyrol wheel from cache
uses: actions/cache/restore@v3
id: cache-pyrol
with:
path: /tmp/wheels
key: pyrol
- name: Build pyrol wheel
if: steps.cache-pyrol.outputs.cache-hit != 'true'
run: |
/home/firedrake/firedrake/bin/pip wheel git+https://github.com/angus-g/[email protected] -w /tmp/wheels
- name: Save pyrol to cache
if: steps.cache-pyrol.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: /tmp/wheels
key: pyrol
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y libgl1-mesa-glx xvfb
. /home/firedrake/firedrake/bin/activate
python3 -m pip install --no-index -f /tmp/wheels pyroltrilinos
python3 -m pip install nbval pyvista
python3 -m pip install git+https://github.com/g-adopt/g-adopt
- name: Run test
run: |
. /home/firedrake/firedrake/bin/activate
export DISPLAY=:99
export PYVISTA_OFF_SCREEN=true
Xvfb $DISPLAY -screen 0 1024x768x24 > /dev/null 2>&1 &
sleep 3
pytest --nbval *.ipynb
- name: Build Jupyter Book
run: |
. /home/firedrake/firedrake/bin/activate
python3 -m pip install jupyter-book
for f in *.ipynb; do ln -s ../$f docs; done
ln -s ../stokes-control.msh docs
export DISPLAY=:99
export PYVISTA_OFF_SCREEN=true
Xvfb $DISPLAY -screen 0 1024x768x24 > /dev/null 2>&1 &
sleep 3
jupyter-book build docs
- name: Archive built book
uses: actions/upload-artifact@v3
with:
name: tutorials-html
path: docs/_build/html