Skip to content

fix: Fix rows_scanned not calculated correctly (#122) #193

fix: Fix rows_scanned not calculated correctly (#122)

fix: Fix rows_scanned not calculated correctly (#122) #193

Workflow file for this run

name: Extension Build
on:
pull_request:
paths-ignore:
- "**.md"
push:
branches:
- "main"
paths-ignore:
- "**.md"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-24.04
env:
CUSTOM_LINKER: mold
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_COMPRESS: "true"
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_MAXSIZE: 500M
CCACHE_NOHASHDIR: "true"
EXT_FLAGS: -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- name: Compute DuckDB SHA
id: duckdb-sha
run: |
echo "sha=$(git -C duckdb rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- name: Compute Build SHA
id: build-sha
run: |
echo "sha=${{ hashFiles('CMakeLists.txt', 'extension_config.cmake', 'Makefile') }}" >> "$GITHUB_OUTPUT"
- name: Prepare cache directories
run: |
mkdir -p .ccache
- name: Restore ccache
id: cache-ccache
uses: actions/cache/restore@v4
with:
path: |
.ccache
key: ccache-${{ runner.os }}-${{ steps.duckdb-sha.outputs.sha }}-${{ steps.build-sha.outputs.sha }}-${{ github.sha }}
restore-keys: |
ccache-${{ runner.os }}-${{ steps.duckdb-sha.outputs.sha }}-${{ steps.build-sha.outputs.sha }}-
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y protobuf-compiler libssl-dev ninja-build ccache mold
- name: Build
run: |
GEN=ninja make release -j 4
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-release-${{ github.sha }}
path: |
build/release/test/unittest
build/release/src/libduckdb.so*
if-no-files-found: error
- name: Save ccache
if: github.ref == 'refs/heads/main' && success()
uses: actions/cache/save@v4
with:
path: |
.ccache
key: ccache-${{ runner.os }}-${{ steps.duckdb-sha.outputs.sha }}-${{ steps.build-sha.outputs.sha }}-${{ github.sha }}
test:
name: Test
runs-on: ubuntu-24.04
needs: build
steps:
- uses: actions/checkout@v5
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-release-${{ github.sha }}
path: build/release
- name: Ensure test runner is executable
run: |
chmod +x ./build/release/test/unittest
- name: Run tests
run: |
./build/release/test/unittest "test/*"
test_s3:
name: Test S3 (MinIO)
runs-on: ubuntu-24.04
needs: build
steps:
- uses: actions/checkout@v5
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-release-${{ github.sha }}
path: build/release
- name: Ensure test runner is executable
run: |
chmod +x ./build/release/test/unittest
- name: Start MinIO
run: |
docker run -d --rm \
--name lance-minio \
-p 9000:9000 \
-e MINIO_ROOT_USER=minioadmin \
-e MINIO_ROOT_PASSWORD=minioadmin \
minio/minio:RELEASE.2025-01-20T14-49-07Z \
server /data
- name: Wait for MinIO
run: |
for i in $(seq 1 60); do
if curl -fsS "http://127.0.0.1:9000/minio/health/ready" >/dev/null; then
exit 0
fi
sleep 1
done
echo "MinIO did not become ready" >&2
exit 1
- name: Upload test dataset to MinIO
run: |
curl -fsSL "https://dl.min.io/client/mc/release/linux-amd64/mc" -o mc
chmod +x mc
./mc alias set local http://127.0.0.1:9000 minioadmin minioadmin
./mc mb -p local/lance-test || true
./mc mirror --overwrite test/data/test_data.lance local/lance-test/test_data.lance
./mc mirror --overwrite test/data/search_test_data.lance local/lance-test/search_test_data.lance
- name: Run S3 tests
env:
LANCE_TEST_S3: "1"
run: |
./build/release/test/unittest "test/*"
- name: Cleanup MinIO
if: always()
run: |
docker logs lance-minio || true
docker rm -f lance-minio || true