-
Notifications
You must be signed in to change notification settings - Fork 15
69 lines (60 loc) · 2.14 KB
/
build_firedrake_main.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
name: Build Firedrake main
on:
push:
branches:
- main
schedule:
- cron: '0 0 * * 0'
jobs:
test:
name: Install and test Firedrake (Linux)
runs-on: self-hosted
steps:
- name: Pre-run cleanup
# Make sure the current directory is empty
run: find . -delete
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
git clone https://github.com/firedrakeproject/firedrake.git
sudo apt-get update
sudo apt-get -y install \
$(python3 ./firedrake/scripts/firedrake-configure --show-system-packages)
- name: Install PETSc
run: |
git clone https://github.com/firedrakeproject/petsc.git
cd petsc
python3 ../firedrake/scripts/firedrake-configure \
--show-petsc-configure-options | \
xargs -L1 ./configure --with-make-np=12
make
- name: Install Firedrake
id: install
run: |
export $(python3 ./firedrake/scripts/firedrake-configure --show-env)
python3 -m venv venv
. venv/bin/activate
: # Force a rebuild of petsc4py as the cached one will not link to the fresh
: # install of PETSc. A similar trick may be needed for compiled dependencies
: # like h5py or mpi4py if changing HDF5/MPI libraries.
pip cache remove petsc4py
pip install --verbose --no-binary h5py './firedrake[ci]'
firedrake-clean
: # Extra test dependencies
pip install --extra-index-url https://download.pytorch.org/whl/cpu \
jax matplotlib ngsPETSc torch vtk
pip list
- name: Run firedrake-check
run: |
. venv/bin/activate
firedrake-check
timeout-minutes: 5
- name: Run spyro smoke tests
run: |
. venv/bin/activate
git clone --depth 1 https://github.com/NDF-Poli-USP/spyro.git spyro-repo
pip install --verbose ./spyro-repo
mpiexec -n 6 python -m pytest spyro-repo/test_integration/
- name: Post-run cleanup
if: always()
run: find . -delete