8.9.20260327095315 #1052
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
| name: Python package build and publish | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: {} | |
| repository_dispatch: {} | |
| concurrency: | |
| group: wheels-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_wheels: | |
| name: ${{ matrix.image }} wheels | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| include: | |
| - image: manylinux_2_28_x86_64 | |
| build: "*manylinux*" | |
| - image: musllinux_1_2_x86_64 | |
| build: "*musllinux*" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| if: ${{ github.event_name != 'repository_dispatch' }} | |
| with: | |
| fetch-depth: 0 # slow, but gets all the tags | |
| - uses: actions/checkout@v6 | |
| if: ${{ github.event_name == 'repository_dispatch' }} | |
| with: | |
| fetch-depth: 0 # slow, but gets all the tags | |
| ref: ${{ github.event.client_payload.ref }} | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ${{ github.job }}-${{ matrix.image }} | |
| verbose: 2 | |
| # Used to host cibuildwheel | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11 - 3.14" | |
| update-environment: false | |
| - name: install cibuildwheel | |
| run: | | |
| python -m pip install -r cibw-requirements.txt | |
| - name: Build wheels | |
| run: python -m cibuildwheel . --output-dir wheelhouse | |
| env: | |
| CIBW_BUILD: ${{ matrix.build }} | |
| CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/${{ matrix.image }} | |
| CIBW_MUSLLINUX_X86_64_IMAGE: quay.io/pypa/${{ matrix.image }} | |
| # configure cibuildwheel to build native 64-bit archs ('auto64'), and some | |
| # emulated ones | |
| # Linux arm64 wheels are built on circleci | |
| CIBW_ARCHS_LINUX: auto64 # ppc64le s390x | |
| CIBW_ENVIRONMENT_LINUX: PATH=/usr/local/bin:/usr/lib/ccache:/usr/lib/ccache/bin:/usr/lib64/ccache:$PATH CCACHE_DIR=/host${{ github.workspace }}/.ccache CCACHE_CONFIGPATH=/host/home/runner/.config/ccache/ccache.conf CCACHE_SLOPPINESS="include_file_ctime,include_file_mtime,locale,time_macros" CCACHE_NOHASHDIR="true" SCHEMA_SALAD_USE_MYPYC=1 MYPYPATH="$(pwd)/mypy-stubs" | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: artifact-${{ matrix.image }} | |
| path: ./wheelhouse/*.whl | |
| build_sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| if: ${{ github.event_name != 'repository_dispatch' }} | |
| with: | |
| fetch-depth: 0 # slow, but gets all the tags | |
| - uses: actions/checkout@v6 | |
| if: ${{ github.event_name == 'repository_dispatch' }} | |
| with: | |
| fetch-depth: 0 # slow, but gets all the tags | |
| ref: ${{ github.event.client_payload.ref }} | |
| - name: Build sdist | |
| run: pipx run build --sdist | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: artifact-source | |
| path: dist/*.tar.gz | |
| build_wheels_macos: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| # macos-15-intel will be EOL in August 2027, | |
| # https://github.com/actions/runner-images/issues/13045 | |
| # macos-14+ is apple silicon | |
| os: [macos-15-intel, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| if: ${{ github.event_name != 'repository_dispatch' }} | |
| with: | |
| fetch-depth: 0 # slow, but gets all the tags | |
| - uses: actions/checkout@v6 | |
| if: ${{ github.event_name == 'repository_dispatch' }} | |
| with: | |
| fetch-depth: 0 # slow, but gets all the tags | |
| ref: ${{ github.event.client_payload.ref }} | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ${{ github.job }}-${{ matrix.os }} | |
| verbose: 2 | |
| # Used to host cibuildwheel | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11 - 3.14" | |
| update-environment: false | |
| - name: install cibuildwheel | |
| run: | | |
| python -m pip install -r cibw-requirements.txt | |
| - name: Build wheels | |
| run: python -m cibuildwheel . --output-dir wheelhouse | |
| env: | |
| CIBW_ENVIRONMENT_MACOS: CCACHE_SLOPPINESS="include_file_ctime,include_file_mtime,locale,time_macros" CCACHE_NOHASHDIR="true" PATH=/usr/local/opt/ccache/libexec:/opt/homebrew/opt/ccache/libexec:$PATH SCHEMA_SALAD_USE_MYPYC=1 MYPYPATH="$(pwd)/mypy-stubs" | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: artifact-${{ matrix.os }}-${{ strategy.job-index }} | |
| path: ./wheelhouse/*.whl | |
| build_wheels_riscv64: | |
| name: riscv64 ${{ matrix.target }} wheels | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target: [ 'many', 'musl' ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| if: ${{ github.event_name != 'repository_dispatch' }} | |
| with: | |
| fetch-depth: 0 # slow, but gets all the tags | |
| - uses: actions/checkout@v6 | |
| if: ${{ github.event_name == 'repository_dispatch' }} | |
| with: | |
| fetch-depth: 0 # slow, but gets all the tags | |
| ref: ${{ github.event.client_payload.ref }} | |
| - name: musllinux target | |
| if: ${{ matrix.target == 'musl' }} | |
| run: | | |
| echo "CIBW_BUILD=*musllinux*" >> "$GITHUB_ENV" | |
| - name: manylinux target | |
| if: ${{ matrix.target == 'many' }} | |
| run: | | |
| echo "CIBW_BUILD=*manylinux*" >> "$GITHUB_ENV" | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ${{ github.job }}-${{ matrix.target }} | |
| verbose: 2 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| with: | |
| platforms: all | |
| id: qemu | |
| # Used to host cibuildwheel | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11 - 3.14" | |
| update-environment: false | |
| - name: install cibuildwheel | |
| run: | | |
| python -m pip install -r cibw-requirements.txt | |
| - name: Build wheels | |
| run: python -m cibuildwheel . --output-dir wheelhouse | |
| env: | |
| CIBW_ARCHS_LINUX: riscv64 | |
| CIBW_ENVIRONMENT_LINUX: PATH=/usr/local/bin:/usr/lib/ccache:/usr/lib/ccache/bin:/usr/lib64/ccache:$PATH CCACHE_DIR=/host${{ github.workspace }}/.ccache CCACHE_CONFIGPATH=/host/home/runner/.config/ccache/ccache.conf CCACHE_SLOPPINESS="include_file_ctime,include_file_mtime,locale,time_macros" CCACHE_NOHASHDIR="true" SCHEMA_SALAD_USE_MYPYC=1 MYPYPATH="$(pwd)/mypy-stubs" | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: artifact-riscv64-${{ matrix.target }} | |
| path: ./wheelhouse/*.whl | |
| upload_pypi: | |
| needs: [build_wheels, build_sdist, build_wheels_macos, build_wheels_riscv64] | |
| runs-on: ubuntu-24.04 | |
| environment: pypi | |
| permissions: | |
| id-token: write | |
| if: (github.event_name == 'release' && github.event.action == 'published') || (github.event_name == 'repository_dispatch' && github.event.client_payload.publish_wheel == true) | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| # unpacks default artifact into dist/ | |
| pattern: artifact-* | |
| merge-multiple: true | |
| path: dist | |
| skip-decompress: false | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| skip-existing: true |