fix: resolve CI issues and consolidate workflows
- Fix version dependencies: update backend packages to depend on leann-core==0.1.1 - Remove duplicate ci.yml workflow (keeping build-and-publish.yml as main CI) - Update release-manual.yml to reference correct CI workflow name This fixes the dependency resolution error and eliminates duplicate builds.
This commit is contained in:
110
.github/workflows/ci.yml
vendored
110
.github/workflows/ci.yml
vendored
@@ -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."
|
||||
2
.github/workflows/release-manual.yml
vendored
2
.github/workflows/release-manual.yml
vendored
@@ -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 \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user