fix: adjust configuration for Colab compatibility
- Remove Windows support as not needed - Move Python finding hints to cibuildwheel environment variables - Keep pyproject.toml clean to avoid breaking normal builds - Target manylinux_2_28 for better Colab compatibility
This commit is contained in:
12
.github/workflows/build-cibuildwheel.yml
vendored
12
.github/workflows/build-cibuildwheel.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -58,9 +58,6 @@ jobs:
|
||||
CIBW_BEFORE_ALL_MACOS: |
|
||||
brew install boost zeromq openblas cmake
|
||||
|
||||
CIBW_BEFORE_ALL_WINDOWS: |
|
||||
choco install cmake -y
|
||||
|
||||
# Test the wheel
|
||||
CIBW_TEST_COMMAND: |
|
||||
python -c "import leann_backend_hnsw; print('HNSW backend imported successfully')"
|
||||
@@ -68,6 +65,8 @@ jobs:
|
||||
# Environment variables for build
|
||||
CIBW_ENVIRONMENT: |
|
||||
CMAKE_BUILD_PARALLEL_LEVEL=8
|
||||
Python_FIND_VIRTUALENV=ONLY
|
||||
Python3_FIND_VIRTUALENV=ONLY
|
||||
|
||||
- name: Build leann-backend-diskann wheels
|
||||
uses: pypa/cibuildwheel@v2.20.0
|
||||
@@ -88,14 +87,13 @@ jobs:
|
||||
CIBW_BEFORE_ALL_MACOS: |
|
||||
brew install boost zeromq openblas cmake
|
||||
|
||||
CIBW_BEFORE_ALL_WINDOWS: |
|
||||
choco install cmake -y
|
||||
|
||||
CIBW_TEST_COMMAND: |
|
||||
python -c "import leann_backend_diskann; print('DiskANN backend imported successfully')"
|
||||
|
||||
CIBW_ENVIRONMENT: |
|
||||
CMAKE_BUILD_PARALLEL_LEVEL=8
|
||||
Python_FIND_VIRTUALENV=ONLY
|
||||
Python3_FIND_VIRTUALENV=ONLY
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
@@ -21,7 +21,4 @@ wheel.exclude = ["CMakeLists.txt", "src", "third_party/**", "*.o", "*.so"]
|
||||
sdist.include = ["CMakeLists.txt", "src", "third_party", "leann_backend_diskann/*.txt"]
|
||||
|
||||
[tool.scikit-build.cmake.define]
|
||||
CMAKE_BUILD_PARALLEL_LEVEL = "8"
|
||||
# Help CMake find Python in cibuildwheel environments
|
||||
Python_FIND_VIRTUALENV = "ONLY"
|
||||
Python3_FIND_VIRTUALENV = "ONLY"
|
||||
CMAKE_BUILD_PARALLEL_LEVEL = "8"
|
||||
@@ -24,7 +24,4 @@ cmake.verbose = true
|
||||
|
||||
# CMake definitions to optimize compilation
|
||||
[tool.scikit-build.cmake.define]
|
||||
CMAKE_BUILD_PARALLEL_LEVEL = "8"
|
||||
# Help CMake find Python in cibuildwheel environments
|
||||
Python_FIND_VIRTUALENV = "ONLY"
|
||||
Python3_FIND_VIRTUALENV = "ONLY"
|
||||
CMAKE_BUILD_PARALLEL_LEVEL = "8"
|
||||
@@ -79,7 +79,3 @@ before-all = """
|
||||
# macOS系统依赖
|
||||
[tool.cibuildwheel.macos]
|
||||
before-all = "brew install boost zeromq openblas cmake"
|
||||
|
||||
# Windows系统依赖
|
||||
[tool.cibuildwheel.windows]
|
||||
before-all = "choco install cmake -y"
|
||||
|
||||
Reference in New Issue
Block a user