Skip to content

armgit / LEANN

Public Imported from GitHub
0

[MLsys2026 Best Paper]: https://arxiv.org/abs/2506.08276. RAG on Everything with LEANN. Enjoy 97% storage savings while running a fast, accurate, and 100% private RAG application on your personal device.

fix: resolve CI issues and consolidate workflows

Andy Lee133e7158326c
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
deleted file mode 100644
index 9aa4b72..0000000
--- a/.github/workflows/ci.yml
+++ /dev/null
@@ -1,110 +0,0 @@
-name: CI - Build and Test
-
-on:
- push:
- branches: [ main ]
- pull_request:
- branches: [ main ]
-
-jobs:
- build-test:
- strategy:
- matrix:
- os: [ubuntu-latest, macos-latest]
- python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
-
- runs-on: ${{ matrix.os }}
-
- steps:
- - uses: actions/checkout@v4
- with:
- submodules: recursive
-
- - name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v5
- with:
- python-version: ${{ matrix.python-version }}
-
- - name: Install uv
- run: |
- curl -LsSf https://astral.sh/uv/install.sh | sh
- echo "$HOME/.cargo/bin" >> $GITHUB_PATH
-
- - name: Install system dependencies (Ubuntu)
- if: runner.os == 'Linux'
- run: |
- sudo apt-get update
- sudo apt-get install -y libomp-dev libboost-all-dev libzmq3-dev \
- pkg-config libopenblas-dev patchelf \
- libaio-dev protobuf-compiler libprotobuf-dev libabsl-dev
-
- # Install Intel MKL for DiskANN
- wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/79153e0f-74d7-45af-b8c2-258941adf58a/intel-onemkl-2025.0.0.940.sh
- sudo sh intel-onemkl-2025.0.0.940.sh -a --components intel.oneapi.lin.mkl.devel --action install --eula accept -s
- source /opt/intel/oneapi/setvars.sh
- echo "MKLROOT=/opt/intel/oneapi/mkl/latest" >> $GITHUB_ENV
- echo "LD_LIBRARY_PATH=/opt/intel/oneapi/mkl/latest/lib/intel64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
-
- - name: Install system dependencies (macOS)
- if: runner.os == 'macOS'
- run: |
- brew install libomp boost zeromq protobuf
-
- - name: Build all packages
- run: |
- echo "🔨 Building on ${{ matrix.os }} with Python ${{ matrix.python-version }}..."
- export UV_SYSTEM_PYTHON=1
-
- # Verify Python version
- python --version
- which python
-
- # Build each package
- for pkg in leann-core leann-backend-hnsw leann-backend-diskann leann; do
- echo "Building $pkg..."
- cd packages/$pkg
- rm -rf dist/ build/ _skbuild/
- # Use explicit python interpreter
- uv build --wheel --python python
- if [ ! -f dist/*.whl ]; then
- echo "❌ Failed to build $pkg!"
- exit 1
- fi
- echo "✅ $pkg built successfully"
- cd ../..
- done
-
- - name: Install and test packages
- run: |
- # Create clean test environment
- python -m venv test_env
- if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
- source test_env/Scripts/activate
- else
- source test_env/bin/activate
- fi
-
- # Install built packages
- pip install packages/*/dist/*.whl
-
- # Basic import test
- python -c "import leann; print('✅ LEANN imported successfully')"
- python -c "import leann_backend_hnsw; print('✅ HNSW backend imported')"
- python -c "import leann_backend_diskann; print('✅ DiskANN backend imported')"
-
- - name: Upload artifacts
- uses: actions/upload-artifact@v4
- with:
- name: wheels-${{ matrix.os }}-py${{ matrix.python-version }}
- path: packages/*/dist/*.whl
- retention-days: 7
-
- # Summary job to ensure all builds pass
- ci-success:
- needs: build-test
- runs-on: ubuntu-latest
- steps:
- - name: CI Success
- run: |
- echo "✅ All CI builds passed!"
- echo "Ready for manual release when needed."
\ No newline at end of file
diff --git a/.github/workflows/release-manual.yml b/.github/workflows/release-manual.yml
index 66aa0a0..e686578 100644
--- a/.github/workflows/release-manual.yml
+++ b/.github/workflows/release-manual.yml
@@ -71,7 +71,7 @@ jobs:
# Get the latest successful CI run on the previous commit (before version bump)
COMMIT_SHA=$(git rev-parse HEAD~1)
RUN_ID=$(gh run list \
- --workflow="CI - Build and Test" \
+ --workflow="CI - Build Multi-Platform Packages" \
--status=success \
--commit=$COMMIT_SHA \
--json databaseId \
diff --git a/packages/leann-backend-diskann/pyproject.toml b/packages/leann-backend-diskann/pyproject.toml
index 63f9f41..7914ca0 100644
--- a/packages/leann-backend-diskann/pyproject.toml
+++ b/packages/leann-backend-diskann/pyproject.toml
@@ -5,7 +5,7 @@ build-backend = "scikit_build_core.build"
[project]
name = "leann-backend-diskann"
version = "0.1.1"
-dependencies = ["leann-core==0.1.0", "numpy"]
+dependencies = ["leann-core==0.1.1", "numpy"]
[tool.scikit-build]
# Key: simplified CMake path
diff --git a/packages/leann-backend-hnsw/pyproject.toml b/packages/leann-backend-hnsw/pyproject.toml
index 9bf00ac..be310d9 100644
--- a/packages/leann-backend-hnsw/pyproject.toml
+++ b/packages/leann-backend-hnsw/pyproject.toml
@@ -9,7 +9,7 @@ name = "leann-backend-hnsw"
version = "0.1.1"
description = "Custom-built HNSW (Faiss) backend for the Leann toolkit."
dependencies = [
- "leann-core==0.1.0",
+ "leann-core==0.1.1",
"numpy",
"pyzmq>=23.0.0",
"msgpack>=1.0.0",