Skip to content

MSTI feature added, temp replaced by beta #98

MSTI feature added, temp replaced by beta

MSTI feature added, temp replaced by beta #98

Workflow file for this run

name: CI targets
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types:
- published
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.8, 3.9, '3.10', '3.11']
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install non-python dependencies on mac
if: runner.os == 'macOS'
run: |
brew install open-mpi
- name: Install non-python dependencies on linux
if: runner.os == 'Linux'
run: |
sudo apt install libopenmpi-dev
- name: Install dependencies and package
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements_dev.txt
python -m pip install -e .[mpi]
- name: Display Python, pip, setuptools, and all installed versions
run: |
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
- name: Run tests
run: make test
build:
needs: [tests]
name: Build source distribution
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install non-python dependencies on linux
run: |
sudo apt install libopenmpi-dev
- name: Build
run: |
python -m pip install --upgrade pip setuptools wheel build
pip install -r requirements.txt
make dist
- name: Test the sdist
run: make test-sdist
- name: Test the wheel
run: make test-wheel
- uses: actions/upload-artifact@v2
with:
name: dist
path: dist/*
deploy:
needs: [tests, build]
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Download wheel/dist from build
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*