fix: auto-detect Homebrew paths for both DiskANN and HNSW backends
- Fix DiskANN CMakeLists.txt path reference - Add macOS environment variable detection for OpenMP_ROOT - Support both Intel (/usr/local) and Apple Silicon (/opt/homebrew) paths
This commit is contained in:
12
.github/workflows/build-reusable.yml
vendored
12
.github/workflows/build-reusable.yml
vendored
@@ -119,6 +119,18 @@ jobs:
|
||||
uv pip install --system delocate
|
||||
fi
|
||||
|
||||
- name: Set macOS environment variables
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
# Detect Homebrew installation path and set environment variables
|
||||
if [ -d "/opt/homebrew/opt/libomp" ]; then
|
||||
echo "HOMEBREW_PREFIX=/opt/homebrew" >> $GITHUB_ENV
|
||||
echo "OpenMP_ROOT=/opt/homebrew/opt/libomp" >> $GITHUB_ENV
|
||||
elif [ -d "/usr/local/opt/libomp" ]; then
|
||||
echo "HOMEBREW_PREFIX=/usr/local" >> $GITHUB_ENV
|
||||
echo "OpenMP_ROOT=/usr/local/opt/libomp" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Build packages
|
||||
run: |
|
||||
# Build core (platform independent)
|
||||
|
||||
@@ -5,4 +5,4 @@ project(leann_backend_diskann_wrapper)
|
||||
|
||||
# Tell CMake to directly enter the DiskANN submodule and execute its own CMakeLists.txt
|
||||
# DiskANN will handle everything itself, including compiling Python bindings
|
||||
add_subdirectory(src/third_party/DiskANN)
|
||||
add_subdirectory(third_party/DiskANN)
|
||||
|
||||
Reference in New Issue
Block a user