Create parameters description in the documentation #40
Workflow file for this run
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 the contribution | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
apt_options: -o Acquire::Retries=3 | |
PETSC_DIR: /usr/lib/petscdir/petsc3.15/x86_64-linux-gnu-real | |
PETSC_VERSION: "3.15.1" | |
PYTHON_VERSION: "3.11" | |
jobs: | |
test: | |
name: Build and test the contribution | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "${PYTHON_VERSION}" | |
- name: Setup MPI | |
uses: mpi4py/setup-mpi@v1 | |
with: | |
mpi: openmpi | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install system packages for mpi and petsc | |
run: | | |
sudo apt-get ${{env.apt_options}} update -y | |
sudo apt-get ${{env.apt_options}} install libopenmpi-dev libpetsc-real3.15-dev | |
- name: Install petsc4py and other test dependencies | |
run: | | |
python --version | |
python -m pip install --upgrade pip setuptools | |
python -m pip install tox-gh-actions | |
python -m venv venv | |
. ./venv/bin/activate | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install "cython<3" numpy | |
git clone https://gitlab.com/petsc/petsc.git | |
cd petsc/src/binding/petsc4py | |
python -m pip install . | |
ls ${GITHUB_WORKSPACE}/venv/lib/python | |
- name: Run tox | |
run: tox | |
env: | |
PYTHONPATH: ${{env.PETSC_DIR}}/lib/python3/dist-packages |