Use canonical UniFFI bindgen target #4
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 embedded wheels | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - "bindings/uniffi/**" | |
| - "crates/**" | |
| - "sdks/python/**" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - ".github/workflows/python-embedded-wheels.yml" | |
| push: | |
| branches: [main, dev, "codex/**"] | |
| paths: | |
| - "bindings/uniffi/**" | |
| - "crates/**" | |
| - "sdks/python/**" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - ".github/workflows/python-embedded-wheels.yml" | |
| permissions: | |
| contents: read | |
| jobs: | |
| wheels: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: manylinux-x86_64 | |
| runner: ubuntu-24.04 | |
| target: x86_64-unknown-linux-gnu | |
| manylinux: "2_28" | |
| - name: manylinux-aarch64 | |
| runner: ubuntu-24.04-arm | |
| target: aarch64-unknown-linux-gnu | |
| manylinux: "2_28" | |
| - name: macos-universal2 | |
| runner: macos-14 | |
| target: universal2-apple-darwin | |
| manylinux: "off" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Build wheel | |
| uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 | |
| with: | |
| maturin-version: v1.11.5 | |
| working-directory: bindings/uniffi | |
| target: ${{ matrix.target }} | |
| manylinux: ${{ matrix.manylinux }} | |
| args: --release --locked --compatibility pypi --out dist | |
| - name: Validate wheel metadata | |
| run: | | |
| python -m pip install --upgrade twine | |
| python -m twine check bindings/uniffi/dist/* | |
| - name: Smoke-test installed wheel | |
| run: | | |
| python -m venv .wheel-smoke | |
| .wheel-smoke/bin/python -m pip install --upgrade pip | |
| .wheel-smoke/bin/python -m pip install "helix-db==0.2.0b1" bindings/uniffi/dist/* | |
| .wheel-smoke/bin/python bindings/uniffi/smoke.py | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: helix-db-embedded-${{ matrix.name }} | |
| path: bindings/uniffi/dist/* | |
| if-no-files-found: error |