mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-04 10:52:56 +00:00
Compare commits
1 Commits
v0.1.2-dev
...
v0.1.2-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c4237c61d5 |
43
.github/workflows/release.yml
vendored
43
.github/workflows/release.yml
vendored
@@ -37,8 +37,8 @@ jobs:
|
|||||||
run: cargo package --all-features
|
run: cargo package --all-features
|
||||||
- uses: softprops/action-gh-release@v1
|
- uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
files: |
|
draft: true
|
||||||
rust/target/vectordb-*.crate
|
files: target/vectordb-*.crate
|
||||||
|
|
||||||
python:
|
python:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -55,11 +55,14 @@ jobs:
|
|||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.10
|
python-version: "3.10"
|
||||||
- name: Build wheel
|
- name: Build wheel
|
||||||
run: python setup.py sdist bdist_wheel
|
run: |
|
||||||
|
pip install wheel
|
||||||
|
python setup.py sdist bdist_wheel
|
||||||
- uses: softprops/action-gh-release@v1
|
- uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
|
draft: true
|
||||||
files: |
|
files: |
|
||||||
python/dist/lancedb-*.tar.gz
|
python/dist/lancedb-*.tar.gz
|
||||||
python/dist/lancedb-*.whl
|
python/dist/lancedb-*.whl
|
||||||
@@ -79,7 +82,6 @@ jobs:
|
|||||||
node-version: 20
|
node-version: 20
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: node/package-lock.json
|
cache-dependency-path: node/package-lock.json
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
@@ -91,12 +93,14 @@ jobs:
|
|||||||
npm pack
|
npm pack
|
||||||
- uses: softprops/action-gh-release@v1
|
- uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
|
draft: true
|
||||||
files: node/vectordb-*.tgz
|
files: node/vectordb-*.tgz
|
||||||
|
|
||||||
node-macos:
|
node-macos:
|
||||||
runs-on: macos-12
|
runs-on: macos-12
|
||||||
needs: draft-release
|
needs: draft-release
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
target: [x86_64-apple-darwin, aarch64-apple-darwin]
|
target: [x86_64-apple-darwin, aarch64-apple-darwin]
|
||||||
steps:
|
steps:
|
||||||
@@ -104,35 +108,54 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: brew install protobuf
|
run: brew install protobuf
|
||||||
|
- name: Install npm dependencies
|
||||||
|
run: |
|
||||||
|
cd node
|
||||||
|
npm ci
|
||||||
- name: Build MacOS native node modules
|
- name: Build MacOS native node modules
|
||||||
run: bash ci/build_macos_artifacts.sh ${{ matrix.target }}
|
run: bash ci/build_macos_artifacts.sh ${{ matrix.target }}
|
||||||
- uses: softprops/action-gh-release@v1
|
- uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
|
draft: true
|
||||||
files: node/dist/vectordb-darwin*.tgz
|
files: node/dist/vectordb-darwin*.tgz
|
||||||
|
|
||||||
node-linux:
|
node-linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: draft-release
|
needs: draft-release
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
target:
|
target:
|
||||||
- x86_64-unknown-linux-gnu:centos
|
- x86_64-unknown-linux-gnu
|
||||||
- aarch64-unknown-linux-gnu:centos
|
# TODO: get release working for these targets
|
||||||
- aarch64-unknown-linux-musl
|
# - aarch64-unknown-linux-gnu
|
||||||
- x86_64-unknown-linux-musl
|
# - aarch64-unknown-linux-musl
|
||||||
|
# - x86_64-unknown-linux-musl
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup Rust
|
||||||
|
uses: ATiltedTree/setup-rust@v1
|
||||||
|
with:
|
||||||
|
rust-version: stable
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y protobuf-compiler libssl-dev
|
sudo apt install -y protobuf-compiler libssl-dev
|
||||||
|
cargo install cross
|
||||||
|
- name: Install npm dependencies
|
||||||
|
run: |
|
||||||
|
cd node
|
||||||
|
npm ci
|
||||||
- name: Build Linux native node modules
|
- name: Build Linux native node modules
|
||||||
run: bash ci/build_linux_artifacts.sh ${{ matrix.target }}
|
run: bash ci/build_linux_artifacts.sh ${{ matrix.target }}
|
||||||
- uses: softprops/action-gh-release@v1
|
- uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
|
draft: true
|
||||||
files: node/dist/vectordb-linux*.tgz
|
files: node/dist/vectordb-linux*.tgz
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: [python, node, node-macos, node-linux]
|
needs: [python, node, node-macos, node-linux, rust]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
|
|||||||
34
Cross.toml
34
Cross.toml
@@ -1,14 +1,40 @@
|
|||||||
# These make sure our builds are compatible with old glibc versions.
|
# These make sure our builds are compatible with old glibc versions.
|
||||||
[target.x86_64-unknown-linux-gnu]
|
[target.x86_64-unknown-linux-gnu]
|
||||||
pre-build = [
|
pre-build = [
|
||||||
"dpkg --add-architecture $CROSS_DEB_ARCH",
|
# Install newer gfortran
|
||||||
"apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH protobuf-compiler",
|
"yum install -y centos-release-scl",
|
||||||
|
"yum install -y openssl-devel unzip devtoolset-11-gcc-gfortran",
|
||||||
|
"scl enable devtoolset-11 bash",
|
||||||
|
# protobuf is too old, so we directly download binaries
|
||||||
|
"PB_REL=https://github.com/protocolbuffers/protobuf/releases",
|
||||||
|
"PB_VERSION=23.1",
|
||||||
|
"curl -LO $PB_REL/download/v$PB_VERSION/protoc-$PB_VERSION-linux-x86_64.zip",
|
||||||
|
"unzip protoc-$PB_VERSION-linux-x86_64.zip -d /usr/local",
|
||||||
]
|
]
|
||||||
image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos"
|
image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos"
|
||||||
|
|
||||||
[target.aarch64-unknown-linux-gnu]
|
[target.aarch64-unknown-linux-gnu]
|
||||||
pre-build = [
|
pre-build = [
|
||||||
"dpkg --add-architecture $CROSS_DEB_ARCH",
|
"yum install -y openssl-devel unzip",
|
||||||
"apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH protobuf-compiler",
|
# protobuf is too old, so we directly download binaries
|
||||||
|
"PB_REL=https://github.com/protocolbuffers/protobuf/releases",
|
||||||
|
"PB_VERSION=23.1",
|
||||||
|
"curl -LO $PB_REL/download/v$PB_VERSION/protoc-$PB_VERSION-linux-x86_64.zip",
|
||||||
|
"unzip protoc-$PB_VERSION-linux-x86_64.zip -d /usr/local",
|
||||||
]
|
]
|
||||||
|
# https://github.com/cross-rs/cross/blob/main/docker/Dockerfile.aarch64-unknown-linux-gnu.centos
|
||||||
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main-centos"
|
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main-centos"
|
||||||
|
|
||||||
|
[target.x86_64-unknown-linux-musl]
|
||||||
|
# https://github.com/cross-rs/cross/blob/main/docker/Dockerfile.x86_64-unknown-linux-musl
|
||||||
|
pre-build = [
|
||||||
|
"dpkg --add-architecture $CROSS_DEB_ARCH",
|
||||||
|
"apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH",
|
||||||
|
]
|
||||||
|
|
||||||
|
[target.aarch64-unknown-linux-musl]
|
||||||
|
# https://github.com/cross-rs/cross/blob/main/docker/Dockerfile.aarch64-unknown-linux-musl
|
||||||
|
pre-build = [
|
||||||
|
"dpkg --add-architecture $CROSS_DEB_ARCH",
|
||||||
|
"apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH",
|
||||||
|
]
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ build_node_binaries() {
|
|||||||
do
|
do
|
||||||
echo "Building node library for $target"
|
echo "Building node library for $target"
|
||||||
# cross doesn't yet pass this down to Docker, so we do it ourselves.
|
# cross doesn't yet pass this down to Docker, so we do it ourselves.
|
||||||
if [[ $target == x86_64* ]]; then
|
export CROSS_CONTAINER_OPTS="--platform linux/amd64"
|
||||||
export CROSS_CONTAINER_OPTS="--platform linux/amd64"
|
if [[ $target == *musl ]]; then
|
||||||
else
|
# This is needed for cargo to allow build cdylibs with musl
|
||||||
export CROSS_CONTAINER_OPTS="--platform linux/arm64/v8"
|
RUSTFLAGS="-C target-feature=-crt-static"
|
||||||
fi
|
fi
|
||||||
npm run cross-release -- --target $target
|
npm run cross-release -- --target $target
|
||||||
npm run pack-build -- --target $target
|
npm run pack-build -- --target $target
|
||||||
|
|||||||
Reference in New Issue
Block a user