build with cmake (scikit-build-core) #663
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: 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: | |
sdist: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup python | |
uses: actions/setup-python@v5 | |
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 -m build --sdist . | |
- uses: actions/upload-artifact@v4 | |
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-13 | |
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@v4 | |
- name: setup python | |
uses: actions/setup-python@v5 | |
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@v4 | |
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/* |