fix: correct macOS deployment targets based on Homebrew library requirements

The key insight is that Homebrew libraries on each macOS version are
compiled for that specific version:
- macOS 13: Libraries require macOS 13.0 minimum
- macOS 14: Libraries require macOS 14.0 minimum
- macOS 15: Libraries require macOS 15.0 minimum

We cannot build wheels for older macOS versions than what the bundled
Homebrew libraries require. This means:
- macOS 13 runners: Build for macOS 13.0+ (HNSW) and 13.3+ (DiskANN)
- macOS 14 runners: Build for macOS 14.0+
- macOS 15 runners: Build for macOS 15.0+

This ensures delocate-wheel succeeds by matching deployment targets
with the actual minimum versions required by system libraries.
This commit is contained in:
Andy Lee
2025-08-12 12:31:58 -07:00
parent 5f57f4763b
commit 2761067b7b

View File

@@ -157,10 +157,9 @@ 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 OS # Homebrew libraries on each macOS version require matching minimum version
# Must match the system libraries from Homebrew
if [[ "${{ matrix.os }}" == "macos-13" ]]; then if [[ "${{ matrix.os }}" == "macos-13" ]]; then
export MACOSX_DEPLOYMENT_TARGET=11.0 export MACOSX_DEPLOYMENT_TARGET=13.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
@@ -178,10 +177,9 @@ 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 OS # DiskANN requires macOS 13.3+ for sgesdd_ LAPACK function
# Must match the system libraries from Homebrew # But Homebrew libraries on each macOS version require matching minimum version
if [[ "${{ matrix.os }}" == "macos-13" ]]; then if [[ "${{ matrix.os }}" == "macos-13" ]]; then
# DiskANN requires macOS 13.3+ for sgesdd_ LAPACK function
export MACOSX_DEPLOYMENT_TARGET=13.3 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
@@ -226,7 +224,7 @@ jobs:
# Determine deployment target based on runner OS # Determine deployment target based on runner OS
# Must match the Homebrew libraries for each macOS version # Must match the Homebrew libraries for each macOS version
if [[ "${{ matrix.os }}" == "macos-13" ]]; then if [[ "${{ matrix.os }}" == "macos-13" ]]; then
HNSW_TARGET="11.0" HNSW_TARGET="13.0"
DISKANN_TARGET="13.3" DISKANN_TARGET="13.3"
elif [[ "${{ matrix.os }}" == "macos-14" ]]; then elif [[ "${{ matrix.os }}" == "macos-14" ]]; then
HNSW_TARGET="14.0" HNSW_TARGET="14.0"
@@ -290,8 +288,8 @@ jobs:
# Activate virtual environment # Activate virtual environment
source .venv/bin/activate || source .venv/Scripts/activate source .venv/bin/activate || source .venv/Scripts/activate
# Run all tests # Run tests
pytest tests/ pytest -v test/
- name: Run sanity checks (optional) - name: Run sanity checks (optional)
run: | run: |