|
| 1 | +# This file is autogenerated by maturin v1.8.2 |
| 2 | +# To update, run |
| 3 | +# |
| 4 | +# maturin generate-ci github |
| 5 | +# |
| 6 | +name: CI |
| 7 | + |
| 8 | +on: |
| 9 | + push: |
| 10 | + branches: |
| 11 | + - main |
| 12 | + - master |
| 13 | + tags: |
| 14 | + - '*' |
| 15 | + pull_request: |
| 16 | + workflow_dispatch: |
| 17 | + |
| 18 | +permissions: |
| 19 | + contents: read |
| 20 | + |
| 21 | +jobs: |
| 22 | + linux: |
| 23 | + runs-on: ${{ matrix.platform.runner }} |
| 24 | + strategy: |
| 25 | + matrix: |
| 26 | + platform: |
| 27 | + - runner: ubuntu-22.04 |
| 28 | + target: x86_64 |
| 29 | + - runner: ubuntu-22.04 |
| 30 | + target: x86 |
| 31 | + - runner: ubuntu-22.04 |
| 32 | + target: aarch64 |
| 33 | + - runner: ubuntu-22.04 |
| 34 | + target: armv7 |
| 35 | + - runner: ubuntu-22.04 |
| 36 | + target: s390x |
| 37 | + - runner: ubuntu-22.04 |
| 38 | + target: ppc64le |
| 39 | + toolchain: |
| 40 | + - stable |
| 41 | + - beta |
| 42 | + - nightly |
| 43 | + steps: |
| 44 | + - uses: actions/checkout@v4 |
| 45 | + - run: rustup update ${{matrix.toolchain}} && rustup default ${{matrix.toolchain}} |
| 46 | + - uses: actions/setup-python@v5 |
| 47 | + with: |
| 48 | + python-version: 3.x |
| 49 | + - name: Build wheels |
| 50 | + uses: PyO3/maturin-action@v1 |
| 51 | + with: |
| 52 | + target: ${{ matrix.platform.target }} |
| 53 | + args: --release --out dist |
| 54 | + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} |
| 55 | + manylinux: auto |
| 56 | + - name: Build free-threaded wheels |
| 57 | + uses: PyO3/maturin-action@v1 |
| 58 | + with: |
| 59 | + target: ${{ matrix.platform.target }} |
| 60 | + args: --release --out dist -i python3.13t |
| 61 | + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} |
| 62 | + manylinux: auto |
| 63 | + - name: Upload wheels |
| 64 | + uses: actions/upload-artifact@v4 |
| 65 | + with: |
| 66 | + name: wheels-linux-${{ matrix.platform.target }} |
| 67 | + path: dist |
| 68 | + |
| 69 | + musllinux: |
| 70 | + runs-on: ${{ matrix.platform.runner }} |
| 71 | + strategy: |
| 72 | + matrix: |
| 73 | + platform: |
| 74 | + - runner: ubuntu-22.04 |
| 75 | + target: x86_64 |
| 76 | + - runner: ubuntu-22.04 |
| 77 | + target: x86 |
| 78 | + - runner: ubuntu-22.04 |
| 79 | + target: aarch64 |
| 80 | + - runner: ubuntu-22.04 |
| 81 | + target: armv7 |
| 82 | + steps: |
| 83 | + - uses: actions/checkout@v4 |
| 84 | + - uses: actions/setup-python@v5 |
| 85 | + with: |
| 86 | + python-version: 3.x |
| 87 | + - name: Build wheels |
| 88 | + uses: PyO3/maturin-action@v1 |
| 89 | + with: |
| 90 | + target: ${{ matrix.platform.target }} |
| 91 | + args: --release --out dist |
| 92 | + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} |
| 93 | + manylinux: musllinux_1_2 |
| 94 | + - name: Build free-threaded wheels |
| 95 | + uses: PyO3/maturin-action@v1 |
| 96 | + with: |
| 97 | + target: ${{ matrix.platform.target }} |
| 98 | + args: --release --out dist -i python3.13t |
| 99 | + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} |
| 100 | + manylinux: musllinux_1_2 |
| 101 | + - name: Upload wheels |
| 102 | + uses: actions/upload-artifact@v4 |
| 103 | + with: |
| 104 | + name: wheels-musllinux-${{ matrix.platform.target }} |
| 105 | + path: dist |
| 106 | + |
| 107 | + windows: |
| 108 | + runs-on: ${{ matrix.platform.runner }} |
| 109 | + strategy: |
| 110 | + matrix: |
| 111 | + platform: |
| 112 | + - runner: windows-latest |
| 113 | + target: x64 |
| 114 | + - runner: windows-latest |
| 115 | + target: x86 |
| 116 | + steps: |
| 117 | + - uses: actions/checkout@v4 |
| 118 | + - uses: actions/setup-python@v5 |
| 119 | + with: |
| 120 | + python-version: 3.x |
| 121 | + architecture: ${{ matrix.platform.target }} |
| 122 | + - name: Build wheels |
| 123 | + uses: PyO3/maturin-action@v1 |
| 124 | + with: |
| 125 | + target: ${{ matrix.platform.target }} |
| 126 | + args: --release --out dist |
| 127 | + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} |
| 128 | + - name: Build free-threaded wheels |
| 129 | + uses: PyO3/maturin-action@v1 |
| 130 | + with: |
| 131 | + target: ${{ matrix.platform.target }} |
| 132 | + args: --release --out dist -i python3.13t |
| 133 | + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} |
| 134 | + - name: Upload wheels |
| 135 | + uses: actions/upload-artifact@v4 |
| 136 | + with: |
| 137 | + name: wheels-windows-${{ matrix.platform.target }} |
| 138 | + path: dist |
| 139 | + |
| 140 | + macos: |
| 141 | + runs-on: ${{ matrix.platform.runner }} |
| 142 | + strategy: |
| 143 | + matrix: |
| 144 | + platform: |
| 145 | + - runner: macos-13 |
| 146 | + target: x86_64 |
| 147 | + - runner: macos-14 |
| 148 | + target: aarch64 |
| 149 | + steps: |
| 150 | + - uses: actions/checkout@v4 |
| 151 | + - uses: actions/setup-python@v5 |
| 152 | + with: |
| 153 | + python-version: 3.x |
| 154 | + - name: Build wheels |
| 155 | + uses: PyO3/maturin-action@v1 |
| 156 | + with: |
| 157 | + target: ${{ matrix.platform.target }} |
| 158 | + args: --release --out dist |
| 159 | + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} |
| 160 | + - name: Build free-threaded wheels |
| 161 | + uses: PyO3/maturin-action@v1 |
| 162 | + with: |
| 163 | + target: ${{ matrix.platform.target }} |
| 164 | + args: --release --out dist -i python3.13t |
| 165 | + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} |
| 166 | + - name: Upload wheels |
| 167 | + uses: actions/upload-artifact@v4 |
| 168 | + with: |
| 169 | + name: wheels-macos-${{ matrix.platform.target }} |
| 170 | + path: dist |
| 171 | + |
| 172 | + sdist: |
| 173 | + runs-on: ubuntu-latest |
| 174 | + steps: |
| 175 | + - uses: actions/checkout@v4 |
| 176 | + - name: Build sdist |
| 177 | + uses: PyO3/maturin-action@v1 |
| 178 | + with: |
| 179 | + command: sdist |
| 180 | + args: --out dist |
| 181 | + - name: Upload sdist |
| 182 | + uses: actions/upload-artifact@v4 |
| 183 | + with: |
| 184 | + name: wheels-sdist |
| 185 | + path: dist |
| 186 | + |
| 187 | + release: |
| 188 | + name: Release |
| 189 | + environment: |
| 190 | + name: pypi |
| 191 | + runs-on: ubuntu-latest |
| 192 | + if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }} |
| 193 | + needs: [linux, musllinux, windows, macos, sdist] |
| 194 | + permissions: |
| 195 | + # Use to sign the release artifacts |
| 196 | + id-token: write |
| 197 | + # Used to upload release artifacts |
| 198 | + contents: write |
| 199 | + # Used to generate artifact attestation |
| 200 | + attestations: write |
| 201 | + steps: |
| 202 | + - uses: actions/download-artifact@v4 |
| 203 | + - name: Generate artifact attestation |
| 204 | + uses: actions/attest-build-provenance@v1 |
| 205 | + with: |
| 206 | + subject-path: 'wheels-*/*' |
| 207 | + - name: Publish to PyPI |
| 208 | + if: ${{ startsWith(github.ref, 'refs/tags/') }} |
| 209 | + uses: PyO3/maturin-action@v1 |
| 210 | + env: |
| 211 | + MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} |
| 212 | + with: |
| 213 | + command: upload |
| 214 | + args: --non-interactive --skip-existing wheels-*/* |
0 commit comments