Add Config.from_json method #279
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: CI | |
on: | |
push: # Add these lines after public release | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
python-version: ["3.9", "3.10", "3.11"] | |
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/[email protected] | |
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 |