Skip to content

v1.4.1 — Kill per-patch heap traffic in Patchwork++ (+14.8% Hz) #81

v1.4.1 — Kill per-patch heap traffic in Patchwork++ (+14.8% Hz)

v1.4.1 — Kill per-patch heap traffic in Patchwork++ (+14.8% Hz) #81

Workflow file for this run

name: Publish to PyPI.org
on:
workflow_dispatch:
release:
types: [published]
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
run: pipx run build --sdist ${{github.workspace}}/python/
- name: Move sdist to dist
run: mkdir -p dist && mv ${{github.workspace}}/python/dist/*.tar.gz dist/
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
cibuildwheel:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2022, macos-14]
steps:
- uses: actions/checkout@v4
- name: Build test wheels (only PRs)
if: github.event_name != 'release'
uses: pypa/cibuildwheel@v2.21.3
env: # build 1 build per platform just to make sure we can do it later when releasing
CIBW_BUILD: "cp310-*"
with:
package-dir: ${{github.workspace}}/python/
- name: Build all wheels
if: github.event_name == 'release'
uses: pypa/cibuildwheel@v2.21.3
env:
# PyPy lacks the C API symbols pybind11 needs (PyModule_GetFilenameObject etc.).
# Restrict to CPython only — PyPy native-extension support is not a goal here.
CIBW_SKIP: "pp*"
with:
package-dir: ${{github.workspace}}/python/
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
pypi:
if: github.event_name == 'release'
needs: [cibuildwheel, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: dist
pattern: "{sdist,wheels-*}"
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}