mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-05 19:32:56 +00:00
Compare commits
1 Commits
v0.1.2-dev
...
v0.1.2-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a5358d4af |
16
.github/workflows/release.yml
vendored
16
.github/workflows/release.yml
vendored
@@ -39,6 +39,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
files: target/vectordb-*.crate
|
files: target/vectordb-*.crate
|
||||||
|
fail_on_unmatched_files: true
|
||||||
|
|
||||||
python:
|
python:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -66,6 +67,7 @@ jobs:
|
|||||||
files: |
|
files: |
|
||||||
python/dist/lancedb-*.tar.gz
|
python/dist/lancedb-*.tar.gz
|
||||||
python/dist/lancedb-*.whl
|
python/dist/lancedb-*.whl
|
||||||
|
fail_on_unmatched_files: true
|
||||||
|
|
||||||
node:
|
node:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -95,6 +97,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
files: node/vectordb-*.tgz
|
files: node/vectordb-*.tgz
|
||||||
|
fail_on_unmatched_files: true
|
||||||
|
|
||||||
node-macos:
|
node-macos:
|
||||||
runs-on: macos-12
|
runs-on: macos-12
|
||||||
@@ -118,6 +121,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
files: node/dist/vectordb-darwin*.tgz
|
files: node/dist/vectordb-darwin*.tgz
|
||||||
|
fail_on_unmatched_files: true
|
||||||
|
|
||||||
node-linux:
|
node-linux:
|
||||||
name: node-linux (${{ matrix.arch}}-unknown-linux-${{ matrix.libc }})
|
name: node-linux (${{ matrix.arch}}-unknown-linux-${{ matrix.libc }})
|
||||||
@@ -128,13 +132,20 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
libc:
|
libc:
|
||||||
- gnu
|
- gnu
|
||||||
- musl
|
# TODO: re-enable musl once we have refactored to pre-built containers
|
||||||
|
# Right now we have to build node from source which is too expensive.
|
||||||
|
# - musl
|
||||||
arch:
|
arch:
|
||||||
- x86_64
|
- x86_64
|
||||||
- aarch64
|
- aarch64
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
- name: Set up QEMU
|
||||||
|
if: ${{ matrix.arch == 'aarch64' }}
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
with:
|
||||||
|
platforms: arm64
|
||||||
- name: Build Linux GNU native node modules
|
- name: Build Linux GNU native node modules
|
||||||
if: ${{ matrix.libc == 'gnu' }}
|
if: ${{ matrix.libc == 'gnu' }}
|
||||||
run: |
|
run: |
|
||||||
@@ -145,7 +156,7 @@ jobs:
|
|||||||
- name: Build musl Linux native node modules
|
- name: Build musl Linux native node modules
|
||||||
if: ${{ matrix.libc == 'musl' }}
|
if: ${{ matrix.libc == 'musl' }}
|
||||||
run: |
|
run: |
|
||||||
docker run \
|
docker run --platform linux/arm64/v8 \
|
||||||
-v $(pwd):/io -w /io \
|
-v $(pwd):/io -w /io \
|
||||||
quay.io/pypa/musllinux_1_1_${{ matrix.arch }} \
|
quay.io/pypa/musllinux_1_1_${{ matrix.arch }} \
|
||||||
bash ci/build_linux_artifacts.sh ${{ matrix.arch }}-unknown-linux-musl
|
bash ci/build_linux_artifacts.sh ${{ matrix.arch }}-unknown-linux-musl
|
||||||
@@ -153,6 +164,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
files: node/dist/vectordb-linux*.tgz
|
files: node/dist/vectordb-linux*.tgz
|
||||||
|
fail_on_unmatched_files: true
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: [python, node, node-macos, node-linux, rust]
|
needs: [python, node, node-macos, node-linux, rust]
|
||||||
|
|||||||
@@ -7,10 +7,7 @@
|
|||||||
# - aarch64-unknown-linux-musl
|
# - aarch64-unknown-linux-musl
|
||||||
# - x86_64-unknown-linux-musl
|
# - x86_64-unknown-linux-musl
|
||||||
|
|
||||||
# On MacOS, need to run in a linux container:
|
# TODO: refactor this into a Docker container we can pull
|
||||||
# docker run -v $(pwd):/io -w /io
|
|
||||||
|
|
||||||
# Must run rustup toolchain install stable-x86_64-unknown-linux-gnu --force-non-host
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -40,11 +37,15 @@ setup_dependencies() {
|
|||||||
|
|
||||||
install_node() {
|
install_node() {
|
||||||
echo "Installing node..."
|
echo "Installing node..."
|
||||||
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
|
||||||
|
source "$HOME"/.bashrc
|
||||||
|
|
||||||
if [[ $1 == *musl ]]; then
|
if [[ $1 == *musl ]]; then
|
||||||
apk add nodejs-current npm
|
# This node version is 15, we need 16 or higher:
|
||||||
|
# apk add nodejs-current npm
|
||||||
|
# So instead we install from source (nvm doesn't provide binaries for musl):
|
||||||
|
nvm install -s 17
|
||||||
else
|
else
|
||||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
|
|
||||||
source "$HOME"/.nvm/nvm.sh
|
|
||||||
nvm install 17 # latest that supports glibc 2.17
|
nvm install 17 # latest that supports glibc 2.17
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -53,7 +54,6 @@ install_rust() {
|
|||||||
echo "Installing rust..."
|
echo "Installing rust..."
|
||||||
curl https://sh.rustup.rs -sSf | bash -s -- -y
|
curl https://sh.rustup.rs -sSf | bash -s -- -y
|
||||||
export PATH="$PATH:/root/.cargo/bin"
|
export PATH="$PATH:/root/.cargo/bin"
|
||||||
rustup target add $1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build_node_binary() {
|
build_node_binary() {
|
||||||
@@ -64,8 +64,10 @@ build_node_binary() {
|
|||||||
# This is needed for cargo to allow build cdylibs with musl
|
# This is needed for cargo to allow build cdylibs with musl
|
||||||
export RUSTFLAGS="-C target-feature=-crt-static"
|
export RUSTFLAGS="-C target-feature=-crt-static"
|
||||||
fi
|
fi
|
||||||
npm run build-release -- --target $1
|
# We don't pass in target, since the native target here already matches
|
||||||
npm run pack-build -- --target $1
|
# and openblas-src doesn't do well with cross-compilation.
|
||||||
|
npm run build-release
|
||||||
|
npm run pack-build
|
||||||
|
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
@@ -77,6 +79,6 @@ TARGET=${1:-x86_64-unknown-linux-gnu}
|
|||||||
# aarch64-unknown-linux-musl
|
# aarch64-unknown-linux-musl
|
||||||
|
|
||||||
setup_dependencies $TARGET
|
setup_dependencies $TARGET
|
||||||
install_node
|
install_node $TARGET
|
||||||
install_rust $TARGET
|
install_rust
|
||||||
build_node_binary $TARGET
|
build_node_binary $TARGET
|
||||||
|
|||||||
@@ -102,3 +102,10 @@ docker run -it \
|
|||||||
bash
|
bash
|
||||||
```
|
```
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run \
|
||||||
|
-v $(pwd):/io -w /io \
|
||||||
|
quay.io/pypa/musllinux_1_1_aarch64 \
|
||||||
|
bash alpine_repro.sh
|
||||||
|
```
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
# On MacOS, need to run in a linux container:
|
|
||||||
# cat ci/ubuntu_build.dockerfile | docker build -t lancedb-node-build -
|
|
||||||
# docker run -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/io -w /io lancedb-node-build bash ci/build_linux_artifacts.sh
|
|
||||||
FROM ubuntu:20.04
|
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
|
||||||
ENV TZ=Europe/Moscow
|
|
||||||
|
|
||||||
RUN apt update && apt install -y protobuf-compiler libssl-dev build-essential curl \
|
|
||||||
software-properties-common npm docker.io
|
|
||||||
|
|
||||||
# Install rust
|
|
||||||
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
|
|
||||||
|
|
||||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
|
||||||
|
|
||||||
# Install cross
|
|
||||||
# https://github.com/cross-rs/cross/issues/1257#issuecomment-1544553706
|
|
||||||
RUN cargo install cross --git https://github.com/cross-rs/cross
|
|
||||||
|
|
||||||
# Install additional build targets
|
|
||||||
RUN rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu aarch64-unknown-linux-musl x86_64-unknown-linux-musl
|
|
||||||
|
|
||||||
# Install node
|
|
||||||
RUN npm install npm@latest -g && \
|
|
||||||
npm install n -g && \
|
|
||||||
n latest
|
|
||||||
|
|
||||||
# set CROSS_CONTAINER_IN_CONTAINER to inform `cross` that it is executed from within a container
|
|
||||||
ENV CROSS_CONTAINER_IN_CONTAINER=true
|
|
||||||
ENV CROSS_CONTAINER_ENGINE_NO_BUILDKIT=1
|
|
||||||
Reference in New Issue
Block a user