Skip to content

Commit

Permalink
Merge pull request #43 from jorgensd/v0.6.0-r1
Browse files Browse the repository at this point in the history
Add v0.6.0-r1
  • Loading branch information
jorgensd authored May 21, 2024
2 parents 2b314bd + 4075841 commit 9db331c
Show file tree
Hide file tree
Showing 20 changed files with 464 additions and 4,495 deletions.
75 changes: 46 additions & 29 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,61 @@ on:
push:
branches: [main]

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

# Weekly build on Mondays at 8 am
schedule:
- cron: "0 8 * * 1"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: dolfinx/lab:v0.5.0
build-docs:
uses: ./.github/workflows/test-build.yml
with:
tag: "v0.6.0-r1"

env:
HDF5_MPI: "ON"
CC: mpicc
HDF5_DIR: "/usr/local/"
DISPLAY: ":99.0"
PYVISTA_OFF_SCREEN: true
deploy:
needs: [build-docs]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

- name: Install dependencies
run: pip3 install notebook nbconvert==6.5.3 jupyter-book --upgrade
runs-on: ubuntu-latest
steps:
- name: Download docs artifact
# docs artifact is uploaded by build-docs job
uses: actions/download-artifact@v4
with:
name: docs
path: "./public"

# Runs a single command using the runners shell
- name: Build the book
run: |
PYVISTA_JUPYTER_BACKEND=static PYVISTA_OFF_SCREEN=false jupyter-book build --all .
- name: Download docs artifact
# docs artifact is uploaded by build-docs job
uses: actions/download-artifact@v4
with:
name: code-coverage-report
path: "./public/code-coverage-report"

# Push book to HTML to github pages
- name: GitHub Pages action
uses: peaceiris/[email protected]
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
path: "./public"

- name: Checkout
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
56 changes: 44 additions & 12 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test tutorial against DOLFINx nightly build
name: Test tutorial against DOLFINx

on:

Expand All @@ -9,30 +9,62 @@ on:
branches:
- main

# Allows you to run this workflow manually from the Actions tab
workflow_call:
inputs:
tag:
description: "Tag of DOLFINx docker image"
default: "v0.6.0-r1"
required: true
type: string
workflow_dispatch:

inputs:
tag:
description: "Tag of DOLFINx docker image"
default: "v0.6.0-r1"
required: true
type: string
schedule:
- cron: "* 9 * * 1"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
env:
DEFAULT_TAG: v0.6.0-r1

jobs:
test-nightly:
runs-on: ubuntu-22.04
container: dolfinx/lab:nightly
get_image_tag:
runs-on: ubuntu-latest
outputs:
image: ${{ steps.docker_tag.outputs.image }}
steps:
- id: docker_tag
run: echo "image=${{ inputs.tag || env.DEFAULT_TAG }}" >> $GITHUB_OUTPUT

build-book:
needs: get_image_tag
runs-on: ubuntu-latest
container: dolfinx/lab:${{ needs.get_image_tag.outputs.image }}
env:
PYVISTA_JUPYTER_BACKEND: static
PYVISTA_OFF_SCREEN: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
run: |
pip3 install jupyter-book
python3 -m pip install --upgrade pip
python3 -m pip install -e .[dev] -U
- name: flake8 checks
run: |
pip3 install flake8-nb==0.4.0
run:
flake8-nb *.ipynb

- name: Test building the book
run:
PYVISTA_JUPYTER_BACKEND=static PYVISTA_OFF_SCREEN=false jupyter-book build . --all
jupyter-book build . --all

- name: Upload the book
if: always()
uses: actions/upload-artifact@v4
with:
name: docs
path: _build/html
Loading

0 comments on commit 9db331c

Please sign in to comment.