Test build #46
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and upload to PyPI | |
on: [push] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{matrix.arch}} for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 1000 | |
env: | |
CIBW_SKIP: "cp27-* cp34-* cp35-* cp36-* pp27-* cp36-musllinux_aarch64 cp36-*_aarch64 cp37-*_aarch64 cp38-*_aarch64 pp3*" | |
CIBW_BEFORE_BUILD: "pip install Cython==3.0.11" | |
strategy: | |
matrix: | |
os: [ubuntu-24.04, windows-latest, macos-latest] | |
arch: [auto] | |
include: | |
- os: ubuntu-24.04 | |
arch: aarch64 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions/setup-python@v5 | |
name: Install Python | |
with: | |
python-version: '3.13' | |
- uses: docker/setup-qemu-action@v3 | |
if: ${{ matrix.arch == 'aarch64' }} | |
name: Set up QEMU | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install cibuildwheel==2.21.2 Cython==3.0.11 setuptools wheel | |
- name: Build wheels | |
env: | |
CIBW_ARCHS_MACOS: x86_64 universal2 | |
CIBW_ARCHS_LINUX: ${{matrix.arch}} | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: ./wheelhouse/*.whl | |
retention-days: 1 | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
timeout-minutes: 40 | |
env: | |
CIBW_SKIP: "cp27-* cp34-* pp27-* cp35-* cp36-* cp37-*" | |
CIBW_BEFORE_BUILD: "pip install Cython==3.0.11" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions/setup-python@v5 | |
name: Install Python | |
with: | |
python-version: '3.13' | |
- name: Build sdist | |
run: | | |
pip install Cython==3.0.11 setuptools wheel setuptools | |
python setup.py build_ext --inplace --cython | |
python setup.py sdist | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: dist/*.tar.gz | |
retention-days: 1 | |
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@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password }} | |
# To test: repository_url: https://test.pypi.org/legacy/ |