Merge branch 'dev' of github.com:nanograv/holodeck into dev #196
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: build | |
on: | |
push: | |
branches: | |
- "main" | |
- "dev" | |
pull_request: | |
branches: | |
- "main" | |
- "dev" | |
jobs: | |
test: | |
name: Test Python ${{ matrix.python-version }}, ${{ matrix.os }}, ${{ matrix.mpi }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# os: [ubuntu-latest, macOS-latest, windows-latest] | |
os: [ubuntu-latest, macOS-latest] | |
# os: [ubuntu-latest] | |
python-version: ['3.9', '3.10', '3.11'] | |
# python-version: ['3.10'] | |
# mpi: [ 'mpich', 'openmpi', 'intelmpi'] | |
# mpi: ['openmpi'] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 2 | |
# Install MPI (required to build mpi4py) | |
# see: https://github.com/mpi4py/setup-mpi | |
# - name: Setup MPI | |
# uses: mpi4py/setup-mpi@v1 | |
# with: | |
# mpi: ${{ matrix.mpi }} | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# - if: matrix.os == 'ubuntu-latest' | |
# # need to update cache to find packages, see https://github.com/nektos/act/issues/588#issuecomment-809479520 | |
# run: sudo apt-get update | |
# run: sudo apt-get install libopenmpi-dev | |
# - if: matrix.os == 'macOS-latest' | |
# run: | | |
# brew install mpich | |
- name: Install dependencies | |
run: | | |
which python | |
python --version | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install -r requirements.txt | |
python -m pip install -r requirements-dev.txt | |
- name: Install package | |
run: | | |
python setup.py build_ext -i | |
python setup.py develop | |
- name: Report environment information | |
run: | | |
which python | |
python --version | |
python -c "import sys; print(f'Python {sys.version}')" | |
python -c "import pip; print(f'pip {pip.__version__}')" | |
python -c "import setuptools; print(f'setuptools {setuptools.__version__}')" | |
python -m pip freeze | |
which tox | |
tox --version | |
- name: Run pytest via tox | |
# Run tox using the version of Python in `PATH` by using the `-e py` argument | |
run: | | |
tox -e py |