Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 65 additions & 39 deletions .github/workflows/BuildIceberg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,40 @@ env:
jobs:
build_iceberg:
name: Build
runs-on: ubuntu-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-x64' || 'ubuntu-latest' }}
env:
VCPKG_TARGET_TRIPLET: 'x64-linux-release'
GEN: ninja
VCPKG_FEATURE_FLAGS: "-binarycaching"
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
PIP_BREAK_SYSTEM_PACKAGES: 1
CC: clang-20
CXX: clang++-20


steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'true'

- name: Setup vcpkg
uses: lukka/run-vcpkg@v11.1
with:
vcpkgGitCommitId: 84bab45d415d22042bd0b9081aea57f362da3f35

- name: Install Ninja
shell: bash
run: sudo apt-get update -y -qq && sudo apt-get install -y -qq ninja-build

- name: Install tools
run: python3 duckdb/scripts/ci/retry.py -- make -C duckdb toolsci
- name: Fix ASan runtime
# libclang_rt.asan_static.a is missing in ubuntu 24.04 — workaround
# mirrored from upstream Main.yml.
run: |
asan_static_dir="/usr/lib/llvm-20/lib/clang/20/lib/x86_64-pc-linux-gnu"
asan_static_target="/usr/lib/llvm-20/lib/clang/20/lib/linux/libclang_rt.asan_static-x86_64.a"
if [[ ! -e "${asan_static_dir}/libclang_rt.asan_static.a" && -e "${asan_static_target}" ]]; then
sudo mkdir -p "${asan_static_dir}"
sudo ln -sf "${asan_static_target}" "${asan_static_dir}/libclang_rt.asan_static.a"
fi
- name: Setup Ccache
uses: hendrikmuhs/ccache-action@main
with:
key: ${{ github.job }}
save: ${{ github.ref == 'refs/heads/main' || github.repository != 'duckdb/duckdb' }}
max-size: 5GB
evict-old-files: job

#- name: Build extension Not linked
# env:
# GEN: ninja
# STATIC_LIBCPP: 1
# DONT_LINK: 1
# run: |
Expand All @@ -57,45 +59,68 @@ jobs:
# path: build/release/
# retention-days: 3

- name: Build extension
#- name: Build extension
# env:
# STATIC_LIBCPP: 1
# ENABLE_EXTENSION_AUTOLOADING: 1
# ENABLE_EXTENSION_AUTOINSTALL: 1
# run: |
# make release


- name: Build (relassert → ASan + UBSan + LSan)
uses: duckdb/duckdb-ci/build-duckdb@main
env:
GEN: ninja
CATALOG_TEST_CONFIG_SETUP: 1
STATIC_LIBCPP: 1
ENABLE_EXTENSION_AUTOLOADING: 1
ENABLE_EXTENSION_AUTOINSTALL: 1
run: |
make release

- name: Upload DuckDB-Iceberg release folder
uses: actions/upload-artifact@v4
# Add debug symbol names.
# Reduce the binary size and dynamically link extensions.
EXPORT_DYNAMIC_SYMBOLS: 1
REDUCE_SYMBOLS: 1
EXTENSION_STATIC_BUILD: 0
# Enable -DDEBUG slow verifiers (expression verifier, operator
# round-trips, etc.) without changing the optimization level.
FORCE_DEBUG: 1
FORCE_ASSERT: 1
with:
name: duckdb-iceberg
path: build/release/
retention-days: 3
build-type: relassert
build: python3 duckdb/scripts/ci/retry.py -- make relassert
vcpkg-commit: 84bab45d415d22042bd0b9081aea57f362da3f35
bundle: bash duckdb/scripts/prepare_build_artifact.sh relassert
upload-name: duckdb-iceberg
upload-path: build/relassert-artifact.tar.gz

#- name: Build extension Enable Equality Delete
# env:
# GEN: ninja
# STATIC_LIBCPP: 1
# ENABLE_EXTENSION_AUTOLOADING: 1
# ENABLE_EXTENSION_AUTOINSTALL: 1
# EXT_FLAGS: -DICEBERG_ENABLE_EQUALITY_DELETE_WRITES=1
# run: |
# make release

