mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-27 07:09:57 +00:00
- Move native packages to @lancedb org - Move package-lock.json update to a reusable action and created a target to run it manually.
110 lines
2.5 KiB
YAML
110 lines
2.5 KiB
YAML
name: Node
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
paths:
|
|
- node/**
|
|
- rust/ffi/node/**
|
|
- .github/workflows/node.yml
|
|
|
|
env:
|
|
# Disable full debug symbol generation to speed up CI build and keep memory down
|
|
# "1" means line tables only, which is useful for panic tracebacks.
|
|
RUSTFLAGS: "-C debuginfo=1"
|
|
RUST_BACKTRACE: "1"
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-22.04
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: node
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
cache: 'npm'
|
|
cache-dependency-path: node/package-lock.json
|
|
- name: Lint
|
|
run: |
|
|
npm ci
|
|
npm run lint
|
|
linux:
|
|
name: Linux (Node ${{ matrix.node-version }})
|
|
timeout-minutes: 30
|
|
strategy:
|
|
matrix:
|
|
node-version: [ "16", "18" ]
|
|
runs-on: "ubuntu-22.04"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: node
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: 'npm'
|
|
cache-dependency-path: node/package-lock.json
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y protobuf-compiler libssl-dev
|
|
- name: Build
|
|
run: |
|
|
npm ci
|
|
npm run tsc
|
|
npm run build
|
|
npm run pack-build
|
|
npm install --no-save ./dist/lancedb-vectordb-*.tgz
|
|
# Remove index.node to test with dependency installed
|
|
rm index.node
|
|
- name: Test
|
|
run: npm run test
|
|
macos:
|
|
timeout-minutes: 30
|
|
runs-on: "macos-13"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: node
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
cache: 'npm'
|
|
cache-dependency-path: node/package-lock.json
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Install dependencies
|
|
run: brew install protobuf
|
|
- name: Build
|
|
run: |
|
|
npm ci
|
|
npm run tsc
|
|
npm run build
|
|
npm run pack-build
|
|
npm install --no-save ./dist/lancedb-vectordb-*.tgz
|
|
# Remove index.node to test with dependency installed
|
|
rm index.node
|
|
- name: Test
|
|
run: |
|
|
npm run test
|