⬆️ [pre-commit.ci] pre-commit autoupdate #323
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: Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**.md' | |
| tags: | |
| - '**' | |
| workflow_dispatch: ~ | |
| pull_request: | |
| paths-ignore: | |
| - '**.md' | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| rust-toolchain: nightly-2025-06-06 | |
| command: build | |
| args: --release --out dist | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: linux-${{ matrix.python-version }}-wheels | |
| path: dist | |
| windows: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| rust-toolchain: nightly-2025-06-06 | |
| command: build | |
| args: --release --out dist | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: win-${{ matrix.python-version }}-wheels | |
| path: dist | |
| macos: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| rust-toolchain: nightly-2025-06-06 | |
| command: build | |
| args: --release --out dist --sdist | |
| - name: Build wheels - universal2 | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| command: build | |
| args: --release --out dist | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: mac-${{ matrix.python-version }}-wheels | |
| path: dist | |
| linux-cross: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target: ['aarch64'] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: true | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| rust-toolchain: nightly-2025-06-06 | |
| target: ${{ matrix.target }} | |
| manylinux: auto | |
| args: --release --out dist --interpreter 3.10 3.11 3.12 3.13 3.14 | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: linux-c-${{ matrix.target }}-wheels | |
| path: dist | |
| merge: | |
| runs-on: ubuntu-latest | |
| needs: [linux, windows , macos , linux-cross] | |
| steps: | |
| - name: Merge Artifacts | |
| uses: actions/upload-artifact/merge@v5 | |
| with: | |
| name: wheels | |
| delete-merged: true | |
| releases: | |
| runs-on: ubuntu-latest | |
| needs: [merge] | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.12 | |
| - name: Install Twine | |
| run: | | |
| pip install twine | |
| - name: get dist artifacts | |
| uses: actions/download-artifact@v6 | |
| with: | |
| name: wheels | |
| path: dist | |
| - name: upload to pypi | |
| run: twine upload dist/* | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} |