This repository was archived by the owner on Jan 31, 2025. It is now read-only.
PyOP2 compiler updates #104
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
# Don't immediately kill all if one Python version fails | |
fail-fast: false | |
matrix: | |
python-version: ['3.9', '3.10', '3.11'] | |
env: | |
CC: mpicc | |
PETSC_DIR: ${{ github.workspace }}/petsc | |
PETSC_ARCH: default | |
PETSC_CONFIGURE_OPTIONS: --with-debugging=1 --with-shared-libraries=1 --with-c2html=0 --with-fortran-bindings=0 | |
RDMAV_FORK_SAFE: 1 | |
timeout-minutes: 60 | |
steps: | |
- name: Install system dependencies | |
shell: bash | |
run: | | |
sudo apt update | |
sudo apt install build-essential mpich libmpich-dev \ | |
libblas-dev liblapack-dev gfortran | |
- name: Set correct Python version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Clone PETSc | |
uses: actions/checkout@v4 | |
with: | |
repository: firedrakeproject/petsc | |
path: ${{ env.PETSC_DIR }} | |
- name: Build and install PETSc | |
shell: bash | |
working-directory: ${{ env.PETSC_DIR }} | |
run: | | |
./configure ${PETSC_CONFIGURE_OPTIONS} | |
make | |
- name: Build and install petsc4py | |
# Remove this step when Firedrake PETSc branch is updated to support | |
# building petsc4py with Cython>=3.0 | |
shell: bash | |
working-directory: ${{ env.PETSC_DIR }}/src/binding/petsc4py | |
run: | | |
pip install --upgrade pip | |
pip install --upgrade wheel cython numpy | |
pip install --no-deps . | |
- name: Checkout pyop3 | |
uses: actions/checkout@v4 | |
with: | |
path: pyop3 | |
- name: Install pyop3 and testing dependencies | |
shell: bash | |
working-directory: pyop3 | |
run: | | |
pip install ".[test]" | |
pip install pytest-cov pytest-timeout pytest-xdist | |
- name: Run tests | |
shell: bash | |
working-directory: pyop3 | |
run: | | |
pytest \ | |
--durations=200 \ | |
--tb=native \ | |
--cov pyop3 \ | |
--timeout=480 \ | |
--timeout-method=thread \ | |
-o faulthandler_timeout=540 \ | |
-n 12 --dist worksteal \ | |
-v tests | |
timeout-minutes: 10 |