0.40.1 #123
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 application | |
| on: | |
| push: | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+" | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| windows: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
| target: [x86, x64] | |
| defaults: | |
| run: | |
| working-directory: ./src/python | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - name: Install Protoc | |
| uses: arduino/setup-protoc@v3 | |
| - if: matrix.python-version == '3.13' | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.13 | |
| architecture: ${{ matrix.target }} | |
| - name: Build Wheels | |
| uses: PyO3/maturin-action@v1 | |
| env: | |
| MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
| with: | |
| command: publish | |
| target: ${{ matrix.target }} | |
| args: -i ${{ matrix.python-version }} --no-sdist --skip-existing -m src/python/Cargo.toml | |
| linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
| target: [x86_64, aarch64] | |
| defaults: | |
| run: | |
| working-directory: ./src/python | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - name: Build Wheels | |
| uses: PyO3/maturin-action@v1 | |
| env: | |
| MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
| with: | |
| command: publish | |
| target: ${{ matrix.target }} | |
| args: --no-default-features -i ${{ matrix.python-version }} --no-sdist --skip-existing -m src/python/Cargo.toml | |
| before-script-linux: | | |
| case "${{ matrix.target }}" in | |
| "aarch64") | |
| # NOTE: pypa/manylinux docker images are Debian based | |
| apt-get update | |
| apt-get install -y protobuf-compiler | |
| ;; | |
| "x86" | "x86_64") | |
| # NOTE: rust-cross/manylinux docker images are CentOS based | |
| yum install -y wget | |
| wget https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protoc-25.1-linux-x86_64.zip | |
| unzip protoc-25.1-linux-x86_64.zip -d $HOME/protoc | |
| mv $HOME/protoc/bin/protoc /usr/local/bin | |
| mv $HOME/protoc/include/* /usr/local/include/ | |
| chmod 755 /usr/local/bin/protoc | |
| ;; | |
| esac | |
| macos: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
| target: [x86_64, aarch64] | |
| defaults: | |
| run: | |
| working-directory: ./src/python | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - name: Install Protoc | |
| run: | | |
| brew update | |
| brew install protobuf | |
| - name: Build Wheels | |
| uses: PyO3/maturin-action@v1 | |
| env: | |
| MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
| with: | |
| command: publish | |
| target: ${{ matrix.target }} | |
| args: -i ${{ matrix.python-version }} --no-sdist --skip-existing -m src/python/Cargo.toml |