|
69 | 69 | - name: Python Lint - PyRight |
70 | 70 | env: |
71 | 71 | MATURIN_PEP517_ARGS: "--profile dev" |
72 | | - run: uv run basedpyright vortex-python |
| 72 | + run: | |
| 73 | + uv sync --all-packages |
| 74 | + uv run basedpyright vortex-python |
73 | 75 |
|
74 | 76 | python-test: |
75 | 77 | name: "Python (test)" |
@@ -379,51 +381,132 @@ jobs: |
379 | 381 | flags: ${{ matrix.suite }} |
380 | 382 | use_oidc: true |
381 | 383 |
|
382 | | - rust-test: |
383 | | - name: "Rust tests (sanitizer)" |
384 | | - timeout-minutes: 40 |
| 384 | + rust-test-sanitizer: |
| 385 | + strategy: |
| 386 | + fail-fast: false |
| 387 | + matrix: |
| 388 | + include: |
| 389 | + - sanitizer: asan |
| 390 | + sanitizer_flags: "-Zsanitizer=address -Zsanitize=leak" |
| 391 | + - sanitizer: msan |
| 392 | + sanitizer_flags: "-Zsanitizer=memory" |
| 393 | + - sanitizer: tsan |
| 394 | + sanitizer_flags: "-Zsanitizer=thread" |
| 395 | + name: "Rust tests (${{ matrix.sanitizer }})" |
385 | 396 | runs-on: >- |
386 | 397 | ${{ github.repository == 'vortex-data/vortex' |
387 | 398 | && format('runs-on={0}/runner=amd64-medium/image=ubuntu24-full-x64-pre-v2/tag=rust-test-sanitizer', github.run_id) |
388 | 399 | || 'ubuntu-latest' }} |
| 400 | + timeout-minutes: 40 |
389 | 401 | env: |
390 | | - # Add debug symbols and enable ASAN/LSAN with better output |
391 | | - ASAN_OPTIONS: "symbolize=1:print_stats=1:check_initialization_order=1:detect_leaks=1:halt_on_error=0:verbosity=1:leak_check_at_exit=1" |
392 | | - LSAN_OPTIONS: "verbosity=1:report_objects=1" |
| 402 | + ASAN_OPTIONS: "symbolize=1:check_initialization_order=1:detect_leaks=1:leak_check_at_exit=1" |
| 403 | + LSAN_OPTIONS: "report_objects=1" |
393 | 404 | ASAN_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer" |
394 | | - # Link against DuckDB debug build |
395 | | - VX_DUCKDB_DEBUG: "1" |
396 | | - # Keep frame pointers for better stack traces |
397 | | - CARGO_PROFILE_DEV_DEBUG: "true" |
398 | | - CARGO_PROFILE_TEST_DEBUG: "true" |
399 | | - # Skip slow tests that are too expensive under sanitizer |
| 405 | + MSAN_OPTIONS: "symbolize=1" |
| 406 | + MSAN_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer" |
| 407 | + TSAN_OPTIONS: "symbolize=1" |
| 408 | + TSAN_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer" |
400 | 409 | VORTEX_SKIP_SLOW_TESTS: "1" |
| 410 | + # -Cunsafe-allow-abi-mismatch=sanitizer: libraries like compiler_builtins |
| 411 | + # unset -Zsanitizer flag and we should allow that. |
| 412 | + RUSTFLAGS: "-A warnings -Cunsafe-allow-abi-mismatch=sanitizer --cfg disable_loom --cfg vortex_nightly -C debuginfo=2 -C opt-level=0 -C strip=none" |
401 | 413 | steps: |
402 | 414 | - uses: runs-on/action@v2 |
403 | 415 | if: github.repository == 'vortex-data/vortex' |
404 | 416 | with: |
405 | 417 | sccache: s3 |
406 | 418 | - uses: actions/checkout@v6 |
407 | 419 | - uses: ./.github/actions/setup-prebuild |
408 | | - - name: Install nightly for sanitizer |
| 420 | + - name: Install Rust nightly toolchain |
409 | 421 | run: | |
410 | 422 | rustup toolchain install $NIGHTLY_TOOLCHAIN |
411 | 423 | rustup component add --toolchain $NIGHTLY_TOOLCHAIN rust-src rustfmt clippy llvm-tools-preview |
412 | | - - name: Rust Tests |
413 | | - env: |
414 | | - RUSTFLAGS: "-A warnings -Zsanitizer=address -Zsanitizer=leak --cfg disable_loom --cfg vortex_nightly -C debuginfo=2 -C opt-level=0 -C strip=none" |
| 424 | + export RUSTFLAGS="${RUSTFLAGS} ${{ matrix.sanitizer_flags }}" |
| 425 | + - name: Build tests with sanitizer |
415 | 426 | run: | |
416 | | - # Build with full debug info first (helps with caching) |
417 | | - cargo +$NIGHTLY_TOOLCHAIN build --locked --all-features \ |
418 | | - --target x86_64-unknown-linux-gnu \ |
419 | | - -p vortex-buffer -p vortex-ffi -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array |
420 | | - # Run tests with sanitizers and debug output |
421 | | - cargo +$NIGHTLY_TOOLCHAIN nextest run \ |
422 | | - --locked \ |
423 | | - --all-features \ |
424 | | - --no-fail-fast \ |
425 | | - --target x86_64-unknown-linux-gnu \ |
426 | | - -p vortex-buffer -p vortex-ffi -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array |
| 427 | + cargo +$NIGHTLY_TOOLCHAIN build --locked --all-features \ |
| 428 | + --target x86_64-unknown-linux-gnu -Zbuild-std \ |
| 429 | + -p vortex-buffer -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array |
| 430 | +
|
| 431 | + - name: Run tests with sanitizer |
| 432 | + run: | |
| 433 | + cargo +$NIGHTLY_TOOLCHAIN nextest run --locked --all-features \ |
| 434 | + --target x86_64-unknown-linux-gnu --no-fail-fast -Zbuild-std \ |
| 435 | + -p vortex-buffer -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array |
| 436 | +
|
| 437 | + # vortex-ffi requires --no-default-features as otherwise we pull in |
| 438 | + # Mimalloc which interferes with sanitizers |
| 439 | + # cargo nextest reports less sanitizer issues than cargo test |
| 440 | + # TODO(myrrc): remove --no-default-features once we make Mimalloc opt-in |
| 441 | + - name: Run vortex-ffi tests with sanitizer |
| 442 | + run: | |
| 443 | + cargo +$NIGHTLY_TOOLCHAIN test --locked --no-default-features \ |
| 444 | + --target x86_64-unknown-linux-gnu --no-fail-fast -Zbuild-std \ |
| 445 | + -p vortex-ffi -- --no-capture |
| 446 | +
|
| 447 | + rust-ffi-test-sanitizer: |
| 448 | + strategy: |
| 449 | + fail-fast: false |
| 450 | + matrix: |
| 451 | + include: |
| 452 | + # We don't run memory sanitizer as it's clang-only and provides many |
| 453 | + # false positives for Catch2 |
| 454 | + - sanitizer: asan |
| 455 | + sanitizer_flags: "-Zsanitizer=address -Zsanitize=leak" |
| 456 | + - sanitizer: tsan |
| 457 | + sanitizer_flags: "-Zsanitizer=thread" |
| 458 | + name: "Rust/C++ FFI tests (${{ matrix.sanitizer }})" |
| 459 | + timeout-minutes: 40 |
| 460 | + env: |
| 461 | + ASAN_OPTIONS: "symbolize=1:check_initialization_order=1:detect_leaks=1:leak_check_at_exit=1" |
| 462 | + LSAN_OPTIONS: "report_objects=1" |
| 463 | + ASAN_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer" |
| 464 | + MSAN_OPTIONS: "symbolize=1" |
| 465 | + MSAN_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer" |
| 466 | + TSAN_OPTIONS: "symbolize=1" |
| 467 | + TSAN_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer" |
| 468 | + VORTEX_SKIP_SLOW_TESTS: "1" |
| 469 | + # -Cunsafe-allow-abi-mismatch=sanitizer: libraries like compiler_builtins |
| 470 | + # unset -Zsanitizer flag and we should allow that. |
| 471 | + runs-on: >- |
| 472 | + ${{ github.repository == 'vortex-data/vortex' |
| 473 | + && format('runs-on={0}/runner=amd64-medium/image=ubuntu24-full-x64-pre-v2/tag=rust-ffi-test-sanitizer', github.run_id) |
| 474 | + || 'ubuntu-latest' }} |
| 475 | + steps: |
| 476 | + - uses: runs-on/action@v2 |
| 477 | + if: github.repository == 'vortex-data/vortex' |
| 478 | + with: |
| 479 | + sccache: s3 |
| 480 | + - uses: actions/checkout@v6 |
| 481 | + - uses: ./.github/actions/setup-prebuild |
| 482 | + - name: Install rustfilt |
| 483 | + run: | |
| 484 | + cargo install rustfilt |
| 485 | + - name: Install Rust nightly toolchain |
| 486 | + run: | |
| 487 | + rustup toolchain install $NIGHTLY_TOOLCHAIN |
| 488 | + rustup component add --toolchain $NIGHTLY_TOOLCHAIN rust-src rustfmt clippy llvm-tools-preview |
| 489 | +
|
| 490 | + # Export flags here so that rustfilt won't be built with sanitizers |
| 491 | + export RUSTFLAGS="-A warnings -Cunsafe-allow-abi-mismatch=sanitizer \ |
| 492 | + --cfg disable_loom --cfg vortex_nightly -C debuginfo=2 \ |
| 493 | + -C opt-level=0 -C strip=none -Zexternal-clangrt \ |
| 494 | + ${{ matrix.sanitizer_flags }}" |
| 495 | + - name: Build FFI library |
| 496 | + run: | |
| 497 | + # TODO(myrrc): remove --no-default-features |
| 498 | + cargo +$NIGHTLY_TOOLCHAIN build --locked --no-default-features \ |
| 499 | + --target x86_64-unknown-linux-gnu -Zbuild-std \ |
| 500 | + -p vortex-ffi |
| 501 | + - name: Build FFI library tests |
| 502 | + run: | |
| 503 | + cd vortex-ffi |
| 504 | + cmake -Bbuild -DBUILD_TESTS=1 -DSANITIZER=${{ matrix.sanitizer }} -DTARGET_TRIPLE="x86_64-unknown-linux-gnu" |
| 505 | + cmake --build build -j |
| 506 | + - name: Run tests |
| 507 | + run: | |
| 508 | + set -o pipefail |
| 509 | + ./vortex-ffi/build/test/vortex_ffi_test 2>&1 | rustfilt -i- |
427 | 510 |
|
428 | 511 | cuda-build-lint: |
429 | 512 | if: github.repository == 'vortex-data/vortex' |
@@ -708,7 +791,7 @@ jobs: |
708 | 791 | mkdir -p vortex-cxx/build |
709 | 792 | cmake -S vortex-cxx -B vortex-cxx/build -DVORTEX_ENABLE_TESTING=ON -DVORTEX_ENABLE_ASAN=ON |
710 | 793 | cmake --build vortex-cxx/build --parallel $(nproc) |
711 | | - ctest --test-dir vortex-cxx/build -V |
| 794 | + ctest --test-dir vortex-cxx/build -j $(nproc) -V |
712 | 795 | - name: Build and run the example in release mode |
713 | 796 | run: | |
714 | 797 | cmake -S vortex-cxx/examples -B vortex-cxx/examples/build -DCMAKE_BUILD_TYPE=Release |
@@ -821,6 +904,31 @@ jobs: |
821 | 904 | run: | |
822 | 905 | find flatbuffers/ -type f -name "*.fbs" | sed 's/^flatbuffers\///' | xargs -I{} -n1 flatc -I flatbuffers.HEAD --conform-includes flatbuffers --conform flatbuffers/{} flatbuffers.HEAD/{} |
823 | 906 |
|
| 907 | + ffi-c-test: |
| 908 | + name: "C API test build" |
| 909 | + timeout-minutes: 10 |
| 910 | + runs-on: >- |
| 911 | + ${{ github.repository == 'vortex-data/vortex' |
| 912 | + && format('runs-on={0}/runner=amd64-medium/image=ubuntu24-full-x64-pre-v2/tag=cxx-build', github.run_id) |
| 913 | + || 'ubuntu-latest' }} |
| 914 | + steps: |
| 915 | + - uses: runs-on/action@v2 |
| 916 | + if: github.repository == 'vortex-data/vortex' |
| 917 | + with: |
| 918 | + sccache: s3 |
| 919 | + - uses: actions/checkout@v6 |
| 920 | + - uses: ./.github/actions/setup-prebuild |
| 921 | + - name: "regenerate FFI header file" |
| 922 | + run: | |
| 923 | + cargo +$NIGHTLY_TOOLCHAIN build -p vortex-ffi |
| 924 | + - name: Build and run C++ unit tests |
| 925 | + run: | |
| 926 | + cd vortex-ffi |
| 927 | + mkdir build |
| 928 | + cmake -Bbuild |
| 929 | + cmake --build build -j $(nproc) |
| 930 | + ctest --test-dir build -j $(nproc) |
| 931 | +
|
824 | 932 | check-java-publish-build: |
825 | 933 | runs-on: ${{ matrix.target.runs-on }} |
826 | 934 | container: |
|
0 commit comments