mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-27 04:53:59 +00:00
feat(cli): package release binaries as lancedb-tools wheels (#5214)
Python users can install the LanceDB SDK today. This adds a separate `lancedb-tools` distribution so they can also run the standalone `lancedb` CLI with `uvx` or install it with `pipx`. The wheels bundle the same binaries shipped through GitHub Releases for Apple Silicon macOS, Linux ARM64, and Linux x86-64. The workflow uploads the wheels to GitHub Actions for testing. PyPI publication will wait for a stable release. This was accomplished with the following changes: - Verify the release archives against `SHA256SUMS` and bundle each binary with its license and third-party notices in a platform-specific wheel. - Add the `lancedb` entry point and document how to build and test wheels from a release tag. - Exercise each wheel with both `uvx` and `pipx` on a native runner. ### Testing All six installation checks passed against `v0.42.0-beta.30` (Python version `0.42.0b30`). On Apple Silicon macOS, Linux ARM64, and Linux x86-64, both `uvx` and `pipx` reported `lancedb 0.42.0-beta.30` and listed the built-in local profile. [Native test results and wheel artifacts](https://github.com/lancedb/lancedb/actions/runs/45680764524) Locally verified that all three wheels contain byte-for-byte copies of the released binary and license notices. All 38 tests in `ci/tests` discovered by Python unittest passed.
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
name: CLI Python wheels
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- ci/cli_wheel/**
|
||||
- ci/build_cli_wheels.py
|
||||
- ci/package_cli.py
|
||||
- .github/workflows/cli-wheels.yml
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: Published CLI release to package
|
||||
required: true
|
||||
default: v0.42.0-beta.30
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
CLI_TAG: ${{ inputs.tag || 'v0.42.0-beta.30' }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.13'
|
||||
- run: python -m pip install wheel==0.48.0
|
||||
- name: Build wheels from published release archives
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
gh release download --repo lancedb/lancedb --dir archives \
|
||||
--pattern 'lancedb-*.tar.gz' --pattern SHA256SUMS -- "$CLI_TAG"
|
||||
python -m ci.build_cli_wheels "$CLI_TAG" archives wheels
|
||||
- uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: lancedb-tools-wheels
|
||||
path: wheels/*.whl
|
||||
if-no-files-found: error
|
||||
compression-level: 0
|
||||
|
||||
install:
|
||||
needs: build
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-15, ubuntu-24.04, ubuntu-24.04-arm]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.13'
|
||||
- uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: lancedb-tools-wheels
|
||||
path: wheels
|
||||
- run: python -m pip install uv==0.13.9 pipx==1.19.0
|
||||
- name: Install and exercise the native CLI with uvx and pipx
|
||||
run: bash ci/cli_wheel/test_install.sh "$CLI_TAG" "$PWD/wheels"
|
||||
Reference in New Issue
Block a user