Update pyo3 #212
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: PyO3-Wheels | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '*' | |
| paths: | |
| - candle-pyo3/** | |
| pull_request: | |
| paths: | |
| - candle-pyo3/** | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| PROTOC_VERSION: '25.0' | |
| FEATURES_FLAG: '--features onnx' | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: [x86_64, x86, aarch64, s390x, ppc64le] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| args: --release --out dist --find-interpreter | |
| sccache: 'true' | |
| manylinux: auto | |
| working-directory: ./candle-pyo3 | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-linux-${{ matrix.target }} | |
| path: ./candle-pyo3/dist | |
| windows: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| target: [x64, x86] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| architecture: ${{ matrix.target }} | |
| - name: Install Protoc | |
| uses: arduino/setup-protoc@v3 | |
| with: | |
| version: ${{ env.PROTOC_VERSION }} | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| args: --release --out dist --find-interpreter ${{ env.FEATURES_FLAG }} | |
| sccache: 'true' | |
| working-directory: ./candle-pyo3 | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: wheels-windows-${{ matrix.target }} | |
| path: ./candle-pyo3/dist | |
| macos: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| target: [x86_64, aarch64] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - name: Install Protoc | |
| uses: arduino/setup-protoc@v3 | |
| with: | |
| version: ${{ env.PROTOC_VERSION }} | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| args: --release --out dist --find-interpreter ${{ env.FEATURES_FLAG }} | |
| sccache: 'true' | |
| working-directory: ./candle-pyo3 | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: wheels-macos-${{ matrix.target }} | |
| path: ./candle-pyo3/dist | |
| sdist: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Protoc | |
| uses: arduino/setup-protoc@v2 | |
| with: | |
| version: ${{ env.PROTOC_VERSION }} | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build sdist | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| command: sdist | |
| args: --out dist | |
| working-directory: ./candle-pyo3 | |
| - name: Upload sdist | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: wheels-sdist | |
| path: ./candle-pyo3/dist | |