-
Notifications
You must be signed in to change notification settings - Fork 69
93 lines (80 loc) · 3.15 KB
/
test_nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Test release branch against DOLFINx nightly build
# Controls when the action will run.
on:
pull_request:
branches:
- release
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
schedule:
- cron: "0 9 * * *"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test-nightly:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: ghcr.io/fenics/dolfinx/lab:v0.7.1
env:
HDF5_MPI: "ON"
PYVISTA_OFF_SCREEN: true
DISPLAY: ":99.0"
PYVISTA_JUPYTER_BACKEND: panel
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checkout release branch to work on schedule
- name: Checkout release branch
uses: actions/checkout@v4
if: ${{ github.event_name == 'schedule' }}
with:
ref: release
- name: Use current branch
uses: actions/checkout@v4
if: ${{ github.event_name != 'schedule' }}
- name: Special handling of some installation
uses: ./.github/actions/install-dependencies
- name: Install requirements
run: python3 -m pip install --no-cache-dir -r docker/requirements.txt --upgrade
- name: Test complex notebooks in parallel
run: |
export PKG_CONFIG_PATH=/usr/local/dolfinx-complex/lib/pkgconfig:$PKG_CONFIG_PATH
export PETSC_ARCH=linux-gnu-complex128-32
export PYTHONPATH=/usr/local/dolfinx-complex/lib/python3.10/dist-packages:$PYTHONPATH
export LD_LIBRARY_PATH=/usr/local/dolfinx-complex/lib:$LD_LIBRARY_PATH
cd chapter1
python3 complex_mode.py
mpirun -n 2 python3 complex_mode.py
- name: Test real notebooks in parallel
run: |
cd chapter1
python3 -c "from pyvista import start_xvfb; start_xvfb(0.1)"
mpirun -n 2 python3 fundamentals_code.py
mpirun -n 2 python3 nitsche.py
mpirun -n 2 python3 membrane_code.py
cd ../chapter2
mpirun -n 2 python3 diffusion_code.py
mpirun -n 2 python3 heat_code.py
mpirun -n 2 python3 linearelasticity_code.py
mpirun -n 2 python3 hyperelasticity.py
mpirun -n 2 python3 nonlinpoisson_code.py
mpirun -n 2 python3 ns_code1.py
mpirun -n 2 python3 ns_code2.py
cd ../chapter3
mpirun -n 2 python3 neumann_dirichlet_code.py
mpirun -n 2 python3 multiple_dirichlet.py
mpirun -n 2 python3 subdomains.py
mpirun -n 2 python3 robin_neumann_dirichlet.py
mpirun -n 2 python3 component_bc.py
mpirun -n 2 python3 em.py
cd ../chapter4
mpirun -n 2 python3 solvers.py
mpirun -n 2 python3 convergence.py
mpirun -n 2 python3 compiler_parameters.py
mpirun -n 2 python3 newton-solver.py
- name: Test building the book
run: PYVISTA_OFF_SCREEN=false jupyter-book build -W .
- uses: actions/upload-artifact@v3
with:
name: webpage
path: ./_build/html
retention-days: 2
if-no-files-found: error