- name: Build extension Enable Equality Delete
- name: Build (release)
uses: duckdb/duckdb-ci/build-duckdb@main
env:
GEN: ninja
STATIC_LIBCPP: 1
ENABLE_EXTENSION_AUTOLOADING: 1
ENABLE_EXTENSION_AUTOINSTALL: 1
EXT_FLAGS: -DICEBERG_ENABLE_EQUALITY_DELETE_WRITES=1
run: |
make release

- name: Upload DuckDB-Iceberg release folder with Equality Delete
uses: actions/upload-artifact@v4
with:
name: duckdb-iceberg-equality-delete-support
path: build/release/
retention-days: 3
build-type: release
build: python3 duckdb/scripts/ci/retry.py -- make release
vcpkg-commit: 84bab45d415d22042bd0b9081aea57f362da3f35
bundle: bash duckdb/scripts/prepare_build_artifact.sh release
upload-name: duckdb-iceberg-equality-delete-support

test-fixture:
name: Test against fixture catalog
needs: build_iceberg
uses: ./.github/workflows/test-fixture-catalog.yml
with:
artifact-name: duckdb-iceberg
build-path: build/relassert

#test-fixture-no-link:
# name: Test against fixture catalog no link
Expand All @@ -112,6 +137,7 @@ jobs:
with:
artifact-name: duckdb-iceberg-equality-delete-support
equality-delete-writes-enabled: 1
build-path: build/release

test-nessie:
name: Test against Nessie Catalog
Expand Down Expand Up @@ -139,4 +165,4 @@ jobs:
needs: build_iceberg
uses: ./.github/workflows/test-lakekeeper-catalog.yml
with:
artifact-name: duckdb-iceberg
artifact-name: duckdb-iceberg
43 changes: 29 additions & 14 deletions .github/workflows/test-fixture-catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,21 @@ on:
required: false
type: number
default: 0
build-path:
description: "The path to the build artifact"
required: true
type: string

jobs:
test-spark:
name: Test against fixture catalog
runs-on: ubuntu-latest
env:
HTTP_PROXY_PUBLIC: http://localhost:8878
ASAN_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer"
ASAN_OPTIONS: "detect_leaks=1:halt_on_error=1:abort_on_error=0:external_symbolizer_path=/usr/bin/llvm-symbolizer"
LSAN_OPTIONS: "suppressions=${{ github.workspace }}/.combined-sanitizer-leak-suppressions.txt"
UBSAN_OPTIONS: "halt_on_error=1:print_stacktrace=1"

steps:
- name: Checkout repository
Expand All @@ -32,15 +40,22 @@ jobs:
submodules: 'true'

- name: Download DuckDB-Iceberg artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: ${{ inputs.artifact-name }}
path: build/release
path: build

- name: Extract build artifact
run: |
rm -rf "${{ inputs.build-path }}"
tar -xzf "${{ inputs.build-path }}-artifact.tar.gz" -C build
ls -lh "${{ inputs.build-path }}"/test/unittest

- name: Restore permissions
- name: Prepare leak suppressions
run: |
find ./build/release -type f -name 'duckdb*' -exec chmod +x {} \;
find ./build/release -type f -name 'unittest*' -exec chmod +x {} \;
cp duckdb/.sanitizer-leak-suppressions.txt .combined-sanitizer-leak-suppressions.txt
printf '\n' >> .combined-sanitizer-leak-suppressions.txt
cat .sanitizer-leak-suppressions.txt >> .combined-sanitizer-leak-suppressions.txt

- name: Set up Java
uses: actions/setup-java@v4
Expand All @@ -54,7 +69,7 @@ jobs:
- name: Install fixture catalog dependencies
run: |
sudo apt update -y -qq
sudo apt install -y -qq python3-venv tar pkg-config
sudo apt install -y -qq python3-venv tar pkg-config llvm

