v7.0.0 #55
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
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/[email protected] | |
- 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/[email protected] | |
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", "pp37", "pp39", "pp310"] | |
steps: | |
- uses: actions/[email protected] | |
- 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/[email protected] | |
env: | |
CIBW_ARCHS_LINUX: auto aarch64 ppc64le | |
CIBW_BUILD: "${{ matrix.py }}-*" | |
CIBW_TEST_COMMAND: "pytest {project}/tests" | |
CIBW_TEST_SKIP: "*_arm64 *_universal2:arm64" | |
CIBW_ARCHS_MACOS: "x86_64 universal2" | |
- uses: actions/[email protected] | |
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/[email protected] | |
with: | |
pattern: dist-* | |
merge-multiple: true | |
path: dist | |
- uses: pypa/[email protected] | |
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/[email protected] | |
- 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 |