Compare commits

..

3 Commits

Author SHA1 Message Date
yichuan520030910320
ae29ae9b88 fix: use proper conditional expression for token fallback
- Use conditional expression to check if GH_PAT exists before using it
- Fallback to GITHUB_TOKEN if GH_PAT is not set or empty
- This fixes the 'token not supplied' error
2025-12-24 12:16:38 +08:00
yichuan520030910320
e5977e4c4f fix: add fallback to GITHUB_TOKEN for checkout token
- Use GH_PAT if available, otherwise fallback to GITHUB_TOKEN
- This prevents 'token not supplied' errors when GH_PAT is not configured
2025-12-24 12:16:15 +08:00
yichuan520030910320
cbd6c8ab34 feat: add GH_PAT token and fetch-depth to GitHub Actions workflows
- Add fetch-depth: 1 to all checkout actions for faster checkout
- Add token: ${{ secrets.GH_PAT }} to all checkout actions
- This enables access to private submodules and improves checkout performance
2025-12-24 12:14:51 +08:00
7 changed files with 1143 additions and 129 deletions

View File

@@ -16,8 +16,10 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
ref: ${{ inputs.ref }}
submodules: recursive submodules: recursive
fetch-depth: 1
token: ${{ secrets.GH_PAT != '' && secrets.GH_PAT || secrets.GITHUB_TOKEN }}
ref: ${{ inputs.ref }}
- name: Install uv and Python - name: Install uv and Python
uses: astral-sh/setup-uv@v6 uses: astral-sh/setup-uv@v6
@@ -35,8 +37,8 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
# Note: Python 3.9 dropped - uses PEP 604 union syntax (str | None) - os: ubuntu-22.04
# which requires Python 3.10+ python: '3.9'
- os: ubuntu-22.04 - os: ubuntu-22.04
python: '3.10' python: '3.10'
- os: ubuntu-22.04 - os: ubuntu-22.04
@@ -46,6 +48,8 @@ jobs:
- os: ubuntu-22.04 - os: ubuntu-22.04
python: '3.13' python: '3.13'
# ARM64 Linux builds # ARM64 Linux builds
- os: ubuntu-24.04-arm
python: '3.9'
- os: ubuntu-24.04-arm - os: ubuntu-24.04-arm
python: '3.10' python: '3.10'
- os: ubuntu-24.04-arm - os: ubuntu-24.04-arm
@@ -54,6 +58,8 @@ jobs:
python: '3.12' python: '3.12'
- os: ubuntu-24.04-arm - os: ubuntu-24.04-arm
python: '3.13' python: '3.13'
- os: macos-14
python: '3.9'
- os: macos-14 - os: macos-14
python: '3.10' python: '3.10'
- os: macos-14 - os: macos-14
@@ -62,6 +68,8 @@ jobs:
python: '3.12' python: '3.12'
- os: macos-14 - os: macos-14
python: '3.13' python: '3.13'
- os: macos-15
python: '3.9'
- os: macos-15 - os: macos-15
python: '3.10' python: '3.10'
- os: macos-15 - os: macos-15
@@ -70,31 +78,25 @@ jobs:
python: '3.12' python: '3.12'
- os: macos-15 - os: macos-15
python: '3.13' python: '3.13'
# Intel Mac builds (x86_64) - replaces deprecated macos-13 - os: macos-13
# Note: Python 3.13 excluded - PyTorch has no wheels for macOS x86_64 + Python 3.13 python: '3.9'
# (PyTorch <=2.4.1 lacks cp313, PyTorch >=2.5.0 dropped Intel Mac support) - os: macos-13
- os: macos-15-intel
python: '3.10' python: '3.10'
- os: macos-15-intel - os: macos-13
python: '3.11' python: '3.11'
- os: macos-15-intel - os: macos-13
python: '3.12' python: '3.12'
# macOS 26 (beta) - arm64 # Note: macos-13 + Python 3.13 excluded due to PyTorch compatibility
- os: macos-26 # (PyTorch 2.5+ supports Python 3.13 but not Intel Mac x86_64)
python: '3.10'
- os: macos-26
python: '3.11'
- os: macos-26
python: '3.12'
- os: macos-26
python: '3.13'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
with: with:
ref: ${{ inputs.ref }}
submodules: recursive submodules: recursive
fetch-depth: 1
token: ${{ secrets.GH_PAT != '' && secrets.GH_PAT || secrets.GITHUB_TOKEN }}
ref: ${{ inputs.ref }}
- name: Install uv and Python - name: Install uv and Python
uses: astral-sh/setup-uv@v6 uses: astral-sh/setup-uv@v6
@@ -206,16 +208,13 @@ jobs:
# Use system clang for better compatibility # Use system clang for better compatibility
export CC=clang export CC=clang
export CXX=clang++ export CXX=clang++
# Set deployment target based on runner # Homebrew libraries on each macOS version require matching minimum version
# macos-15-intel runs macOS 15, so target 15.0 (system libraries require it) if [[ "${{ matrix.os }}" == "macos-13" ]]; then
if [[ "${{ matrix.os }}" == "macos-15-intel" ]]; then export MACOSX_DEPLOYMENT_TARGET=13.0
export MACOSX_DEPLOYMENT_TARGET=15.0 elif [[ "${{ matrix.os }}" == "macos-14" ]]; then
elif [[ "${{ matrix.os }}" == macos-14* ]]; then
export MACOSX_DEPLOYMENT_TARGET=14.0 export MACOSX_DEPLOYMENT_TARGET=14.0
elif [[ "${{ matrix.os }}" == macos-15* ]]; then elif [[ "${{ matrix.os }}" == "macos-15" ]]; then
export MACOSX_DEPLOYMENT_TARGET=15.0 export MACOSX_DEPLOYMENT_TARGET=15.0
elif [[ "${{ matrix.os }}" == macos-26* ]]; then
export MACOSX_DEPLOYMENT_TARGET=26.0
fi fi
uv build --wheel --python ${{ matrix.python }} --find-links ${GITHUB_WORKSPACE}/packages/leann-core/dist uv build --wheel --python ${{ matrix.python }} --find-links ${GITHUB_WORKSPACE}/packages/leann-core/dist
else else
@@ -229,16 +228,14 @@ jobs:
# Use system clang for better compatibility # Use system clang for better compatibility
export CC=clang export CC=clang
export CXX=clang++ export CXX=clang++
# Set deployment target based on runner # DiskANN requires macOS 13.3+ for sgesdd_ LAPACK function
# macos-15-intel runs macOS 15, so target 15.0 (system libraries require it) # But Homebrew libraries on each macOS version require matching minimum version
if [[ "${{ matrix.os }}" == "macos-15-intel" ]]; then if [[ "${{ matrix.os }}" == "macos-13" ]]; then
export MACOSX_DEPLOYMENT_TARGET=15.0 export MACOSX_DEPLOYMENT_TARGET=13.3
elif [[ "${{ matrix.os }}" == macos-14* ]]; then elif [[ "${{ matrix.os }}" == "macos-14" ]]; then
export MACOSX_DEPLOYMENT_TARGET=14.0 export MACOSX_DEPLOYMENT_TARGET=14.0
elif [[ "${{ matrix.os }}" == macos-15* ]]; then elif [[ "${{ matrix.os }}" == "macos-15" ]]; then
export MACOSX_DEPLOYMENT_TARGET=15.0 export MACOSX_DEPLOYMENT_TARGET=15.0
elif [[ "${{ matrix.os }}" == macos-26* ]]; then
export MACOSX_DEPLOYMENT_TARGET=26.0
fi fi
uv build --wheel --python ${{ matrix.python }} --find-links ${GITHUB_WORKSPACE}/packages/leann-core/dist uv build --wheel --python ${{ matrix.python }} --find-links ${GITHUB_WORKSPACE}/packages/leann-core/dist
else else
@@ -276,19 +273,16 @@ jobs:
if: runner.os == 'macOS' if: runner.os == 'macOS'
run: | run: |
# Determine deployment target based on runner OS # Determine deployment target based on runner OS
# macos-15-intel runs macOS 15, so target 15.0 (system libraries require it) # Must match the Homebrew libraries for each macOS version
if [[ "${{ matrix.os }}" == "macos-15-intel" ]]; then if [[ "${{ matrix.os }}" == "macos-13" ]]; then
HNSW_TARGET="15.0" HNSW_TARGET="13.0"
DISKANN_TARGET="15.0" DISKANN_TARGET="13.3"
elif [[ "${{ matrix.os }}" == macos-14* ]]; then elif [[ "${{ matrix.os }}" == "macos-14" ]]; then
HNSW_TARGET="14.0" HNSW_TARGET="14.0"
DISKANN_TARGET="14.0" DISKANN_TARGET="14.0"
elif [[ "${{ matrix.os }}" == macos-15* ]]; then elif [[ "${{ matrix.os }}" == "macos-15" ]]; then
HNSW_TARGET="15.0" HNSW_TARGET="15.0"
DISKANN_TARGET="15.0" DISKANN_TARGET="15.0"
elif [[ "${{ matrix.os }}" == macos-26* ]]; then
HNSW_TARGET="26.0"
DISKANN_TARGET="26.0"
fi fi
# Repair HNSW wheel # Repair HNSW wheel
@@ -344,15 +338,12 @@ jobs:
PY_TAG=$($UV_PY -c "import sys; print(f'cp{sys.version_info[0]}{sys.version_info[1]}')") PY_TAG=$($UV_PY -c "import sys; print(f'cp{sys.version_info[0]}{sys.version_info[1]}')")
if [[ "$RUNNER_OS" == "macOS" ]]; then if [[ "$RUNNER_OS" == "macOS" ]]; then
# macos-15-intel runs macOS 15, so target 15.0 (system libraries require it) if [[ "${{ matrix.os }}" == "macos-13" ]]; then
if [[ "${{ matrix.os }}" == "macos-15-intel" ]]; then export MACOSX_DEPLOYMENT_TARGET=13.3
export MACOSX_DEPLOYMENT_TARGET=15.0 elif [[ "${{ matrix.os }}" == "macos-14" ]]; then
elif [[ "${{ matrix.os }}" == macos-14* ]]; then
export MACOSX_DEPLOYMENT_TARGET=14.0 export MACOSX_DEPLOYMENT_TARGET=14.0
elif [[ "${{ matrix.os }}" == macos-15* ]]; then elif [[ "${{ matrix.os }}" == "macos-15" ]]; then
export MACOSX_DEPLOYMENT_TARGET=15.0 export MACOSX_DEPLOYMENT_TARGET=15.0
elif [[ "${{ matrix.os }}" == macos-26* ]]; then
export MACOSX_DEPLOYMENT_TARGET=26.0
fi fi
fi fi

