Bump zizmorcore/zizmor-action from b0e5c0b2b3785bc67b9b6c743fdbd495cda1b4c4 to c0e2b1c877e25a91d1d747c438d49199cad29698 in the actions group #3202
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 Dist | |
| on: | |
| push: | |
| tags: | |
| - "[0-9]+.[0-9]+.[0-9]+" | |
| - "[0-9]+.[0-9]+.[0-9]+.post[0-9]+" | |
| - "[0-9]+.[0-9]+.[0-9]+[a-b][0-9]+" | |
| - "[0-9]+.[0-9]+.[0-9]+rc[0-9]+" | |
| workflow_dispatch: | |
| pull_request: | |
| workflow_call: | |
| inputs: | |
| ref: | |
| required: true | |
| type: string | |
| concurrency: | |
| group: dist-${{ github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash -eux {0} | |
| jobs: | |
| build_wheels: | |
| name: Build wheels for ${{ matrix.buildplat[1] }} | |
| runs-on: ${{ matrix.buildplat[0] }} | |
| strategy: | |
| # Ensure that a wheel builder finishes even if another fails | |
| fail-fast: false | |
| matrix: | |
| # Github Actions doesn't support pairing matrix values together, let's improvise | |
| # https://github.com/github/feedback/discussions/7835#discussioncomment-1769026 | |
| buildplat: | |
| - [ubuntu-latest, "manylinux_x86_64", "cp3*-manylinux_x86_64"] | |
| - [ubuntu-latest, "manylinux_aarch64", "cp3*-manylinux_aarch64"] | |
| - [ubuntu-latest, "manylinux_ppc64le", "cp3*-manylinux_ppc64le"] | |
| - [ubuntu-latest, "manylinux_s390x", "cp3*-manylinux_s390x"] | |
| - [ubuntu-latest, "manylinux_i686", "cp3*-manylinux_i686"] | |
| - [windows-2022, "win_amd6", "cp3*-win_amd64"] | |
| - [windows-2022, "win32", "cp3*-win32"] | |
| - [windows-11-arm, "win_arm64", "cp3*-win_arm64"] | |
| - [macos-14, "macos", "cp*-macosx_*"] | |
| steps: | |
| - name: Checkout pymongo | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| ref: ${{ inputs.ref }} | |
| - uses: actions/setup-python@v6 | |
| with: | |
| cache: 'pip' | |
| python-version: 3.11 | |
| cache-dependency-path: 'pyproject.toml' | |
| allow-prereleases: true | |
| - name: Set up QEMU | |
| if: runner.os == 'Linux' | |
| uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3 | |
| with: | |
| # setup-qemu-action by default uses `tonistiigi/binfmt:latest` image, | |
| # which is out of date. This causes seg faults during build. | |
| # Here we manually fix the version. | |
| image: tonistiigi/binfmt:qemu-v8.1.5 | |
| platforms: all | |
| - name: Install cibuildwheel | |
| # Note: the default manylinux is manylinux_2_28 | |
| run: | | |
| python -m pip install -U pip | |
| python -m pip install "cibuildwheel>=3.2.0,<4" | |
| - name: Build wheels | |
| env: | |
| CIBW_BUILD: ${{ matrix.buildplat[2] }} | |
| run: python -m cibuildwheel --output-dir wheelhouse | |
| - name: Assert all versions in wheelhouse | |
| if: ${{ ! startsWith(matrix.buildplat[1], 'macos') }} | |
| run: | | |
| ls wheelhouse/*cp310*.whl | |
| ls wheelhouse/*cp311*.whl | |
| ls wheelhouse/*cp312*.whl | |
| ls wheelhouse/*cp313*.whl | |
| ls wheelhouse/*cp314*.whl | |
| # Free-threading builds: | |
| ls wheelhouse/*cp314t*.whl | |
| - uses: actions/upload-artifact@v5 | |
| with: | |
| name: wheel-${{ matrix.buildplat[1] }} | |
| path: ./wheelhouse/*.whl | |
| if-no-files-found: error | |
| make_sdist: | |
| name: Make SDist | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| ref: ${{ inputs.ref }} | |
| - uses: actions/setup-python@v6 | |
| with: | |
| # Build sdist on lowest supported Python | |
| python-version: "3.10" | |
| - name: Build SDist | |
| run: | | |
| set -ex | |
| python -m pip install -U pip build | |
| python -m build --sdist . | |
| - name: Test SDist | |
| run: | | |
| python -m pip install dist/*.gz | |
| cd .. | |
| python -c "from pymongo import has_c; assert has_c()" | |
| - uses: actions/upload-artifact@v5 | |
| with: | |
| name: "sdist" | |
| path: ./dist/*.tar.gz | |
| collect_dist: | |
| runs-on: ubuntu-latest | |
| needs: [build_wheels, make_sdist] | |
| name: Download Wheels | |
| steps: | |
| - name: Download all workflow run artifacts | |
| uses: actions/download-artifact@v6 | |
| - name: Flatten directory | |
| working-directory: . | |
| run: | | |
| find . -mindepth 2 -type f -exec mv {} . \; | |
| find . -type d -empty -delete | |
| - uses: actions/upload-artifact@v5 | |
| with: | |
| name: all-dist-${{ github.run_id }} | |
| path: "./*" |