Skip to content

Merge pull request #145 from NDF-Poli-USP/issue_0142-fixing-failing-p… #1

Merge pull request #145 from NDF-Poli-USP/issue_0142-fixing-failing-p…

Merge pull request #145 from NDF-Poli-USP/issue_0142-fixing-failing-p… #1

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