View File

@@ -12,6 +12,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
fetch-depth: 1
token: ${{ secrets.GH_PAT != '' && secrets.GH_PAT || secrets.GITHUB_TOKEN }}
- uses: lycheeverse/lychee-action@v2 - uses: lycheeverse/lychee-action@v2
with: with:
args: --no-progress --insecure --user-agent 'curl/7.68.0' --exclude '.*api\.star-history\.com.*' --accept 200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308,503 README.md docs/ apps/ examples/ benchmarks/ args: --no-progress --insecure --user-agent 'curl/7.68.0' --exclude '.*api\.star-history\.com.*' --accept 200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308,503 README.md docs/ apps/ examples/ benchmarks/

View File

@@ -19,6 +19,9 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
fetch-depth: 1
token: ${{ secrets.GH_PAT != '' && secrets.GH_PAT || secrets.GITHUB_TOKEN }}
- name: Validate version - name: Validate version
run: | run: |
@@ -73,6 +76,8 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 1
token: ${{ secrets.GH_PAT != '' && secrets.GH_PAT || secrets.GITHUB_TOKEN }}
ref: 'main' ref: 'main'
- name: Download all artifacts - name: Download all artifacts

View File

@@ -7,7 +7,7 @@ name = "leann-core"
version = "0.3.5" version = "0.3.5"
description = "Core API and plugin system for LEANN" description = "Core API and plugin system for LEANN"
readme = "README.md" readme = "README.md"
requires-python = ">=3.10" requires-python = ">=3.9"
license = { text = "MIT" } license = { text = "MIT" }
# All required dependencies included # All required dependencies included

View File

@@ -7,7 +7,7 @@ name = "leann"
version = "0.3.5" version = "0.3.5"
description = "LEANN - The smallest vector index in the world. RAG Everything with LEANN!" description = "LEANN - The smallest vector index in the world. RAG Everything with LEANN!"
readme = "README.md" readme = "README.md"
requires-python = ">=3.10" requires-python = ">=3.9"
license = { text = "MIT" } license = { text = "MIT" }
authors = [ authors = [
{ name = "LEANN Team" } { name = "LEANN Team" }
@@ -18,10 +18,10 @@ classifiers = [
"Intended Audience :: Developers", "Intended Audience :: Developers",
"License :: OSI Approved :: MIT License", "License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
] ]
# Default installation: core + hnsw + diskann # Default installation: core + hnsw + diskann

View File

@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "leann-workspace" name = "leann-workspace"
version = "0.1.0" version = "0.1.0"
requires-python = ">=3.10" requires-python = ">=3.9"
dependencies = [ dependencies = [
"leann-core", "leann-core",

1163
uv.lock generated
View File

File diff suppressed because it is too large Load Diff