Skip to content

v7.0.0

v7.0.0 #60

Workflow file for this run

on:
workflow_dispatch:
release:
types:
- published
push:
branches:
- main
pull_request:
name: Tests/Release
jobs:
# Build & test simple source release before wasting hours building and
# testing the binary build matrix.
sdist:
name: Creating source release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- name: Setting up Python
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Installing python build dependencies
run: |
pip install uv
- name: Building source distribution
run: |
uv build --sdist
- name: Ensuring documentation builds
run: |
cd docs && uv run make clean html
- uses: actions/upload-artifact@v4.6.0
with:
name: dist-sdist
path: dist/*.tar.gz
build_wheels:
needs: [sdist]
name: "[${{ strategy.job-index }}/${{ strategy.job-total }}] py${{ matrix.py }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
py: ["cp39", "cp310", "cp311", "cp312", "cp313"]
steps:
- uses: actions/checkout@v4.1.7
- name: Setting up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build & test wheels
uses: pypa/cibuildwheel@v2.22.0
env:
CIBW_BUILD: "${{ matrix.py }}-*"
- uses: actions/upload-artifact@v4.6.0
with:
name: dist-${{ matrix.os }}-${{ matrix.py }}
path: ./wheelhouse/*.whl
upload_all:
name: Uploading built packages to pypi for release.
needs: [build_wheels, sdist]
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4.1.8
with:
pattern: dist-*
merge-multiple: true
path: dist
- uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
build_documentation:
name: Building & uploading documentation.
needs: [upload_all]
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- name: Setting up Python
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Installing python build dependencies
run: |
pip install uv
- name: Installing release dependencies.
run: |
uv sync
- name: Building documentation
run: |
cd docs && uv run make clean html
- name: Publishing documentation
run: |
uv run ghp-import -f -n -c pysimdjson.tkte.ch -p docs/_build/html