fix: refactor parquet buffer cache ownership (#492)
This commit is contained in:
@@ -120,47 +120,29 @@ jobs:
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
|
||||
cmake --build . --config Release --parallel $env:NPROC
|
||||
|
||||
# Copy zvec.dll next to the example executables so Windows can find it.
|
||||
# Copy zvec DLLs next to the example executables so Windows can find them.
|
||||
# CMake places DLLs in bin/ (RUNTIME output) and import libs in lib/.
|
||||
$buildDir = "$env:GITHUB_WORKSPACE\build"
|
||||
$found = $false
|
||||
foreach ($sub in @("$buildDir\bin", "$buildDir\bin\Release", "$buildDir\lib", "$buildDir\lib\Release")) {
|
||||
if (Test-Path "$sub\zvec.dll") {
|
||||
Copy-Item "$sub\zvec.dll" -Destination . -Force
|
||||
Write-Host "Copied zvec.dll from $sub"
|
||||
$found = $true
|
||||
break
|
||||
foreach ($dllName in @("zvec.dll", "zvec_core.dll", "zvec_ailego.dll")) {
|
||||
$found = $false
|
||||
foreach ($sub in @("$buildDir\bin", "$buildDir\bin\Release", "$buildDir\lib", "$buildDir\lib\Release")) {
|
||||
$dllPath = Join-Path $sub $dllName
|
||||
if (Test-Path $dllPath) {
|
||||
Copy-Item $dllPath -Destination . -Force
|
||||
Write-Host "Copied $dllName from $sub"
|
||||
$found = $true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if (-not $found) {
|
||||
Write-Host "WARNING: zvec.dll not found, searching recursively..."
|
||||
$dll = Get-ChildItem -Path $buildDir -Filter "zvec.dll" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1
|
||||
if ($dll) {
|
||||
Copy-Item $dll.FullName -Destination . -Force
|
||||
Write-Host "Copied zvec.dll from $($dll.DirectoryName)"
|
||||
} else {
|
||||
Write-Error "zvec.dll not found anywhere under $buildDir"
|
||||
}
|
||||
}
|
||||
|
||||
# core-example links libzvec_core directly, so copy zvec_core.dll too.
|
||||
$found = $false
|
||||
foreach ($sub in @("$buildDir\bin", "$buildDir\bin\Release", "$buildDir\lib", "$buildDir\lib\Release")) {
|
||||
if (Test-Path "$sub\zvec_core.dll") {
|
||||
Copy-Item "$sub\zvec_core.dll" -Destination . -Force
|
||||
Write-Host "Copied zvec_core.dll from $sub"
|
||||
$found = $true
|
||||
break
|
||||
}
|
||||
}
|
||||
if (-not $found) {
|
||||
Write-Host "WARNING: zvec_core.dll not found, searching recursively..."
|
||||
$dll = Get-ChildItem -Path $buildDir -Filter "zvec_core.dll" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1
|
||||
if ($dll) {
|
||||
Copy-Item $dll.FullName -Destination . -Force
|
||||
Write-Host "Copied zvec_core.dll from $($dll.DirectoryName)"
|
||||
} else {
|
||||
Write-Error "zvec_core.dll not found anywhere under $buildDir"
|
||||
if (-not $found) {
|
||||
Write-Host "WARNING: $dllName not found, searching recursively..."
|
||||
$dll = Get-ChildItem -Path $buildDir -Filter $dllName -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1
|
||||
if ($dll) {
|
||||
Copy-Item $dll.FullName -Destination . -Force
|
||||
Write-Host "Copied $dllName from $($dll.DirectoryName)"
|
||||
} else {
|
||||
Write-Error "$dllName not found anywhere under $buildDir"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,19 +11,9 @@ permissions:
|
||||
|
||||
jobs:
|
||||
subproject-integration:
|
||||
name: Subproject Build & Example (${{ matrix.mode }})
|
||||
name: Subproject Build & Example
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 90
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- mode: linux-x64
|
||||
cache_key: full
|
||||
enable_zvec_core: false
|
||||
- mode: linux-x64-enable-zvec-core
|
||||
cache_key: core-only
|
||||
enable_zvec_core: true
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@@ -34,7 +24,7 @@ jobs:
|
||||
- name: Setup ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: cmake-subproject-linux-x64-${{ matrix.cache_key }}
|
||||
key: cmake-subproject-linux-x64
|
||||
max-size: 150M
|
||||
|
||||
- name: Set up Python
|
||||
@@ -68,8 +58,8 @@ jobs:
|
||||
|
||||
- name: Configure subproject integration
|
||||
run: |
|
||||
SMOKE_SOURCE="$RUNNER_TEMP/zvec-subproject-nightly-${{ matrix.cache_key }}"
|
||||
SMOKE_BUILD="$RUNNER_TEMP/zvec-subproject-nightly-build-${{ matrix.cache_key }}"
|
||||
SMOKE_SOURCE="$RUNNER_TEMP/zvec-subproject-nightly"
|
||||
SMOKE_BUILD="$RUNNER_TEMP/zvec-subproject-nightly-build"
|
||||
|
||||
mkdir -p "$SMOKE_SOURCE" "$SMOKE_BUILD"
|
||||
cp "$GITHUB_WORKSPACE/.github/cmake/subproject-integration/CMakeLists.txt" \
|
||||
@@ -79,20 +69,14 @@ jobs:
|
||||
-DZVEC_SOURCE_DIR="$GITHUB_WORKSPACE"
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DENABLE_WERROR=ON
|
||||
-DUSE_OSS_MIRROR=ON
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
-DBUILD_TOOLS=OFF
|
||||
-DBUILD_C_BINDINGS=OFF
|
||||
-DBUILD_PYTHON_BINDINGS=OFF
|
||||
)
|
||||
|
||||
if [[ "${{ matrix.enable_zvec_core }}" == "true" ]]; then
|
||||
CMAKE_ARGS+=(-DENABLE_ZVEC_CORE=ON)
|
||||
else
|
||||
CMAKE_ARGS+=(
|
||||
-DBUILD_TOOLS=OFF
|
||||
-DBUILD_C_BINDINGS=OFF
|
||||
-DBUILD_PYTHON_BINDINGS=OFF
|
||||
)
|
||||
fi
|
||||
|
||||
cmake -S "$SMOKE_SOURCE" -B "$SMOKE_BUILD" -G Ninja \
|
||||
"${CMAKE_ARGS[@]}"
|
||||
|
||||
@@ -100,7 +84,6 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Build subproject targets
|
||||
if: ${{ ! matrix.enable_zvec_core }}
|
||||
run: |
|
||||
cmake --build "$SMOKE_BUILD" --target \
|
||||
core_knn_diskann \
|
||||
@@ -111,32 +94,9 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Run subproject examples
|
||||
if: ${{ ! matrix.enable_zvec_core }}
|
||||
run: |
|
||||
cd "$SMOKE_BUILD"
|
||||
./bin/zvec_embed_db_example
|
||||
./bin/zvec_embed_core_example
|
||||
./bin/zvec_embed_ailego_example
|
||||
shell: bash
|
||||
|
||||
- name: Build enable_zvec_core targets
|
||||
if: ${{ matrix.enable_zvec_core }}
|
||||
run: |
|
||||
cmake --build "$SMOKE_BUILD" --target \
|
||||
zvec_core_shared \
|
||||
zvec_embed_core_only_example \
|
||||
--parallel "$NPROC"
|
||||
shell: bash
|
||||
|
||||
- name: Run enable_zvec_core example
|
||||
if: ${{ matrix.enable_zvec_core }}
|
||||
run: |
|
||||
cd "$SMOKE_BUILD"
|
||||
./bin/zvec_embed_core_only_example
|
||||
ldd ./bin/zvec_embed_core_only_example | tee zvec-core-only-ldd.txt
|
||||
grep -q 'libzvec_core\.so' zvec-core-only-ldd.txt
|
||||
if grep -q 'libzvec\.so' zvec-core-only-ldd.txt; then
|
||||
echo "core-only example unexpectedly depends on libzvec.so"
|
||||
exit 1
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user