Prepapre version 0.9.2.4 #65
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: Wheel build | |
on: | |
push: | |
branches: ["main"] | |
tags: | |
- "v*.*.*" | |
pull_request: | |
branches: ["main"] | |
jobs: | |
sdist: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Install Python dependencies | |
run: python -m pip install -U pip setuptools wheel | |
- name: Build docs and sdist | |
run: make sdist | |
env: { STATIC_DEPS: false } | |
- name: Upload sdist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: sdist | |
path: dist/*.tar.gz | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
arch: auto i686 aarch64 armv7l | |
skip: cp36-* cp37-* cp38-* pp37-* pp38-* pp39-* | |
- os: windows-latest | |
arch: AMD64 ARM64 | |
skip: cp36-* cp37-* cp38-* pp37-* pp38-* pp39-* | |
- os: macos-13 | |
arch: x86_64 arm64 universal2 | |
skip: cp36-* cp37-* cp38-* pp* | |
- os: macos-14 | |
arch: x86_64 arm64 universal2 | |
skip: cp36-* cp37-* cp38-* pp* | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel==2.22.0 | |
- name: Set up QEMU | |
if: runner.os == 'Linux' | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Build wheels | |
run: python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_ARCHS_LINUX: ${{ matrix.arch }} | |
CIBW_SKIP: ${{ matrix.skip }} | |
CIBW_ENABLE: cpython-freethreading | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
path: ./wheelhouse/*.whl | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: [ sdist, build_wheels ] | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Display structure of downloaded files | |
run: | | |
ls -R | |
mkdir dist | |
mv artifacts/sdist/*.tar.gz dist | |
mv artifacts/*/*.whl dist | |
- name: Publish to PyPi | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
pip install --upgrade wheel pip setuptools twine | |
twine upload --skip-existing dist/* | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: dist/* |