v7.0.0 #50
Workflow file for this run
This file contains hidden or 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/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 && make clean && make 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", "pp37", "pp38", "pp39"] | |
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.16.5 | |
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/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 && make clean && make html | |
- name: Publishing documentation | |
run: | | |
ghp-import -f -n -c pysimdjson.tkte.ch -p docs/_build/html |