- name: Install CMake 3.x
run: |
Expand Down Expand Up @@ -103,16 +118,16 @@ jobs:
FIXTURE_SERVER_AVAILABLE: 1
EQUALITY_DELETE_WRITES_ENABLED: ${{ inputs.equality-delete-writes-enabled }}
run: |
./build/release/test/unittest --order lex "$PWD/test/sql/local/catalog_test_config_setup/*" --list-test-names-only || true
./build/release/test/unittest --order lex "$PWD/test/sql/local/catalog_test_config_setup/*" --test-config test/configs/fixture.json
${{ inputs.build-path }}/test/unittest --order lex "$PWD/test/sql/local/catalog_test_config_setup/*" --list-test-names-only || true
${{ inputs.build-path }}/test/unittest --order lex "$PWD/test/sql/local/catalog_test_config_setup/*" --test-config test/configs/fixture.json

- name: Run other tests
if: inputs.local-extension-repo == ''
env:
FIXTURE_SERVER_AVAILABLE: 1
run: |
./build/release/test/unittest --order lex "$PWD/test/*" --list-test-names-only || true
./build/release/test/unittest --order lex "$PWD/test/*"
${{ inputs.build-path }}/test/unittest --order lex "$PWD/test/*" --list-test-names-only || true
${{ inputs.build-path }}/test/unittest --order lex "$PWD/test/*"

- name: Test reads with PyIceberg and Spark
if: inputs.local-extension-repo == ''
Expand All @@ -122,16 +137,16 @@ jobs:
run: |
# test with spark v4
source .venv-spark4/bin/activate
python3 -m pytest -vv test/python --unittest-binary ./build/release/test/unittest --test-python-verbosity verbose
python3 -m pytest -vv test/python --unittest-binary ${{ inputs.build-path }}/test/unittest --test-python-verbosity verbose
deactivate
# test with spark v3
python3 -m venv .venv-spark3
source .venv-spark3/bin/activate
python3 -m pip install pyspark==3.5.2 pytest pyiceberg==0.9.1 pyarrow pydantic==2.9.0
python3 -m pytest -vv test/python --unittest-binary ./build/release/test/unittest --test-python-verbosity verbose
python3 -m pytest -vv test/python --unittest-binary ${{ inputs.build-path }}/test/unittest --test-python-verbosity verbose

#- name: Run all duckdb/duckdb tests
# if: inputs.local-extension-repo == ''
# run: |
# ./build/release/test/unittest --order lex --test-dir duckdb "test/sql/*" --list-test-names-only || true
# ./build/release/test/unittest --order lex --test-dir duckdb "test/sql/*" --test-config test/configs/fixture_duckdb_tests.json
# ${{ inputs.build-path }}/test/unittest --order lex --test-dir duckdb "test/sql/*" --list-test-names-only || true
# ${{ inputs.build-path }}/test/unittest --order lex --test-dir duckdb "test/sql/*" --test-config test/configs/fixture_duckdb_tests.json
32 changes: 22 additions & 10 deletions .github/workflows/test-lakekeeper-catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ jobs:
test-lakekeeper:
name: Test against Lakekeeper Catalog
runs-on: ubuntu-latest
env:
ASAN_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer"
ASAN_OPTIONS: "detect_leaks=1:halt_on_error=1:abort_on_error=0:external_symbolizer_path=/usr/bin/llvm-symbolizer"
LSAN_OPTIONS: "suppressions=${{ github.workspace }}/.combined-sanitizer-leak-suppressions.txt"
UBSAN_OPTIONS: "halt_on_error=1:print_stacktrace=1"
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -22,7 +27,13 @@ jobs:
uses: actions/download-artifact@v4
with:
name: ${{ inputs.artifact-name }}
path: build/release
path: build

- name: Extract relassert build artifact
run: |
rm -rf build/relassert
tar -xzf build/relassert-artifact.tar.gz -C build
ls -lh build/relassert/test/unittest

- name: Set up Java
uses: actions/setup-java@v4
Expand All @@ -34,15 +45,16 @@ jobs:
with:
python-version: '3.13'

- name: Restore permissions
- name: Prepare leak suppressions
run: |
find ./build/release -type f -name 'duckdb*' -exec chmod +x {} \;
find ./build/release -type f -name 'unittest*' -exec chmod +x {} \;
cp duckdb/.sanitizer-leak-suppressions.txt .combined-sanitizer-leak-suppressions.txt
printf '\n' >> .combined-sanitizer-leak-suppressions.txt
cat .sanitizer-leak-suppressions.txt >> .combined-sanitizer-leak-suppressions.txt

