Skip to content

Use Python Stable ABI in Swig build #22

Use Python Stable ABI in Swig build

Use Python Stable ABI in Swig build #22

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-2022, macos-14]
env:
CIBW_SKIP: pp*
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_ARCHS_LINUX: x86_64 aarch64
# Build only for Python 3.10 since we're using stable ABI
# The resulting abi3 wheels will work for Python 3.10+
CIBW_BUILD: cp310-*
steps:
- uses: actions/checkout@v2
# Used to host cibuildwheel
- uses: actions/setup-python@v2
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.21.3
- name: Install QEMU and emulation on the Ubuntu runner
if: runner.os == 'Linux'
run: sudo apt install qemu-user-static
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
upload_pypi:
needs: [build_wheels]
runs-on: ubuntu-latest
# Only upload to PyPI on pushes to master, not on PRs
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: __token__
password: ${{ secrets.pypi_password }}
skip_existing: true