Skip to content

Temporary Mesa downgrade for rendering #57

Temporary Mesa downgrade for rendering

Temporary Mesa downgrade for rendering #57

Workflow file for this run

name: build
on:
push:
branches:
- main
workflow_dispatch:
permissions:
pages: write
contents: read
id-token: write
jobs:
render:
runs-on: self-hosted
container:
image: firedrakeproject/firedrake:latest
options: --shm-size 2g
env:
OMP_NUM_THREADS: 1
steps:
- uses: actions/checkout@v4
with:
repository: g-adopt/g-adopt
path: tutorials
- name: Make previous version of Mesa available
run: |
sed 's/noble/mantic/g' /etc/apt/sources.list.d/ubuntu.sources | sudo tee /etc/apt/sources.list.d/mantic.sources > /dev/null
sudo apt update
sudo apt remove -y libx11-6
sudo apt -t mantic install -y --allow-downgrades libglx-mesa0=23.2.1-1ubuntu3.1 libglapi-mesa=23.2.1-1ubuntu3.1 libgl1-mesa-dri=23.2.1-1ubuntu3.1 libx11-6=2:1.8.6-1ubuntu1
- name: Install dependencies
run: |
sudo apt install -y xvfb gmsh
. /home/firedrake/firedrake/bin/activate
python3 -m pip install nbval nbconvert jupytext
python3 -m pip install tutorials/[demos]
python3 -m ipykernel install --name firedrake --user
- name: Convert notebooks
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
make -j -C tutorials convert_demos
rm -rf rendered && mkdir rendered
find tutorials/demos -name '*.ipynb' -exec cp "{}" rendered \;
cp tutorials/demos/.pages rendered
cp tutorials/demos/.diagram.mermaid rendered
env:
GADOPT_LOGLEVEL: WARN
- uses: actions/upload-artifact@v4
continue-on-error: true
with:
name: notebooks
path: rendered
build:
runs-on: ubuntu-latest
needs: render
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
cache: pip
- name: Install Python dependencies
run: |
pip install -r requirements.txt
- name: Clone G-ADOPT for API documentation
uses: actions/checkout@v4
with:
repository: g-adopt/g-adopt
path: g-adopt
- uses: actions/download-artifact@v4
with:
name: notebooks
path: docs/tutorials
- name: Build site
run: |
mkdocs build --clean
- uses: actions/upload-pages-artifact@v3
with:
path: site
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
steps:
- uses: actions/deploy-pages@v4