Skip to content

rewrite Cython backend using Cython 3 pure Python mode #603

rewrite Cython backend using Cython 3 pure Python mode

rewrite Cython backend using Cython 3 pure Python mode #603

Workflow file for this run

name: Release
on:
push:
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
tags:
- "**"
pull_request:
paths:
- pyproject.toml
- setup.py
- buildutils/**
- .github/workflows/wheels.yml
- tools/install_libzmq.sh
- zmq/utils/*.h
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
TWINE_NONINTERACTIVE: "1"
CIBW_PRERELEASE_PYTHONS: "1"
jobs:
check-bundle:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: check bundled libzmq checksums
run: python -m buildutils.bundle checksums
sdist:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: install dependencies
run: |
pip install --upgrade pip build pytest
pip install -r tools/wheel-requirements.txt
- name: build sdist
run: |
python setup.py fetch_libzmq
python setup.py cython
python -m build --sdist .
- uses: actions/upload-artifact@v3
with:
name: sdist
path: "dist/*.tar.gz"
if-no-files-found: error
- name: verify sdist files
run:
pytest -v tools/test_sdist.py
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/')
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install twine
twine upload --skip-existing dist/*.tar.gz
wheel:
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
name: wheel-${{ matrix.name }}
env:
MACOSX_DEPLOYMENT_TARGET: "10.9"
CIBW_BUILD: "${{ matrix.cibw.build || '*' }}"
CIBW_SKIP: "${{ matrix.cibw.skip || '' }}"
CIBW_ARCHS_LINUX: "${{ matrix.cibw.arch || 'auto' }}"
CIBW_ARCHS_MACOS: "${{ matrix.cibw.arch || 'auto' }}"
CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_x86_64_image || '' }}"
strategy:
fail-fast: false
matrix:
include:
- os: macos-11
name: mac-cpython
cibw:
build: "cp*"
- os: macos-11
name: mac-pypy
cibw:
build: "pp*"
- os: macos-11
name: mac-arm
cibw:
arch: universal2
build: "cp*"
- name: manylinux-x86_64
cibw:
arch: x86_64
build: "*manylinux*"
- name: manylinux-i686
cibw:
arch: i686
build: "*manylinux*"
# additional manylinux variants, not specified in pyproject.toml:
# build with newer 2_28 for cpython >= 3.10, pypy 3.9
- name: manylinux-x86_64-2_28
cibw:
arch: x86_64
build: "cp31*-manylinux* pp39-manylinux*"
manylinux_x86_64_image: manylinux_2_28
- name: musllinux
cibw:
build: "*musllinux*"
- name: win32
os: windows-2019
architecture: x86
cibw:
build: "cp*win32"
- os: windows-2019
name: win-pypy
architecture: x64
cibw:
build: "pp*win_amd64"
- os: windows-2019
name: win_amd64
architecture: x64
cibw:
build: "cp*win_amd64"
steps:
- uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v4
with:
python-version: "3.11"
architecture: ${{ matrix.architecture }}
- name: customize mac-arm-64
if: contains(matrix.os, 'macos') && matrix.cibw.arch
run: |
echo 'MACOSX_DEPLOYMENT_TARGET=10.15' >> "$GITHUB_ENV"
- name: install dependencies
run: |
pip install --upgrade setuptools pip wheel
pip install -r tools/wheel-requirements.txt
- name: show environment
run: |
pip freeze
- name: list target wheels
run: |
python -m cibuildwheel . --print-build-identifiers
- name: build wheels
run: |
python -m cibuildwheel .
- uses: actions/upload-artifact@v3
with:
name: wheels-${{ matrix.name }}
path: "wheelhouse/*"
if-no-files-found: error
- name: Publish wheels to PyPI
if: startsWith(github.ref, 'refs/tags/')
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install twine
twine upload --skip-existing wheelhouse/*