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