Skip to content

Merge branch 'bugfix_numpy2_NaN_Inf' into main #462

Merge branch 'bugfix_numpy2_NaN_Inf' into main

Merge branch 'bugfix_numpy2_NaN_Inf' into main #462

Workflow file for this run

name: Build and upload to PyPI
# publish when a (published) GitHub Release is created, or on a push (it will only actually upload to pypi if it's a tagged push)
# cibuildwheel will need to be updated occasionally when adding a new python version
on:
push:
release:
types:
- published
env:
# don't build wheels for unsupported CPython versions, and skip pypy altogether
CIBW_SKIP: cp27-* cp35-* cp36-* cp37-* pp* *win32 *i686 *musllinux*
## install cython in each build environment
CIBW_BEFORE_BUILD: pip install -U cython
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-latest, macos-latest, macos-13]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.11'
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.18.1
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.10'
- name: Install cython
run: |
python -m pip install cython
- name: Build sdist
run: python setup.py sdist
- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# only publish on a new tag:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
#repository_url: https://test.pypi.org/legacy/