-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to gadopt-restructure version of tutorials
- Loading branch information
Showing
14 changed files
with
2,508 additions
and
967 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
name: Test notebook execution | ||
name: Test and deploy notebooks | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Test notebook execution | ||
name: Test and deploy notebooks | ||
runs-on: self-hosted | ||
container: | ||
image: firedrakeproject/firedrake:latest | ||
|
@@ -19,7 +19,7 @@ jobs: | |
- uses: actions/checkout@v3 | ||
|
||
- name: Load pyrol wheel from cache | ||
uses: actions/cache@v3 | ||
uses: actions/cache/restore@v3 | ||
id: cache-pyrol | ||
with: | ||
path: /tmp/wheels | ||
|
@@ -28,16 +28,47 @@ jobs: | |
- name: Build pyrol wheel | ||
if: steps.cache-pyrol.outputs.cache-hit != 'true' | ||
run: | | ||
/home/firedrake/firedrake/bin/pip wheel -r git+https://github.com/angus-g/[email protected] -w /tmp/wheels | ||
/home/firedrake/firedrake/bin/pip wheel git+https://github.com/angus-g/[email protected] -w /tmp/wheels | ||
- name: Install Python dependencies | ||
- 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 | ||
python3 -m pip install git+https://github.com/g-adopt/g-adopt@adjoint-cases-testing | ||
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 |
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
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
Oops, something went wrong.