Skip to content

Commit f23637b

Browse files
authored
Fix versions (#98)
1 parent aa6b7ed commit f23637b

File tree

6 files changed

+46
-23
lines changed

6 files changed

+46
-23
lines changed

.github/workflows/build-publish.yml

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# This is a basic workflow to help you get started with Actions
2-
name: Build and publish
2+
name: Test, build and publish
33

44
# Controls when the action will run.
55
on:
6-
# Triggers the workflow on push or pull request events but only for the master branch
76
push:
8-
branches: [dokken/jupyterbook]
7+
branches: ["*"]
98

109
# Allows you to run this workflow manually from the Actions tab
1110
workflow_dispatch:
@@ -17,10 +16,10 @@ on:
1716
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1817
jobs:
1918
# This workflow contains a single job called "build"
20-
build-publish:
19+
test:
2120
# The type of runner that the job will run on
2221
runs-on: ubuntu-latest
23-
container: dokken92/dolfinx_custom:v0.5.0
22+
container: ghcr.io/jorgensd/dolfinx-tutorial:v0.5.1
2423

2524
env:
2625
HDF5_MPI: "ON"
@@ -74,13 +73,37 @@ jobs:
7473
mpirun -n 3 python3 convergence.py
7574
mpirun -n 3 python3 compiler_parameters.py
7675
76+
build-book:
77+
# The type of runner that the job will run on
78+
runs-on: ubuntu-latest
79+
container: ghcr.io/jorgensd/dolfinx-tutorial:v0.5.1
80+
81+
env:
82+
HDF5_MPI: "ON"
83+
CC: mpicc
84+
HDF5_DIR: "/usr/local/"
85+
DISPLAY: ":99.0"
86+
PYVISTA_OFF_SCREEN: false
87+
PYVISTA_JUPYTER_BACKEND: "static"
88+
89+
# Steps represent a sequence of tasks that will be executed as part of the job
90+
steps:
91+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
92+
- uses: actions/checkout@v2
7793
# Runs a single command using the runners shell
7894
- name: Build the book
79-
run: |
80-
PYVISTA_JUPYTER_BACKEND=static PYVISTA_OFF_SCREEN=false jupyter-book build -W .
95+
run:
96+
jupyter-book build -W .
97+
98+
publish:
99+
runs-on: ubuntu-latest
100+
101+
if: github.ref == 'refs/heads/dokken/jupyter-book'
102+
needs: [build-book]
103+
steps:
81104
# Push book to HTML to github pages
82-
- name: GitHub Pages action
83-
uses: peaceiris/[email protected]
84-
with:
85-
github_token: ${{ secrets.GITHUB_TOKEN }}
86-
publish_dir: ./_build/html
105+
- name: GitHub Pages action
106+
uses: peaceiris/[email protected]
107+
with:
108+
github_token: ${{ secrets.GITHUB_TOKEN }}
109+
publish_dir: ./_build/html

.github/workflows/nightly.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# This is a basic workflow to help you get started with Actions
2-
name: Test against DOLFINx nightly build
2+
name: Test release branch against DOLFINx nightly build
33

44
# Controls when the action will run.
55
on:
66
# Triggers the workflow on push or pull request events but only for the master branch
77
push:
8-
branches: [dokken/jupyterbook]
9-
pull_request:
10-
branches:
11-
- dokken/jupyterbook
8+
branches: [dokken/release]
9+
# pull_request:
10+
# branches:
11+
# - dokken/jupyterbook
1212

1313
# Allows you to run this workflow manually from the Actions tab
1414
workflow_dispatch:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM dokken92/dolfinx_custom:v0.5.0
1+
FROM ghcr.io/jorgensd/dolfinx-tutorial:v0.5.1
22

33
# create user with a home directory
44
ARG NB_USER

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Any code added to the tutorial should work in parallel.
1717
Alternatively, if you want to add a separate chapter, a Jupyter notebook can be added to a pull request, without integrating it into the tutorial. If so, the notebook will be reviewed and modified to be included in the tutorial.
1818

1919
# Docker images
20-
Docker images for this tutorial can be found at [Docker hub](https://hub.docker.com/repository/docker/dokken92/dolfinx_custom)
20+
Docker images for this tutorial can be found in the [packages tab](https://github.com/jorgensd/dolfinx-tutorial/pkgs/container/dolfinx-tutorial)
2121

2222
Additional requirements on top of the `dolfinx/lab:nightly` images can be found at [Dockerfile](docker/Dockerfile) and [requirements.txt](docker/requirements.txt)
2323

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM dolfinx/lab:v0.5.0
1+
FROM dolfinx/lab:v0.5.1
22

33
WORKDIR /tmp/
44

fem.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ Docker is a software that uses *containers* to supply software across different
3333
All notebooks can be converted to python files using [nbconvert](https://nbconvert.readthedocs.io/en/latest/).
3434

3535
### Tutorial compatible docker images
36-
The tutorial uses several dependencies for meshing, plotting and timings. A compatible `JupyterLab` image is available at [DockerHub/dokken92/dolfinx_custom:v0.5.0](https://hub.docker.com/r/dokken92/dolfinx_custom/tags)
36+
The tutorial uses several dependencies for meshing, plotting and timings. A compatible `JupyterLab` image is available in the [Github Packages](https://github.com/jorgensd/dolfinx-tutorial/pkgs/container/dolfinx-tutorial))
3737

3838
To use the notebooks in this tutorial with DOLFINx on your own computer, you should use the docker image using the following command
3939
```bash
40-
docker run --init -p 8888:8888 -v "$(pwd)":/root/shared dokken92/dolfinx_custom:v0.5.0
40+
docker run --init -p 8888:8888 -v "$(pwd)":/root/shared ghcr.io/jorgensd/dolfinx-tutorial:v0.5.1
4141
```
4242
This image can also be used as a normal docker container by adding:
4343
```bash
44-
docker run --ti -v "$(pwd)":/root/shared --entrypoint="/bin/bash" dokken92/dolfinx_custom:v0.5.0
44+
docker run --ti -v "$(pwd)":/root/shared --entrypoint="/bin/bash" ghcr.io/jorgensd/dolfinx-tutorial:v0.5.1
4545
```
4646

4747
The tutorials can also be exported as a notebook or PDF by clicking the ![Download](save.png)-symbol in the top right corner of the relevant tutorialThe notebook can in turn be used with a Python kernel which has DOLFINx.

0 commit comments

Comments
 (0)