Skip to content

Update pyproject to use pypi rbf #349

Update pyproject to use pypi rbf

Update pyproject to use pypi rbf #349

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
mpi: ["mpich", "openmpi"]
exclude:
- os: macos-latest
mpi: "mpich" # Brew hdf5-mpi only support openmpi
include:
- os: ubuntu-latest
path: |
~/.cache/pypoetry
~/.cache/pip
- os: macos-latest
path: |
~/Library/Caches/pypoetry
~/Library/Caches/pip
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup MPI
uses: mpi4py/setup-mpi@v1
with:
mpi: ${{ matrix.mpi }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2.2.2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Set up cache
id: cached-python-dependencies
uses: actions/cache@v3
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install background dependency (MacOS)
if: startsWith(runner.os, 'macOS')
run: |
brew install hdf5-mpi
- name: Install background dependency (Ubuntu)
if: startsWith(runner.os, 'Linux')
run: |
sudo apt-get install -y libhdf5-mpi-dev python3-dev # Install hdf5-mpi
- name: Install poetry dependencies
if: steps.cached-python-dependencies.outputs.cache-hit != 'true'
run: |
pip install numpy mpi4py
poetry config virtualenvs.in-project false
poetry install
- name: Check style
run: |
make check-codestyle
- name: Run tests
run: |
make test