fix: use pyo3 abi3-py311 for cross-platform wheel compatibility #28
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install Python | |
| run: uv python install 3.14 | |
| - name: Rust format check | |
| run: cargo fmt --check | |
| - name: Clippy | |
| run: cargo clippy -- -D warnings | |
| - name: Ruff check | |
| run: uvx ruff check turboterm/ tests/ examples/ scripts/ | |
| - name: Ruff format check | |
| run: uvx ruff format --check turboterm/ tests/ examples/ scripts/ | |
| test: | |
| name: Test | |
| needs: lint | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install Python | |
| run: uv python install 3.14 | |
| - name: Create venv and install deps | |
| run: uv sync | |
| - name: Build extension | |
| run: uv run maturin develop | |
| - name: Run tests | |
| run: uv run python -m unittest discover tests -v | |
| build: | |
| name: Build wheel (${{ matrix.os }}) | |
| needs: test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| maturin-args: --release --out dist | |
| - os: macos-latest | |
| maturin-args: --release --out dist --target universal2-apple-darwin | |
| rust-target: x86_64-apple-darwin | |
| - os: windows-latest | |
| maturin-args: --release --out dist | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.rust-target || '' }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install Python | |
| run: uv python install 3.14 | |
| - name: Create venv and install deps | |
| run: uv sync | |
| - name: Build wheel | |
| run: uv run maturin build ${{ matrix.maturin-args }} | |
| - name: Upload wheel | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheel-${{ matrix.os }} | |
| path: dist/*.whl |