Skip to content

Commit de2512a

Browse files
committed
initial
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
1 parent 1e91494 commit de2512a

53 files changed

Lines changed: 3951 additions & 2285 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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"

Cargo.lock

Lines changed: 0 additions & 118 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ members = [
3232
"vortex-cuda/gpu-scan-cli",
3333
"vortex-cuda/macros",
3434
"vortex-cuda/nvcomp",
35-
"vortex-cxx",
3635
"vortex-ffi",
3736
"fuzz",
3837
"vortex-jni",

vortex-cxx/.clang-format

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# SPDX-FileCopyrightText: Copyright the Vortex contributors
3+
NamespaceIndentation: None
4+
BasedOnStyle: Google
5+
IndentWidth: 4
6+
AccessModifierOffset: -4

vortex-cxx/.clang-tidy

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# SPDX-License-Identifier: Apache-2.0
2-
# SPDX-FileCopyrightText: Copyright the Vortex contributors
1+
# SPDX-License-Identifier: Apache-2.0
2+
# SPDX-FileCopyrightText: Copyright the Vortex contributors
33

44
Checks: |
55
-*,
@@ -43,7 +43,7 @@ Checks: |
4343
-bugprone-unused-local-non-trivial-variable,
4444
-bugprone-empty-catch,
4545
WarningsAsErrors: '*'
46-
HeaderFilterRegex: '(cpp|examples)/.*\.(cpp|hpp)$'
46+
HeaderFilterRegex: '(examples)/.*\.(cpp|hpp)$'
4747
FormatStyle: none
4848
CheckOptions:
4949
- key: readability-identifier-naming.ClassCase
@@ -90,4 +90,3 @@ CheckOptions:
9090
value: lower_case
9191
- key: cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams
9292
value: true
93-

0 commit comments

Comments
 (0)