Skip to content

Compatibility with Python 3.8 #70

Compatibility with Python 3.8

Compatibility with Python 3.8 #70

Workflow file for this run

name: Build
on:
push:
pull_request:
release:
types:
- published
env:
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_BEFORE_ALL_LINUX: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain=stable --profile=minimal -y
CIBW_ENVIRONMENT_LINUX: 'PATH="$HOME/.cargo/bin:$PATH"'
CIBW_SKIP: cp36-* cp37-* pp* *i686
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- run: rustup target add aarch64-apple-darwin
if: startsWith(matrix.os, 'macos')
- run: rustup target add i686-pc-windows-msvc
if: startsWith(matrix.os, 'windows')
- uses: pypa/cibuildwheel@v2.12.3
with:
package-dir: python
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: pipx run build --sdist
working-directory: python
- uses: actions/upload-artifact@v3
with:
path: python/dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@v1.8.6
with:
password: ${{ secrets.PYPI_API_TOKEN }}