mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-25 14:29:56 +00:00
64 lines
2.2 KiB
YAML
64 lines
2.2 KiB
YAML
# We create a composite action to be re-used both for testing and for releasing
|
|
name: build-linux-wheel
|
|
description: "Build a manylinux wheel for lance"
|
|
inputs:
|
|
python-minor-version:
|
|
description: "8, 9, 10, 11, 12"
|
|
required: true
|
|
args:
|
|
description: "--release"
|
|
required: false
|
|
default: ""
|
|
arm-build:
|
|
description: "Build for arm64 instead of x86_64"
|
|
# Note: this does *not* mean the host is arm64, since we might be cross-compiling.
|
|
required: false
|
|
default: "false"
|
|
manylinux:
|
|
description: "The manylinux version to build for"
|
|
required: false
|
|
default: "2_17"
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: CONFIRM ARM BUILD
|
|
shell: bash
|
|
run: |
|
|
echo "ARM BUILD: ${{ inputs.arm-build }}"
|
|
- name: Build x86_64 Manylinux wheel
|
|
if: ${{ inputs.arm-build == 'false' }}
|
|
uses: PyO3/maturin-action@v1
|
|
with:
|
|
command: build
|
|
working-directory: python
|
|
target: x86_64-unknown-linux-gnu
|
|
manylinux: ${{ inputs.manylinux }}
|
|
args: ${{ inputs.args }}
|
|
before-script-linux: |
|
|
set -e
|
|
yum install -y openssl-devel \
|
|
&& curl -L https://github.com/protocolbuffers/protobuf/releases/download/v24.4/protoc-24.4-linux-$(uname -m).zip > /tmp/protoc.zip \
|
|
&& unzip /tmp/protoc.zip -d /usr/local \
|
|
&& rm /tmp/protoc.zip
|
|
- name: Build Arm Manylinux Wheel
|
|
if: ${{ inputs.arm-build == 'true' }}
|
|
uses: PyO3/maturin-action@v1
|
|
with:
|
|
command: build
|
|
working-directory: python
|
|
docker-options: "-e PIP_EXTRA_INDEX_URL=https://pypi.fury.io/lancedb/"
|
|
target: aarch64-unknown-linux-gnu
|
|
manylinux: ${{ inputs.manylinux }}
|
|
args: ${{ inputs.args }}
|
|
before-script-linux: |
|
|
set -e
|
|
apt install -y unzip
|
|
if [ $(uname -m) = "x86_64" ]; then
|
|
PROTOC_ARCH="x86_64"
|
|
else
|
|
PROTOC_ARCH="aarch_64"
|
|
fi
|
|
curl -L https://github.com/protocolbuffers/protobuf/releases/download/v24.4/protoc-24.4-linux-$PROTOC_ARCH.zip > /tmp/protoc.zip \
|
|
&& unzip /tmp/protoc.zip -d /usr/local \
|
|
&& rm /tmp/protoc.zip
|