-
Notifications
You must be signed in to change notification settings - Fork 137
956 lines (913 loc) · 35.1 KB
/
ci.yml
File metadata and controls
956 lines (913 loc) · 35.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
name: CI
# Concurrency control:
# - PRs: new commits on a feature branch will cancel in-progress (outdated) runs.
# - Push to develop: runs queue sequentially, never cancelled. This allows us to have benchmarks
# run on every commit for our benchmarks website.
# - `workflow_dispatch`: groups by branch and queues if run on develop.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}
on:
push:
branches: [develop]
pull_request: { }
workflow_dispatch: { }
permissions:
actions: read
contents: read
checks: write # audit-check creates checks
issues: write # audit-check creates issues
env:
CARGO_TERM_COLOR: auto
RUST_BACKTRACE: 1
NIGHTLY_TOOLCHAIN: nightly-2026-02-05
jobs:
lint-toml:
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v6
- uses: spiraldb/actions/.github/actions/lint-toml@0.18.5
validate-workflow-yaml:
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v6
- name: Validate YAML file
run: |
# Lint the workflows and yamllint's configuration file.
yamllint \
--strict \
-c .yamllint.yaml \
.github/
python-lint:
name: "Python (lint)"
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-medium/tag=python-lint', github.run_id)
|| 'ubuntu-latest' }}
timeout-minutes: 120
steps:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install uv
uses: spiraldb/actions/.github/actions/setup-uv@0.18.5
with:
sync: false
prune-cache: false
# Use uvx for ruff to avoid building the Rust extension (saves ~4.5 min)
- name: Python Lint - Format
run: uvx ruff format --check .
- name: Python Lint - Ruff
run: uvx ruff check .
# PyRight needs the project for type information, so use uv run
- name: Python Lint - PyRight
env:
MATURIN_PEP517_ARGS: "--profile dev"
run: uv run basedpyright vortex-python
python-test:
name: "Python (test)"
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-large/tag=python-test', github.run_id)
|| 'ubuntu-latest' }}
timeout-minutes: 120
env:
RUST_LOG: "info,uv=debug"
MATURIN_PEP517_ARGS: "--profile dev"
steps:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install uv
uses: spiraldb/actions/.github/actions/setup-uv@0.18.5
with:
sync: false
prune-cache: false
- name: Install Doxygen
uses: ssciwr/doxygen-install@v1
- name: Pytest - Vortex
run: |
uv run --all-packages pytest --benchmark-disable -n auto test/
working-directory: vortex-python/
- name: Pytest Benchmarks - Vortex
run: |
uv run --all-packages pytest --benchmark-only benchmark/
working-directory: vortex-python/
- name: Doctest - PyVortex
run: |
uv run --all-packages make doctest
working-directory: docs/
- name: Ensure docs build - PyVortex
run: |
uv run --all-packages make html
working-directory: docs/
python-wheel-build:
name: "Python (wheel build)"
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v6
- name: Rust Dependency Cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref_name == 'develop' }}
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
enable-sccache: "false"
- uses: mlugg/setup-zig@v2
- name: Install uv
uses: spiraldb/actions/.github/actions/setup-uv@0.18.5
with:
sync: false
prune-cache: false
- name: Ensure wheel and sdist can be built on Linux - PyVortex
shell: bash
run: |
echo "Clearing wheel target directory"
rm -rf ../target/wheels/
uv venv
uv tool run maturin@1.10 build --interpreter python3.11 --zig
uv tool run maturin@1.10 build --interpreter python3.11 --zig --sdist
file_count=$(ls -1 ../target/wheels/ | wc -l)
if [[ $file_count -ne 2 ]]; then
echo "Unexpected number of files detected ${file_count}:"
ls ../target/wheels/
exit 1
else
echo "Generated two files"
fi
working-directory: vortex-python/
rust-docs:
name: "Rust (docs)"
timeout-minutes: 120
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-small/tag=rust-docs', github.run_id)
|| 'ubuntu-latest' }}
steps:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Docs
run: |
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps
# nextest doesn't support doc tests, so we run it here
cargo test --doc --workspace --all-features --exclude vortex-cxx --exclude vortex-jni --exclude vortex-ffi --exclude xtask --no-fail-fast
build-rust:
name: "Rust build (${{matrix.config.name}})"
timeout-minutes: 120
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner={1}/tag={2}', github.run_id, matrix.config.runner, matrix.config.name)
|| 'ubuntu-latest' }}
env:
# disable lints for build, they will be caught in Rust lint job.
RUSTFLAGS: "-A warnings"
strategy:
fail-fast: false
matrix:
config:
- name: "all-features"
runner: amd64-medium
args: "--all-features --all-targets"
- name: "default features"
runner: amd64-medium
args: "--all-targets"
- name: "with tokio dispatcher"
runner: amd64-small
# Only build the crates that have the tokio features, not re-building other crates with no-default-features
args: "--no-default-features --features tokio --all-targets -p vortex -p vortex-io -p vortex-file -p vortex-layout"
- name: "wasm32 with default features"
runner: amd64-medium
target: wasm32-unknown-unknown
env:
rustflags: "RUSTFLAGS='-A warnings --cfg getrandom_backend=\"wasm_js\"'"
args: "--target wasm32-unknown-unknown --exclude vortex --exclude vortex-cuda --exclude vortex-cub --exclude vortex-nvcomp --exclude vortex-datafusion --exclude vortex-duckdb --exclude vortex-tui --exclude vortex-zstd --exclude vortex-test-e2e-cuda --exclude vortex-sqllogictest"
steps:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@v6
- id: setup-rust
uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install wasm32 target
if: ${{ matrix.config.target == 'wasm32-unknown-unknown' }}
run: rustup target add wasm32-unknown-unknown
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Rust Build (${{matrix.config.name}})
run: ${{matrix.config.env.rustflags}} cargo hack build --locked ${{matrix.config.args}} --ignore-private
- name: "Make sure no files changed after build"
run: |
git status --porcelain
test -z "$(git status --porcelain)"
check-min-deps:
name: "Check build with minimal dependencies"
timeout-minutes: 120
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-medium/tag=rust-min-deps', github.run_id)
|| 'ubuntu-latest' }}
steps:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: taiki-e/install-action@cargo-hack
- uses: taiki-e/install-action@cargo-minimal-versions
- run: cargo minimal-versions check --direct --workspace --ignore-private
rust-lint:
name: "Rust (lint)"
timeout-minutes: 120
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-large/tag=rust-lint', github.run_id)
|| 'ubuntu-latest' }}
steps:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@v6
- id: setup-rust
uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install nightly for fmt
run: rustup toolchain install $NIGHTLY_TOOLCHAIN --component rustfmt
- name: Rust Lint - Format
run: cargo +$NIGHTLY_TOOLCHAIN fmt --all --check
- name: Rustc check
run: RUSTFLAGS="-D warnings" cargo check --locked --all-features --all-targets
- name: Rustc check (release)
run: RUSTFLAGS="-D warnings" cargo check --locked --all-features --all-targets --release
- name: Rust Lint - Clippy All Features
run: cargo clippy --locked --all-features --all-targets -- -D warnings
- name: Rust Lint - Clippy Default Features
run: cargo clippy --locked --all-targets -- -D warnings
cpp-lint:
name: "C/C++ (lint)"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- name: C/C++ Lint - clang-format
run: |
git ls-files vortex-cuda vortex-cxx vortex-duckdb vortex-ffi \
| grep -E '\.(cpp|hpp|cu|cuh|h)$' \
| grep -v 'kernels/src/bit_unpack_.*\.cu$' \
| xargs clang-format --dry-run --Werror --style=file
rust-lint-no-default:
name: "Rust (lint, no default)"
timeout-minutes: 120
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-medium/tag=rust-lint-no-default', github.run_id)
|| 'ubuntu-latest' }}
steps:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@v6
- id: setup-rust
uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Rust Lint - Clippy No Default Features
shell: bash
run: |
cargo hack --no-dev-deps --ignore-private clippy --no-default-features -- -D warnings
public-api:
name: "Public API lock files"
timeout-minutes: 120
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-xsmall/tag=public-api', github.run_id)
|| 'ubuntu-latest' }}
steps:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
- name: Regenerate public API lock files
run: cargo +$NIGHTLY_TOOLCHAIN xtask public-api
- name: Verify lock files are up to date
run: |
if ! git diff --quiet '**/public-api.lock'; then
git diff -U0 '**/public-api.lock'
echo ""
echo ""
echo "Changed files:"
git diff --name-only '**/public-api.lock'
echo ""
echo ""
echo "Public API lock files are out of date."
echo "Run './scripts/public-api.sh' locally to"
echo "regenerate them, then commit the changes."
exit 1
fi
rust-coverage:
name: "Rust tests (coverage) (${{ matrix.suite }})"
timeout-minutes: 120
permissions:
id-token: write
strategy:
matrix:
include:
- suite: tests
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-large/tag=rust-coverage-suite-{1}', github.run_id, matrix.suite)
|| 'ubuntu-latest' }}
env:
RUSTFLAGS: "-Cinstrument-coverage -A warnings"
CARGO_INCREMENTAL: 0 # Disable incremental compilation to get accurate coverage
LLVM_PROFILE_FILE: "target/coverage/vortex-%p-%m.profraw"
GRCOV_OUTPUT_FILE: "target/coverage/vortex.lcov"
steps:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@v6
- id: setup-rust
uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install grcov
uses: taiki-e/install-action@grcov
- name: Install nextest
uses: taiki-e/install-action@v2
with:
tool: nextest
- name: Rust Tests
if: ${{ matrix.suite == 'tests' }}
run: |
cargo nextest run --locked --workspace --all-features --no-fail-fast
- name: Install llvm-tools-preview
run: rustup component add llvm-tools-preview
- name: Generate coverage report
run: |
grcov . --binary-path target/debug/ -s . -t lcov --llvm --ignore-not-existing \
--threads $(nproc) \
--ignore '../*' --ignore '/*' --ignore 'fuzz/*' --ignore 'vortex-bench/*' \
--ignore 'home/*' --ignore 'xtask/*' --ignore 'target/*' --ignore 'vortex-error/*' \
--ignore 'vortex-python/*' --ignore 'vortex-jni/*' --ignore 'vortex-flatbuffers/*' \
--ignore 'vortex-proto/*' --ignore 'vortex-tui/*' --ignore 'vortex-datafusion/examples/*' \
--ignore 'vortex-ffi/examples/*' --ignore '*/arbitrary/*' --ignore '*/arbitrary.rs' --ignore 'vortex-cxx/*' \
--ignore benchmarks/* --ignore 'vortex-test/*' \
-o ${{ env.GRCOV_OUTPUT_FILE }}
- name: Codecov
uses: codecov/codecov-action@v5
with:
name: run-${{ matrix.suite }}
files: ${{ env.GRCOV_OUTPUT_FILE }}
disable_search: true
flags: ${{ matrix.suite }}
use_oidc: true
rust-test:
name: "Rust tests (sanitizer)"
timeout-minutes: 120
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-medium/tag=rust-test-sanitizer', github.run_id)
|| 'ubuntu-latest' }}
env:
# Add debug symbols and enable ASAN/LSAN with better output
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"
LSAN_OPTIONS: "verbosity=1:report_objects=1"
ASAN_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer"
# Link against DuckDB debug build
VX_DUCKDB_DEBUG: "1"
# Keep frame pointers for better stack traces
CARGO_PROFILE_DEV_DEBUG: "true"
CARGO_PROFILE_TEST_DEBUG: "true"
# Skip slow tests that are too expensive under sanitizer
VORTEX_SKIP_SLOW_TESTS: "1"
steps:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@v6
- name: Install llvm
uses: aminya/setup-cpp@v1
with:
compiler: llvm
cache-tools: true
- id: setup-rust
uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
components: "rust-src, rustfmt, clippy, llvm-tools-preview"
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build cmake
- name: Install nextest
uses: taiki-e/install-action@v2
with:
tool: nextest
- name: Rust Tests
env:
RUSTFLAGS: "-A warnings -Zsanitizer=address -Zsanitizer=leak --cfg disable_loom --cfg vortex_nightly -C debuginfo=2 -C opt-level=0 -C strip=none"
run: |
# Build with full debug info first (helps with caching)
cargo +$NIGHTLY_TOOLCHAIN build --locked --all-features \
--target x86_64-unknown-linux-gnu \
-p vortex-buffer -p vortex-ffi -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
# Run tests with sanitizers and debug output
cargo +$NIGHTLY_TOOLCHAIN nextest run \
--locked \
--all-features \
--no-fail-fast \
--target x86_64-unknown-linux-gnu \
-p vortex-buffer -p vortex-ffi -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
# cuda-build:
# if: github.repository == 'vortex-data/vortex'
# name: "CUDA build"
# timeout-minutes: 120
# runs-on: runs-on=${{ github.run_id }}/runner=gpu/tag=cuda-build
# steps:
# - uses: runs-on/action@v2
# with:
# sccache: s3
# - uses: actions/checkout@v6
# - uses: ./.github/actions/setup-rust
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# - name: Build CUDA crates
# run: |
# cargo build --locked --all-features --all-targets \
# -p vortex-cuda \
# -p vortex-cub \
# -p vortex-nvcomp \
# -p gpu-scan-cli \
# -p vortex-test-e2e-cuda
# cuda-lint:
# if: github.repository == 'vortex-data/vortex'
# name: "CUDA (lint)"
# timeout-minutes: 120
# runs-on: runs-on=${{ github.run_id }}/runner=gpu/tag=cuda-lint
# steps:
# - uses: runs-on/action@v2
# with:
# sccache: s3
# - uses: actions/checkout@v6
# - uses: ./.github/actions/setup-rust
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# - name: Clippy CUDA crates
# run: |
# cargo clippy --locked --all-features --all-targets \
# -p vortex-cuda \
# -p vortex-cub \
# -p vortex-nvcomp \
# -p gpu-scan-cli \
# -p vortex-test-e2e-cuda \
# -- -D warnings
cuda-test:
if: github.repository == 'vortex-data/vortex'
name: "CUDA tests"
timeout-minutes: 120
runs-on: runs-on=${{ github.run_id }}/runner=gpu/tag=cuda-tests
steps:
- uses: runs-on/action@v2
with:
sccache: s3
- name: Display NVIDIA SMI details
run: |
nvidia-smi
nvidia-smi -L
nvidia-smi -q -d Memory
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install nextest
uses: taiki-e/install-action@v2
with:
tool: nextest
- name: Rust Tests
env:
FLAT_LAYOUT_INLINE_ARRAY_NODE: true
run: |
cargo nextest run \
--locked \
-p vortex-file \
-p vortex-cuda \
-p vortex-cub \
-p vortex-nvcomp \
-p vortex-test-e2e-cuda \
--all-features \
--no-fail-fast \
--target x86_64-unknown-linux-gnu \
--verbose
# cuda-test-sanitizer:
# if: github.repository == 'vortex-data/vortex'
# name: "CUDA tests (sanitizer)"
# timeout-minutes: 120
# runs-on: runs-on=${{ github.run_id }}/runner=gpu/tag=cuda-test-sanitizer
# steps:
# - uses: runs-on/action@v2
# with:
# sccache: s3
# - name: Display NVIDIA SMI details
# run: |
# nvidia-smi
# nvidia-smi -L
# nvidia-smi -q -d Memory
# - uses: actions/checkout@v6
# - uses: ./.github/actions/setup-rust
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# - name: CUDA - memcheck
# env:
# CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: compute-sanitizer --tool memcheck --leak-check=full --error-exitcode 1
# run: cargo test --locked -p vortex-cuda --all-features --target x86_64-unknown-linux-gnu
# # TODO(joe): try to re-enable, This is hanging in CI.
# # - name: CUDA - racecheck
# # env:
# # CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: compute-sanitizer --tool racecheck --error-exitcode 1
# # run: cargo test --locked -p vortex-cuda --all-features --target x86_64-unknown-linux-gnu
# - name: CUDA - synccheck
# env:
# CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: compute-sanitizer --tool synccheck --error-exitcode 1
# run: cargo test --locked -p vortex-cuda --all-features --target x86_64-unknown-linux-gnu
# - name: CUDA - initcheck
# env:
# CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: compute-sanitizer --tool initcheck --error-exitcode 1
# run: cargo test --locked -p vortex-cuda --all-features --target x86_64-unknown-linux-gnu
# cuda-test-cudf:
# if: github.repository == 'vortex-data/vortex'
# name: "CUDA tests (cudf)"
# timeout-minutes: 120
# runs-on: runs-on=${{ github.run_id }}/runner=gpu/tag=cuda-test-cudf
# steps:
# - uses: runs-on/action@v2
# with:
# sccache: s3
# - name: Display NVIDIA SMI details
# run: |
# nvidia-smi
# nvidia-smi -L
# nvidia-smi -q -d Memory
# - uses: actions/checkout@v6
# - uses: ./.github/actions/setup-rust
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# - name: Build cudf test library
# run: cargo build --locked -p vortex-test-e2e-cuda --target x86_64-unknown-linux-gnu
# - name: Download and run cudf-test-harness
# run: |
# curl -fsSL https://github.com/vortex-data/cudf-test-harness/releases/latest/download/cudf-test-harness-x86_64.tar.gz | tar -xz
# cd cudf-test-harness-x86_64
# compute-sanitizer --tool memcheck --error-exitcode 1 ./cudf-test-harness check $GITHUB_WORKSPACE/target/x86_64-unknown-linux-gnu/debug/libvortex_test_e2e_cuda.so
rust-test-other:
name: "Rust tests (${{ matrix.os }})"
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
- os: windows-x64
runner: runs-on=${{ github.run_id }}/pool=windows-x64
fallback_runner: windows-latest
- os: linux-arm64
runner: runs-on=${{ github.run_id }}/runner=arm64-medium/tag=rust-test-linux-arm64
fallback_runner: ubuntu-24.04-arm
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& matrix.runner
|| matrix.fallback_runner }}
steps:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@v5
- name: Install Visual Studio Build Tools (Windows)
if: matrix.os == 'windows-x64'
run: |
$flags = '-C debuginfo=0'
echo "RUSTFLAGS=$flags" >> $env:GITHUB_ENV
choco install visualstudio2022buildtools --package-parameters `
"--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.26100 --passive" -y
- name: Setup Python (Windows)
if: matrix.os == 'windows-x64'
uses: actions/setup-python@v5
with:
python-version: "3.11"
- id: setup-rust
uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install nextest
uses: taiki-e/install-action@v2
with:
tool: nextest
- name: Rust Tests (Windows)
if: matrix.os == 'windows-x64'
run: |
cargo nextest run --locked --workspace --all-features --no-fail-fast `
--exclude vortex-bench --exclude vortex-python --exclude vortex-duckdb `
--exclude vortex-fuzz --exclude vortex-cuda --exclude vortex-nvcomp `
--exclude vortex-cub --exclude vortex-test-e2e-cuda --exclude duckdb-bench `
--exclude lance-bench --exclude datafusion-bench --exclude random-access-bench `
--exclude compress-bench --exclude xtask --exclude vortex-datafusion `
--exclude gpu-scan-cli --exclude vortex-sqllogictest
- name: Rust Tests (Other)
if: matrix.os != 'windows-x64'
run: |
cargo nextest run --locked --workspace --all-features --no-fail-fast --exclude vortex-bench --exclude xtask --exclude vortex-sqllogictest
- name: Alert incident.io
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/develop'
uses: ./.github/actions/alert-incident-io
with:
api-key: ${{ secrets.INCIDENT_IO_ALERT_TOKEN }}
alert-title: "Rust tests (${{ matrix.os }}) failed on develop"
deduplication-key: ci-rust-test-${{ matrix.os }}-failure
build-java:
name: "Java"
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-medium/tag=java', github.run_id)
|| 'ubuntu-latest' }}
timeout-minutes: 120
steps:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: "corretto"
java-version: "17"
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: ./gradlew test --parallel
working-directory: ./java
bench-codspeed:
strategy:
matrix:
include:
- { shard: 1, name: "Core foundation", packages: "vortex-buffer vortex-error" }
- { shard: 2, name: "Arrays", packages: "vortex-array", features: "--features _test-harness" }
- { shard: 3, name: "Main library", packages: "vortex" }
- { shard: 4, name: "Encodings 1", packages: "vortex-alp vortex-bytebool vortex-datetime-parts" }
- { shard: 5, name: "Encodings 2", packages: "vortex-decimal-byte-parts vortex-fastlanes vortex-fsst", features: "--features _test-harness" }
- { shard: 6, name: "Encodings 3", packages: "vortex-pco vortex-runend vortex-sequence" }
- { shard: 7, name: "Encodings 4", packages: "vortex-sparse vortex-zigzag vortex-zstd" }
- { shard: 8, name: "Storage formats", packages: "vortex-flatbuffers vortex-proto vortex-btrblocks" }
name: "Benchmark with Codspeed (Shard #${{ matrix.shard }})"
timeout-minutes: 120
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-medium/tag=bench-codspeed-{1}', github.run_id, matrix.shard)
|| 'ubuntu-latest' }}
steps:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/system-info
- name: Install Codspeed
uses: taiki-e/cache-cargo-install-action@2bfc3cedaf2ee5e7fa5d0ae034ccd5fb50cf8e1f
with:
tool: cargo-codspeed
- name: Build benchmarks
env:
RUSTFLAGS: "-C target-feature=+avx2 -C debug-assertions=yes"
run: cargo codspeed build ${{ matrix.features }} $(printf -- '-p %s ' ${{ matrix.packages }}) --profile bench
- name: Run benchmarks
uses: CodSpeedHQ/action@2ac572851726409c88c02a307f1ea2632a9ea59b
with:
run: cargo codspeed run
token: ${{ secrets.CODSPEED_TOKEN }}
mode: "simulation"
license-check-and-audit-check:
name: License Check and Audit Check
runs-on: ubuntu-latest
timeout-minutes: 120
strategy:
matrix:
checks:
- advisories
- bans licenses sources
# Prevent sudden announcement of a new advisory from failing ci:
continue-on-error: ${{ matrix.checks == 'advisories' }}
steps:
- uses: actions/checkout@v6
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check ${{ matrix.checks }}
cxx-test:
name: "C++ build"
timeout-minutes: 120
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-medium/tag=cxx-build', github.run_id)
|| 'ubuntu-latest' }}
steps:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@v6
- id: setup-rust
uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build and run C++ unit tests
run: |
mkdir -p vortex-cxx/build
cmake -S vortex-cxx -B vortex-cxx/build -DVORTEX_ENABLE_TESTING=ON -DVORTEX_ENABLE_ASAN=ON
cmake --build vortex-cxx/build --parallel $(nproc)
ctest --test-dir vortex-cxx/build -V
- name: Build and run the example in release mode
run: |
cmake -S vortex-cxx/examples -B vortex-cxx/examples/build -DCMAKE_BUILD_TYPE=Release
cmake --build vortex-cxx/examples/build --parallel $(nproc)
vortex-cxx/examples/build/hello-vortex vortex-cxx/examples/goldenfiles/example.vortex
sqllogic-test:
name: "SQL logic tests"
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-medium/tag=sql-logic-test', github.run_id)
|| 'ubuntu-latest' }}
steps:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@v6
- id: setup-rust
uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run sqllogictest tests
run: |
cargo test -p vortex-sqllogictest --test sqllogictests
wasm-integration:
name: "wasm-integration"
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
targets: "wasm32-wasip1"
- name: Setup Wasmer
uses: wasmerio/setup-wasmer@v3.1
- run: cargo build --target wasm32-wasip1
working-directory: ./wasm-test
- run: wasmer run ./target/wasm32-wasip1/debug/wasm-test.wasm
working-directory: ./wasm-test
miri:
name: "Rust tests (miri)"
runs-on: ubuntu-latest
timeout-minutes: 120
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-disable-isolation -Zmiri-env-forward=RUST_BACKTRACE
RUSTFLAGS: "-A warnings --cfg vortex_nightly"
RUST_BACKTRACE: full
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
components: "rust-src, rustfmt, clippy, miri"
- uses: taiki-e/install-action@v2
with:
tool: nextest
- name: Run Miri
run: cargo +$NIGHTLY_TOOLCHAIN miri nextest run --no-fail-fast -p vortex-buffer -p vortex-ffi
generated-files:
name: "Check generated source files are up to date"
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install nightly for cbindgen macro expansion
run: rustup toolchain install $NIGHTLY_TOOLCHAIN
- uses: ./.github/actions/setup-flatc
- name: "regenerate all .fbs/.proto Rust code"
run: |
cargo xtask generate-fbs
cargo xtask generate-proto
- name: "regenerate FFI header file"
run: |
cargo +$NIGHTLY_TOOLCHAIN build -p vortex-ffi
- name: "Make sure no files changed after regenerating"
run: |
git status --porcelain
test -z "$(git status --porcelain)"
- name: "Checkout develop flatbuffers"
working-directory: vortex-flatbuffers/
run: |
cp -R flatbuffers flatbuffers.HEAD
git fetch origin develop --depth 1
git checkout origin/develop -- flatbuffers
- name: "Verify flatbuffer back-compat"
working-directory: vortex-flatbuffers/
run: |
find flatbuffers/ -type f -name "*.fbs" | sed 's/^flatbuffers\///' | xargs -I{} -n1 flatc -I flatbuffers.HEAD --conform-includes flatbuffers --conform flatbuffers/{} flatbuffers.HEAD/{}
check-java-publish-build:
runs-on: ${{ matrix.target.runs-on }}
container:
image: "ubuntu:20.04"
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
target:
- { os: ubuntu, runs-on: "ubuntu-24.04-arm", target: aarch64-unknown-linux-gnu }
- { os: ubuntu, runs-on: "ubuntu-24.04", target: x86_64-unknown-linux-gnu }
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: ./.github/actions/prepare-java-linux
- uses: actions/setup-java@v5
with:
distribution: "corretto"
java-version: "17"
- uses: ./.github/actions/setup-rust
with:
targets: ${{ matrix.target.target }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
enable-sccache: "false"
- run: cargo build --package vortex-jni
rust-publish-dry-run:
name: "Rust publish dry-run"
timeout-minutes: 120
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-xsmall/tag=rust-publish-dry-run', github.run_id)
|| 'ubuntu-latest' }}
steps:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@v6
- id: setup-rust
uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install cargo-edit
uses: taiki-e/cache-cargo-install-action@2bfc3cedaf2ee5e7fa5d0ae034ccd5fb50cf8e1f
with:
tool: cargo-edit
- name: Set Version
run: |
# This is mostly a dummy version, we don't actually publish anything but it cannot exist in crates.io
cargo set-version --workspace 0.100000.0
- name: Test Release
run: |
cargo publish --dry-run --no-verify --allow-dirty --workspace