Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Publish to npm

on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

permissions:
contents: read

jobs:
publish-linux-bindings:
strategy:
matrix:
include:
- runner: ubuntu-latest
image: quay.io/pypa/manylinux_2_28_x86_64
cmake_url: https://cmake.org/files/v3.27/cmake-3.27.9-linux-x86_64.tar.gz
- runner: ubuntu-24.04-arm
image: quay.io/pypa/manylinux_2_28_aarch64
cmake_url: https://cmake.org/files/v3.27/cmake-3.27.9-linux-aarch64.tar.gz
runs-on: ${{ matrix.runner }}
container:
image: ${{ matrix.image }}

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22.x"
registry-url: "https://registry.npmjs.org"

- name: Install Dependencies
run: |
curl -sL ${{ matrix.cmake_url }} | tar xz -C /usr/local --strip-components=1
npm install --ignore-scripts

- name: Build and Publish Bindings
run: npm run publish:bindings -- --force
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-macos-bindings:
runs-on: macos-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22.x"
registry-url: "https://registry.npmjs.org"

- name: Install Dependencies
run: |
curl -sL https://cmake.org/files/v3.27/cmake-3.27.9-macos-universal.tar.gz | tar xz
echo "$(pwd)/cmake-3.27.9-macos-universal/CMake.app/Contents/bin" >> $GITHUB_PATH
npm install --ignore-scripts

- name: Build and Publish Bindings
run: npm run publish:bindings -- --force
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-windows-bindings:
runs-on: windows-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22.x"
registry-url: "https://registry.npmjs.org"

- name: Install Dependencies
run: |
Invoke-WebRequest -Uri "https://cmake.org/files/v3.27/cmake-3.27.9-windows-x86_64.zip" -OutFile cmake.zip
Expand-Archive cmake.zip -DestinationPath cmake
echo "$((Resolve-Path cmake\cmake-3.27.9-windows-x86_64\bin).Path)" >> $env:GITHUB_PATH
npm install --ignore-scripts

- name: Build and Publish Bindings
run: npm run publish:bindings -- --force
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
node-version: "22.x"

- name: Debug Environment
run: node -p "process.platform + ' ' + process.arch"
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/test-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ permissions:
jobs:
test-source:
runs-on: ubuntu-latest
container:
image: quay.io/pypa/manylinux_2_28_x86_64

steps:
- name: Check CPU Info
run: lscpu

- name: Checkout Code
uses: actions/checkout@v4
with:
Expand All @@ -32,10 +31,12 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
node-version: "22.x"

- name: Install Dependencies
run: npm install
run: |
curl -sL https://cmake.org/files/v3.27/cmake-3.27.9-linux-x86_64.tar.gz | tar xz -C /usr/local --strip-components=1
npm install --ignore-scripts

- name: Build Binaries
run: npm run dev
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,19 @@ A Node.js binding for [Zvec](https://github.com/alibaba/zvec) —— a lightweig
- **Hybrid Search**: Combine semantic similarity with structured filters for precise results.
- **Runs Anywhere**: As an in-process library, Zvec runs wherever your code runs — notebooks, servers, CLI tools, or even edge devices.

## Installation
## 📦 Installation

Install the package using npm:

```bash
npm install @zvec/zvec
```

### Supported Platforms
### 🖥️ Supported Platforms

- Linux (x86_64/ARM64)
- macOS (ARM64)
- 🐧 Linux (x86_64/ARM64)
- 🍎 macOS (ARM64)
- 🪟 Windows (x86_64)

### 🛠️ Building from Source

Expand Down
Loading