CI #1195
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: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
pip: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] | |
include: | |
- os: ubuntu-20.04 | |
python-version: '3.6' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies (Linux) | |
run: sudo apt-get install gfortran libopenmpi-dev | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install mpi4py | |
- name: Install pypolychord | |
run: pip install -v . | |
- name: Test pypolychord | |
run: python run_pypolychord.py | |
- name: Test pypolychord (MPI) | |
run: mpirun --oversubscribe -np 3 python run_pypolychord.py | |
- name: Test pypolychord (anesthetic) | |
if: ${{ ! contains( '3.6, 3.7', matrix.python-version ) }} | |
run: | | |
pip install -r requirements.txt | |
python run_pypolychord.py | |
tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] | |
include: | |
- os: ubuntu-20.04 | |
python-version: '3.6' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies (Linux) | |
run: sudo apt-get install gfortran libopenmpi-dev | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install mpi4py pytest pytest-mpi fortranformat | |
- name: Install pypolychord | |
run: pip install -v '.[test]' | |
- name: Test pypolychord (no MPI) | |
run: python -m pytest tests | |
- name: Test pypolychord (MPI) | |
run: mpirun --oversubscribe -np 3 python -m pytest tests --only-mpi |