- name: Install Lakekeeper dependencies
run: |
sudo apt update -y -qq
sudo apt install -y -qq python3-venv
sudo apt install -y -qq python3-venv llvm

- name: Setup Lakekeeper
run: |
Expand All @@ -52,17 +64,17 @@ jobs:
env:
LAKEKEEPER_SERVER_AVAILABLE: 1
run: |
./build/release/test/unittest --order lex "$PWD/test/*" --list-test-names-only || true
./build/release/test/unittest --order lex "$PWD/test/*"
./build/relassert/test/unittest --order lex "$PWD/test/*" --list-test-names-only || true
./build/relassert/test/unittest --order lex "$PWD/test/*"

- name: Run Generic IRC Tests
env:
LAKEKEEPER_SERVER_AVAILABLE: 1
run: |
./build/release/test/unittest --order lex "$PWD/test/sql/local/catalog_test_config_setup/*" --list-test-names-only || true
./build/release/test/unittest --order lex "$PWD/test/sql/local/catalog_test_config_setup/*" --test-config test/configs/lakekeeper.json
./build/relassert/test/unittest --order lex "$PWD/test/sql/local/catalog_test_config_setup/*" --list-test-names-only || true
./build/relassert/test/unittest --order lex "$PWD/test/sql/local/catalog_test_config_setup/*" --test-config test/configs/lakekeeper.json

- name: Test reads with PyIceberg and Spark
run: |
source .venv-spark4/bin/activate
python3 -m pytest -vv test/python --unittest-binary ./build/release/test/unittest --test-python-verbosity verbose
python3 -m pytest -vv test/python --unittest-binary ./build/relassert/test/unittest --test-python-verbosity verbose
25 changes: 18 additions & 7 deletions .github/workflows/test-local-catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ jobs:
test-spark:
name: Test against local catalog
runs-on: ubuntu-latest
env:
ASAN_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer"
ASAN_OPTIONS: "detect_leaks=1:halt_on_error=1:abort_on_error=0:external_symbolizer_path=/usr/bin/llvm-symbolizer"
LSAN_OPTIONS: "suppressions=${{ github.workspace }}/.combined-sanitizer-leak-suppressions.txt"
UBSAN_OPTIONS: "halt_on_error=1:print_stacktrace=1"

steps:
- name: Checkout repository
Expand All @@ -23,12 +28,19 @@ jobs:
uses: actions/download-artifact@v4
with:
name: ${{ inputs.artifact-name }}
path: build/release
path: build

- name: Restore permissions
- name: Extract relassert build artifact
run: |
find ./build/release -type f -name 'duckdb*' -exec chmod +x {} \;
find ./build/release -type f -name 'unittest*' -exec chmod +x {} \;
rm -rf build/relassert
tar -xzf build/relassert-artifact.tar.gz -C build
ls -lh build/relassert/test/unittest

- name: Prepare leak suppressions
run: |
cp duckdb/.sanitizer-leak-suppressions.txt .combined-sanitizer-leak-suppressions.txt
printf '\n' >> .combined-sanitizer-leak-suppressions.txt
cat .sanitizer-leak-suppressions.txt >> .combined-sanitizer-leak-suppressions.txt

- name: Set up Java
uses: actions/setup-java@v4
Expand All @@ -39,7 +51,7 @@ jobs:
- name: Install fixture catalog dependencies
run: |
sudo apt update -y -qq
sudo apt install -y -qq python3-venv tar pkg-config
sudo apt install -y -qq python3-venv tar pkg-config llvm

- name: Install CMake 3.x
run: |
Expand All @@ -64,5 +76,4 @@ jobs:
env:
DUCKDB_ICEBERG_HAVE_GENERATED_DATA: 1
run: |
./build/release/test/unittest --order lex "$PWD/test/*" --list-test-names-only || true ./build/release/test/unittest --order lex "$PWD/test/*"

./build/relassert/test/unittest --order lex "$PWD/test/*" --list-test-names-only || true ./build/relassert/test/unittest --order lex "$PWD/test/*"
Loading
Loading