name: Python native package checks on: pull_request: push: branches: [main] workflow_dispatch: permissions: contents: read jobs: build-wheels: name: Build wheels on ${{ matrix.platform.os }} (${{ matrix.platform.target }}) runs-on: ${{ matrix.platform.os }} strategy: fail-fast: false matrix: platform: - os: namespace-profile-rust-builder-amd64 target: x86_64 manylinux: auto # Native arm64 runner + native PyPA image: the manylinux2014-cross image's # GCC 4.8 miscompiles ring's aarch64 crypto (TLS BadSignature at runtime). - os: ubuntu-24.04-arm target: aarch64 manylinux: '2014' manylinux_container: quay.io/pypa/manylinux2014_aarch64:latest - os: macos-15 target: aarch64 rust_target: aarch64-apple-darwin - os: windows-latest target: x86_64-pc-windows-msvc rust_target: x86_64-pc-windows-msvc steps: - uses: actions/checkout@v4 - name: Setup Python uses: actions/setup-python@v5 with: python-version: '3.10' - name: Install Rust toolchain if: runner.os != 'Linux' uses: dtolnay/rust-toolchain@1.98.1 with: targets: ${{ matrix.platform.rust_target }} - name: Cache Rust build artifacts (macOS) if: runner.os == 'macOS' uses: Swatinem/rust-cache@v2 with: prefix-key: v1-rust-no-bin cache-bin: false - name: Build wheels uses: PyO3/maturin-action@v1 env: CARGO_TARGET_DIR: target with: target: ${{ matrix.platform.target }} args: --release --no-default-features --out dist manylinux: ${{ matrix.platform.manylinux || 'auto' }} container: ${{ matrix.platform.manylinux_container || '' }} sccache: 'true' - name: Verify wheel imports Rust Cloud SDK extension run: | python .github/scripts/verify_wheel.py "dist/tensorlake-*.whl" tensorlake._cloud_sdk tensorlake.cli.deploy --tls-check https://api.tensorlake.ai --expect-script function-executor --expect-script tensorlake-python-function-runner --expect-script tensorlake-deploy --reject-script tl --reject-script tensorlake # These wheels omit Function Agent and must never be published. - name: Upload CI wheels uses: actions/upload-artifact@v4 with: name: ci-wheels-${{ matrix.platform.os }}-${{ matrix.platform.target }} retention-days: 3 path: dist