Skip to content

upgrade cibuildwheel action to support Python 3.14 #14

upgrade cibuildwheel action to support Python 3.14

upgrade cibuildwheel action to support Python 3.14 #14

Workflow file for this run

name: Build Wheels
on:
pull_request:
branches: [ master ]
paths:
- 'setup.py'
- 'pyproject.toml'
- 'biom/*.pyx'
- '.github/workflows/wheels.yml'
- '.github/workflows/release.yml'
workflow_call:
workflow_dispatch:
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-15, macos-15-intel]
# The 5 runners correspond to 5 architectures. Details:
# https://cibuildwheel.pypa.io/en/stable/options/#archs
# The runners and architectures should be automatically associated. However, in
# case not in the future, they can be manually specified as follows:
# include:
# - os: ubuntu-latest
# cibw_archs: 'x86_64'
# - os: ubuntu-24.04-arm
# cibw_archs: 'aarch64'
# - os: windows-latest
# cibw_archs: 'AMD64'
# - os: macos-13
# cibw_archs: 'x86_64'
# - os: macos-latest
# cibw_archs: 'arm64'
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build wheels
uses: pypa/cibuildwheel@v3.4.1
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install build dependencies
run: |
pip install numpy cython build
- name: Build sdist
run: python -m build --sdist
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# Only upload to PyPI on tagged commits
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
path: dist
merge-multiple: true
- uses: actions/download-artifact@v4
with:
name: sdist
path: dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}