|
|
|
@ -15,7 +15,7 @@ jobs:
|
|
|
|
|
strategy:
|
|
|
|
|
matrix:
|
|
|
|
|
python-version: [ 3.7, 3.8, 3.9 ]
|
|
|
|
|
os: [ macos-latest, windows-latest, Ubuntu-latest ]
|
|
|
|
|
os: [ macos-latest, windows-latest, ubuntu-latest ]
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
@ -30,13 +30,13 @@ jobs:
|
|
|
|
|
with:
|
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
|
|
|
|
|
- name: Set up Linux environment
|
|
|
|
|
- name: Set linux compiler
|
|
|
|
|
if: runner.os == 'Linux'
|
|
|
|
|
run: |
|
|
|
|
|
echo "CC=gcc-10" >> $GITHUB_ENV
|
|
|
|
|
echo "CXX=g++-10" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
|
|
- name: Set up macOS environment
|
|
|
|
|
- name: Install libomp
|
|
|
|
|
if: runner.os == 'macOS'
|
|
|
|
|
# openMP isnt part of core apple clang for some reason?
|
|
|
|
|
run: brew install libomp
|
|
|
|
@ -58,3 +58,74 @@ jobs:
|
|
|
|
|
|
|
|
|
|
- name: Test with nose
|
|
|
|
|
run: nosetests tests -d
|
|
|
|
|
|
|
|
|
|
publish-wheel:
|
|
|
|
|
needs: test
|
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
strategy:
|
|
|
|
|
matrix:
|
|
|
|
|
python-version: [ 3.7, 3.8, 3.9 ]
|
|
|
|
|
os: [ macos-latest, windows-latest, ubuntu-latest ]
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
with:
|
|
|
|
|
# Whether to checkout submodules: `true` to checkout submodules or `recursive` to
|
|
|
|
|
# recursively checkout submodules.
|
|
|
|
|
submodules: 'true'
|
|
|
|
|
|
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
|
with:
|
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
|
|
|
|
|
- name: Set linux compiler
|
|
|
|
|
if: runner.os == 'Linux'
|
|
|
|
|
run: |
|
|
|
|
|
echo "CC=gcc-10" >> $GITHUB_ENV
|
|
|
|
|
echo "CXX=g++-10" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
|
|
- name: Install libomp
|
|
|
|
|
if: runner.os == 'macOS'
|
|
|
|
|
# openMP isnt part of core apple clang for some reason?
|
|
|
|
|
run: brew install libomp
|
|
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
|
run: |
|
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
|
python -m pip install wheel twine setuptools
|
|
|
|
|
python -m pip install build --user
|
|
|
|
|
|
|
|
|
|
- name: Build a binary wheel
|
|
|
|
|
run: python -m build --wheel --outdir dist/
|
|
|
|
|
|
|
|
|
|
- name: Publish to Test PyPI
|
|
|
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
|
|
|
with:
|
|
|
|
|
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
|
|
|
repository_url: https://test.pypi.org/legacy/
|
|
|
|
|
|
|
|
|
|
publish-sdist:
|
|
|
|
|
needs: test
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- name: Set up Python
|
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
|
with:
|
|
|
|
|
python-version: '3.x'
|
|
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
|
run: |
|
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
|
python -m pip install setuptools wheel twine
|
|
|
|
|
python -m pip install build --user
|
|
|
|
|
|
|
|
|
|
- name: Build a source tarball
|
|
|
|
|
run: python -m build --sdist --outdir dist/
|
|
|
|
|
|
|
|
|
|
- name: Publish to Test PyPI
|
|
|
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
|
|
|
with:
|
|
|
|
|
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
|
|
|
repository_url: https://test.pypi.org/legacy/
|