@@ -475,8 +475,8 @@ jobs:
475475 command : check ${{ matrix.checks }}
476476
477477 cxx-test :
478- name : " C++ build "
479- timeout-minutes : 30
478+ name : " C++ API tests "
479+ timeout-minutes : 5
480480 runs-on : >-
481481 ${{ github.repository == 'vortex-data/vortex'
482482 && format('runs-on={0}/runner=amd64-medium/image=ubuntu24-full-x64-pre-v2/extras=s3-cache/tag=cxx-build', github.run_id)
@@ -490,20 +490,32 @@ jobs:
490490 - uses : ./.github/actions/setup-prebuild
491491 with :
492492 enable-sccache : " true"
493- - name : Build and run C++ unit tests
493+ - name : Install Rust nightly toolchain
494+ run : |
495+ rustup toolchain install $NIGHTLY_TOOLCHAIN
496+ rustup component add --toolchain $NIGHTLY_TOOLCHAIN rust-src rustfmt clippy llvm-tools-preview
497+ - name : Build FFI library (asan)
498+ run : |
499+ cargo build --profile ci -p vortex-ffi
500+ RUSTFLAGS="-A warnings -Cunsafe-allow-abi-mismatch=sanitizer \
501+ -C debuginfo=2 -C opt-level=0 -C strip=none -Zexternal-clangrt \
502+ -Zsanitizer=address,leak" \
503+ cargo +$NIGHTLY_TOOLCHAIN build --locked --no-default-features \
504+ --target x86_64-unknown-linux-gnu -Zbuild-std \
505+ -p vortex-ffi
506+ - name : Build C++ tests (asan)
494507 run : |
495508 mkdir -p vortex-cxx/build
496- cmake -S vortex-cxx -B vortex-cxx/build -DVORTEX_ENABLE_TESTING =ON -DVORTEX_ENABLE_ASAN=ON
509+ cmake -S vortex-cxx -B vortex-cxx/build -DBUILD_TESTS =ON -DSANITIZER=asan -DTARGET_TRIPLE="x86_64-unknown-linux-gnu"
497510 cmake --build vortex-cxx/build --parallel $(nproc)
498- ctest --test-dir vortex-cxx/build -j $(nproc) -V
499- - name : Build and run the example in release mode
511+ - name : Run C++ tests
512+ run : |
513+ vortex-cxx/build/tests/vortex_cxx_test
514+ - name : Build and run example
500515 run : |
501- cmake -S vortex-cxx/examples -B vortex-cxx/examples/build -DCMAKE_BUILD_TYPE=Release
516+ cmake -S vortex-cxx -B vortex-cxx/examples/build -DSANITIZER=asan -DBUILD_EXAMPLES=1 - DCMAKE_BUILD_TYPE=Release -DTARGET_TRIPLE="x86_64-unknown-linux-gnu"
502517 cmake --build vortex-cxx/examples/build --parallel $(nproc)
503- vortex-cxx/examples/build/hello-vortex vortex-cxx/examples/goldenfiles/example.vortex
504- - uses : ./.github/actions/check-rebuild
505- with :
506- command : " cargo build --profile ci --locked -p vortex-cxx --lib"
518+ vortex-cxx/examples/build/examples/hello-vortex
507519
508520 sqllogic-test :
509521 name : " SQL logic tests"
0 commit comments