From 7226d73f536376550b59d3605368b2e61e12139d Mon Sep 17 00:00:00 2001 From: Andrew Duffy Date: Wed, 3 Dec 2025 11:45:56 -0500 Subject: [PATCH 1/7] add prebuilt CI image Signed-off-by: Andrew Duffy --- .github/workflows/ci.yml | 58 ++++++++-------------------------------- 1 file changed, 11 insertions(+), 47 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f039b4b17c6..c80f4ffc2ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,10 +40,9 @@ jobs: python-lint: name: "Python (lint)" runs-on: - - runs-on=${{ github.run_id }} + - runs-on=${{ github.run_id }}/image=vortex-ci - family=m7i+m7i-flex+m7a - cpu=16 - - image=ubuntu24-full-x64 - extras=s3-cache - tag=python-lint timeout-minutes: 120 @@ -72,10 +71,9 @@ jobs: python-test: name: "Python (test)" runs-on: - - runs-on=${{ github.run_id }} + - runs-on=${{ github.run_id }}/image=vortex-ci - family=m7i+m7i-flex+m7a - cpu=16 - - image=ubuntu24-full-x64 - extras=s3-cache - tag=python-test timeout-minutes: 120 @@ -156,10 +154,9 @@ jobs: name: "Rust (docs)" timeout-minutes: 120 runs-on: - - runs-on=${{ github.run_id }} + - runs-on=${{ github.run_id }}/image=vortex-ci - family=m7i+m7i-flex+m7a - cpu=8 - - image=ubuntu24-full-x64 - extras=s3-cache - tag=rust-docs steps: @@ -167,9 +164,6 @@ jobs: 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 @@ -180,10 +174,9 @@ jobs: name: "Rust build (${{matrix.config.name}})" timeout-minutes: 120 runs-on: - - runs-on=${{ github.run_id }} + - runs-on=${{ github.run_id }}/image=vortex-ci - family=m7i+m7i-flex+m7a - cpu=8 - - image=ubuntu24-full-x64 - extras=s3-cache - tag=${{ matrix.config.name }} env: @@ -213,14 +206,9 @@ jobs: with: sccache: s3 - uses: actions/checkout@v6 - - 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 ${{matrix.config.command}} --locked ${{matrix.config.args}} --ignore-private - name: "Make sure no files changed after build" @@ -232,10 +220,9 @@ jobs: name: "Check build with minimal dependencies" timeout-minutes: 120 runs-on: - - runs-on=${{ github.run_id }} + - runs-on=${{ github.run_id }}/image=vortex-ci - family=m7i+m7i-flex+m7a - cpu=8 - - image=ubuntu24-full-x64 - extras=s3-cache - tag=rust-min-deps steps: @@ -243,10 +230,6 @@ jobs: 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 @@ -254,10 +237,9 @@ jobs: name: "Rust (lint)" timeout-minutes: 120 runs-on: - - runs-on=${{ github.run_id }} + - runs-on=${{ github.run_id }}/image=vortex-ci - family=m7i+m7i-flex+m7a - cpu=16 - - image=ubuntu24-full-x64 - extras=s3-cache - tag=rust-lint steps: @@ -265,10 +247,6 @@ jobs: with: sccache: s3 - uses: actions/checkout@v6 - - uses: ./.github/actions/setup-rust - with: - toolchain: nightly - repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Rust Lint - Format run: cargo +nightly fmt --all --check - name: Rustc check @@ -281,13 +259,12 @@ jobs: run: cargo clippy --locked --all-targets -- -D warnings rust-lint-no-default: - name: "Rust (lint, no default)" + name: "Rust (lint, no default)"/image=vortex-ci timeout-minutes: 120 runs-on: - runs-on=${{ github.run_id }} - family=m7i+m7i-flex+m7a - cpu=16 - - image=ubuntu24-full-x64 - extras=s3-cache - tag=rust-lint-no-default steps: @@ -295,11 +272,6 @@ jobs: with: sccache: s3 - uses: actions/checkout@v6 - - 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: | @@ -355,10 +327,9 @@ jobs: - tpc-h - ffi runs-on: - - runs-on=${{ github.run_id }} + - runs-on=${{ github.run_id }}/image=vortex-ci - family=m7i+m7i-flex+m7a - cpu=16 - - image=ubuntu24-full-x64 - extras=s3-cache - tag=rust-coverage - tag=suite-${{ matrix.suite }} @@ -372,9 +343,6 @@ jobs: with: sccache: s3 - uses: actions/checkout@v6 - - uses: ./.github/actions/setup-rust - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Install grcov uses: taiki-e/install-action@grcov - name: Install nextest @@ -424,7 +392,6 @@ jobs: - runs-on=${{ github.run_id }} - family=m7i+m7i-flex+m7a - cpu=16 - - image=ubuntu24-full-x64 - extras=s3-cache - tag=rust-test-sanitizer env: @@ -531,10 +498,9 @@ jobs: build-java: name: "Java" runs-on: - - runs-on=${{ github.run_id }} + - runs-on=${{ github.run_id }}/image=vortex-ci - family=m7i+m7i-flex+m7a - cpu=16 - - image=ubuntu24-full-x64 - extras=s3-cache - tag=java timeout-minutes: 120 @@ -568,10 +534,9 @@ jobs: name: "Benchmark with Codspeed (Shard #${{ matrix.shard }})" timeout-minutes: 120 runs-on: - - runs-on=${{ github.run_id }} + - runs-on=${{ github.run_id }}/image=vortex-ci - family=c7i.8xlarge - extras=s3-cache - - image=ubuntu24-full-x64 - tag=bench-codspeed-${{ matrix.shard }} steps: - uses: runs-on/action@v2 @@ -615,10 +580,9 @@ jobs: name: "C++ build" timeout-minutes: 120 runs-on: - - runs-on=${{ github.run_id }} + - runs-on=${{ github.run_id }}/image=vortex-ci - family=m7i+m7i-flex+m7a - cpu=8 - - image=ubuntu24-full-x64 - extras=s3-cache - tag=cxx-build steps: From e7fb7ad8a6f0334e6d4a276a2967fcc5c5d30910 Mon Sep 17 00:00:00 2001 From: Andrew Duffy Date: Wed, 3 Dec 2025 11:54:55 -0500 Subject: [PATCH 2/7] fix config Signed-off-by: Andrew Duffy --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c80f4ffc2ec..499a9ab69c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -259,10 +259,10 @@ jobs: run: cargo clippy --locked --all-targets -- -D warnings rust-lint-no-default: - name: "Rust (lint, no default)"/image=vortex-ci + name: "Rust (lint, no default)" timeout-minutes: 120 runs-on: - - runs-on=${{ github.run_id }} + - runs-on=${{ github.run_id }}/image=vortex-ci - family=m7i+m7i-flex+m7a - cpu=16 - extras=s3-cache From c7c758d95902f76d0fa8a0aa221c0ea25383822f Mon Sep 17 00:00:00 2001 From: Andrew Duffy Date: Wed, 3 Dec 2025 12:00:48 -0500 Subject: [PATCH 3/7] use image Signed-off-by: Andrew Duffy --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 499a9ab69c1..2577d14535f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -389,7 +389,7 @@ jobs: name: "Rust tests (sanitizer)" timeout-minutes: 120 runs-on: - - runs-on=${{ github.run_id }} + - runs-on=${{ github.run_id }}/image=vortex-ci - family=m7i+m7i-flex+m7a - cpu=16 - extras=s3-cache From 2f264c116014c02a46cf7f6455e5325aa8824f5a Mon Sep 17 00:00:00 2001 From: Andrew Duffy Date: Thu, 4 Dec 2025 08:52:41 -0500 Subject: [PATCH 4/7] update name of image Signed-off-by: Andrew Duffy --- .github/workflows/ci.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2577d14535f..c83b97689b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: python-lint: name: "Python (lint)" runs-on: - - runs-on=${{ github.run_id }}/image=vortex-ci + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - family=m7i+m7i-flex+m7a - cpu=16 - extras=s3-cache @@ -71,7 +71,7 @@ jobs: python-test: name: "Python (test)" runs-on: - - runs-on=${{ github.run_id }}/image=vortex-ci + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - family=m7i+m7i-flex+m7a - cpu=16 - extras=s3-cache @@ -154,7 +154,7 @@ jobs: name: "Rust (docs)" timeout-minutes: 120 runs-on: - - runs-on=${{ github.run_id }}/image=vortex-ci + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - family=m7i+m7i-flex+m7a - cpu=8 - extras=s3-cache @@ -174,7 +174,7 @@ jobs: name: "Rust build (${{matrix.config.name}})" timeout-minutes: 120 runs-on: - - runs-on=${{ github.run_id }}/image=vortex-ci + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - family=m7i+m7i-flex+m7a - cpu=8 - extras=s3-cache @@ -220,7 +220,7 @@ jobs: name: "Check build with minimal dependencies" timeout-minutes: 120 runs-on: - - runs-on=${{ github.run_id }}/image=vortex-ci + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - family=m7i+m7i-flex+m7a - cpu=8 - extras=s3-cache @@ -237,7 +237,7 @@ jobs: name: "Rust (lint)" timeout-minutes: 120 runs-on: - - runs-on=${{ github.run_id }}/image=vortex-ci + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - family=m7i+m7i-flex+m7a - cpu=16 - extras=s3-cache @@ -262,7 +262,7 @@ jobs: name: "Rust (lint, no default)" timeout-minutes: 120 runs-on: - - runs-on=${{ github.run_id }}/image=vortex-ci + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - family=m7i+m7i-flex+m7a - cpu=16 - extras=s3-cache @@ -327,7 +327,7 @@ jobs: - tpc-h - ffi runs-on: - - runs-on=${{ github.run_id }}/image=vortex-ci + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - family=m7i+m7i-flex+m7a - cpu=16 - extras=s3-cache @@ -389,7 +389,7 @@ jobs: name: "Rust tests (sanitizer)" timeout-minutes: 120 runs-on: - - runs-on=${{ github.run_id }}/image=vortex-ci + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - family=m7i+m7i-flex+m7a - cpu=16 - extras=s3-cache @@ -498,7 +498,7 @@ jobs: build-java: name: "Java" runs-on: - - runs-on=${{ github.run_id }}/image=vortex-ci + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - family=m7i+m7i-flex+m7a - cpu=16 - extras=s3-cache @@ -534,7 +534,7 @@ jobs: name: "Benchmark with Codspeed (Shard #${{ matrix.shard }})" timeout-minutes: 120 runs-on: - - runs-on=${{ github.run_id }}/image=vortex-ci + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - family=c7i.8xlarge - extras=s3-cache - tag=bench-codspeed-${{ matrix.shard }} @@ -580,7 +580,7 @@ jobs: name: "C++ build" timeout-minutes: 120 runs-on: - - runs-on=${{ github.run_id }}/image=vortex-ci + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - family=m7i+m7i-flex+m7a - cpu=8 - extras=s3-cache From 0450222d8fa83c812769ccac49a4ef0567b72389 Mon Sep 17 00:00:00 2001 From: Andrew Duffy Date: Mon, 8 Dec 2025 09:07:49 -0500 Subject: [PATCH 5/7] more things Signed-off-by: Andrew Duffy --- .github/workflows/ci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c83b97689b3..edcae54c8cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -230,7 +230,6 @@ jobs: with: sccache: s3 - uses: actions/checkout@v6 - - uses: taiki-e/install-action@cargo-minimal-versions - run: cargo minimal-versions check --direct --workspace --ignore-private rust-lint: @@ -343,12 +342,6 @@ jobs: with: sccache: s3 - uses: actions/checkout@v6 - - 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: | @@ -363,8 +356,6 @@ jobs: run: | cargo build -p vortex-ffi cargo run -p vortex-ffi --example hello_vortex - - 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 \ From bf1ee09a419b9c0f8ee9eeeb078511708a3fdf3d Mon Sep 17 00:00:00 2001 From: Andrew Duffy Date: Mon, 8 Dec 2025 12:58:13 -0500 Subject: [PATCH 6/7] debug output Signed-off-by: Andrew Duffy --- .github/workflows/ci.yml | 1319 +++++++++++++++++++------------------- 1 file changed, 665 insertions(+), 654 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index edcae54c8cd..109b359528c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,658 +17,669 @@ env: RUST_BACKTRACE: 1 jobs: - lint-toml: - runs-on: ubuntu-latest - timeout-minutes: 120 + show-me-stuff: + name: "debug AMI issues" + runs-on: "runs-on=${{ github.run_id }}/image=vortex-ci-amd64" 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: - - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - - family=m7i+m7i-flex+m7a - - cpu=16 - - extras=s3-cache - - tag=python-lint - timeout-minutes: 120 - 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: 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 - run: uv run basedpyright vortex-python - - python-test: - name: "Python (test)" - runs-on: - - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - - family=m7i+m7i-flex+m7a - - cpu=16 - - extras=s3-cache - - tag=python-test - timeout-minutes: 120 - env: - RUST_LOG: "info,uv=debug" - 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: Install uv - uses: spiraldb/actions/.github/actions/setup-uv@0.18.5 - with: - sync: false - prune-cache: false - - - 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 - - uses: ./.github/actions/setup-rust - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - 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 pip install "maturin[zig]" - uv tool run maturin build --interpreter python3.11 --zig - uv tool run maturin 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: - - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - - family=m7i+m7i-flex+m7a - - cpu=8 - - extras=s3-cache - - tag=rust-docs - steps: - - uses: runs-on/action@v2 - with: - sccache: s3 - - uses: actions/checkout@v6 - - 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: - - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - - family=m7i+m7i-flex+m7a - - cpu=8 - - extras=s3-cache - - tag=${{ matrix.config.name }} - 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" - command: "build" - args: "--all-features --all-targets" - - name: "default features" - command: "build" - args: "--all-targets" - - name: "with tokio dispatcher" - command: "build" - args: "--no-default-features --features tokio --all-targets --ignore-unknown-features" - - name: "wasm32 with default features" - command: "build" - target: wasm32-unknown-unknown - env: - rustflags: "RUSTFLAGS='-A warnings --cfg getrandom_backend=\"wasm_js\"'" - args: "--target wasm32-unknown-unknown --exclude vortex --exclude vortex-datafusion --exclude vortex-duckdb --exclude vortex-tui --exclude vortex-zstd" - steps: - - uses: runs-on/action@v2 - with: - sccache: s3 - - uses: actions/checkout@v6 - - name: Install wasm32 target - if: ${{ matrix.config.target == 'wasm32-unknown-unknown' }} - run: rustup target add wasm32-unknown-unknown - - name: Rust Build (${{matrix.config.name}}) - run: ${{matrix.config.env.rustflags}} cargo hack ${{matrix.config.command}} --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: - - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - - family=m7i+m7i-flex+m7a - - cpu=8 - - extras=s3-cache - - tag=rust-min-deps - steps: - - uses: runs-on/action@v2 - with: - sccache: s3 - - uses: actions/checkout@v6 - - run: cargo minimal-versions check --direct --workspace --ignore-private - - rust-lint: - name: "Rust (lint)" - timeout-minutes: 120 - runs-on: - - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - - family=m7i+m7i-flex+m7a - - cpu=16 - - extras=s3-cache - - tag=rust-lint - steps: - - uses: runs-on/action@v2 - with: - sccache: s3 - - uses: actions/checkout@v6 - - name: Rust Lint - Format - run: cargo +nightly 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 - - rust-lint-no-default: - name: "Rust (lint, no default)" - timeout-minutes: 120 - runs-on: - - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - - family=m7i+m7i-flex+m7a - - cpu=16 - - extras=s3-cache - - tag=rust-lint-no-default - steps: - - uses: runs-on/action@v2 - with: - sccache: s3 - - uses: actions/checkout@v6 - - name: Rust Lint - Clippy No Default Features - shell: bash - run: | - # https://spiraldb.slack.com/archives/C07BV3GKAJ2/p1732736281946729 - cargo hack clippy --no-default-features -- -D warnings - - rust-semver: - name: "Rust (semver checks)" - timeout-minutes: 120 - if: github.ref != 'refs/heads/develop' - runs-on: - - runs-on=${{ github.run_id }} - - family=m7i+m7i-flex+m7a - - cpu=16 - - image=ubuntu24-full-x64 - - extras=s3-cache - - tag=rust-semver - steps: - - uses: runs-on/action@v2 - with: - sccache: s3 - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - fetch-tags: true - - uses: ./.github/actions/setup-rust - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - # We have to set the correct Cargo.toml versions so semver checks uses the previous release. - - name: Latest Tag - id: latest-tag - run: | - LATEST_TAG=$(git describe --tags --abbrev=0) - echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT - - name: Cargo Set Version - run: | - cargo install cargo-edit - cargo set-version --workspace ${{ steps.latest-tag.outputs.tag }} - - - name: Check semver - uses: obi1kenobi/cargo-semver-checks-action@v2 - - rust-coverage: - name: "Rust tests (coverage)" - timeout-minutes: 120 - permissions: - id-token: write - strategy: - matrix: - suite: - - tests - - tpc-h - - ffi - runs-on: - - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - - family=m7i+m7i-flex+m7a - - cpu=16 - - extras=s3-cache - - tag=rust-coverage - - tag=suite-${{ matrix.suite }} - 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 - with: - sccache: s3 - - uses: actions/checkout@v6 - - name: Rust Tests - if: ${{ matrix.suite == 'tests' }} - run: | - cargo +nightly nextest run --locked --workspace --all-features --no-fail-fast - - name: Run TPC-H - if: ${{ matrix.suite == 'tpc-h' }} - # We use i2 to ensure that restarting the duckdb connection succeeds - run: | - cargo run --bin query_bench -- tpch -i2 --targets "datafusion:vortex,datafusion:vortex-compact,duckdb:vortex,duckdb:vortex-compact" --scale-factor 0.1 - - name: Run FFI Example - if: ${{ matrix.suite == 'ffi' }} - run: | - cargo build -p vortex-ffi - cargo run -p vortex-ffi --example hello_vortex - - name: Generate coverage report - run: | - grcov . --binary-path target/debug/ -s . -t lcov --llvm --ignore-not-existing \ - --threads $(nproc) \ - --ignore '../*' --ignore '/*' --ignore 'fuzz/*' --ignore 'bench-vortex/*' \ - --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 'vortex-gpu/*' \ - -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: - - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - - family=m7i+m7i-flex+m7a - - cpu=16 - - extras=s3-cache - - tag=rust-test-sanitizer - env: - # Add debug symbols and enable ASAN/LSAN with better output - RUSTFLAGS: "-A warnings -Zsanitizer=address -Zsanitizer=leak --cfg disable_loom -C debuginfo=2 -C opt-level=0 -C strip=none" - 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" - steps: - - uses: runs-on/action@v2 - with: - sccache: s3 - - uses: actions/checkout@v6 - - name: Install llvm - uses: aminya/setup-cpp@v1 - with: - compiler: llvm - cache-tools: true - - uses: ./.github/actions/setup-rust - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - toolchain: nightly - components: "rust-src, rustfmt, clippy, llvm-tools-preview" - cache-suffix: "sanitizer" - - 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 - run: | - # Build with full debug info first (helps with caching) - cargo +nightly build --locked --workspace --all-features --target x86_64-unknown-linux-gnu - # Run tests with sanitizers and debug output - cargo +nightly nextest run \ - --locked \ - --workspace \ - --all-features \ - --no-fail-fast \ - --target x86_64-unknown-linux-gnu \ - --verbose - - 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 }} - - family=m7i - - cpu=8 - - image=windows22-full-x64 - - tag=rust-test-windows - - os: linux-arm64 - runner: - - runs-on=${{ github.run_id }} - - family=m7g - - cpu=8 - - image=ubuntu24-full-arm64 - - extras=s3-cache - - tag=rust-test-linux-arm64 - runs-on: ${{ matrix.runner }} - steps: - - uses: runs-on/action@v2 - if: matrix.os == 'linux-arm64' - with: - sccache: s3 - - uses: actions/checkout@v5 - - name: Install Visual Studio Build Tools (Windows) - if: matrix.os == 'windows-x64' - shell: bash - run: | - choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --passive" -y - - name: Setup Python (Windows) - if: matrix.os == 'windows-x64' - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - 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 bench-vortex --exclude vortex-python --exclude vortex-duckdb --exclude vortex-fuzz - - name: Rust Tests (Other) - if: matrix.os != 'windows-x64' - run: cargo nextest run --locked --workspace --all-features --no-fail-fast --exclude bench-vortex --exclude vortex-duckdb - - build-java: - name: "Java" - runs-on: - - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - - family=m7i+m7i-flex+m7a - - cpu=16 - - extras=s3-cache - - tag=java - timeout-minutes: 120 - steps: - - uses: runs-on/action@v2 - 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-dtype vortex-error" } - - { shard: 2, name: "Array types", packages: "vortex-array vortex-scalar vortex-vector", features: "--features test-harness" } - - { shard: 3, name: "Main library", packages: "vortex vortex-compute" } - - { 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: - - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - - family=c7i.8xlarge - - extras=s3-cache - - tag=bench-codspeed-${{ matrix.shard }} - 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: Install Codspeed - run: cargo install --force cargo-codspeed --locked - - 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@346a2d8a8d9d38909abd0bc3d23f773110f076ad - 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: - - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 - - family=m7i+m7i-flex+m7a - - cpu=8 - - extras=s3-cache - - tag=cxx-build - steps: - - uses: actions/checkout@v6 - - uses: ./.github/actions/setup-rust - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Build and run C++ unit tests - working-directory: vortex-cxx/ - run: | - mkdir -p build - cd build - cmake -DVORTEX_ENABLE_TESTING=ON -DVORTEX_ENABLE_ASAN=ON .. - cmake --build . --parallel $(nproc) - ctest -V - - name: Build and run the example in release mode - working-directory: vortex-cxx/examples - run: | - mkdir -p build - cd build - cmake -DCMAKE_BUILD_TYPE=Release .. - cmake --build . --parallel $(nproc) - ./hello-vortex ../goldenfiles/example.vortex - - 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 }} - toolchain: nightly-2025-06-26 - targets: "wasm32-wasip1" - components: "rust-src" - - name: Setup Wasmer - uses: wasmerio/setup-wasmer@v3.1 - # there is a compiler bug in nightly (but not in nightly-2025-06-26) - - run: cargo +nightly-2025-06-26 -Zbuild-std=panic_abort,std 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" - RUST_BACKTRACE: full - steps: - - uses: actions/checkout@v6 - - uses: ./.github/actions/setup-rust - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - toolchain: nightly - components: "rust-src, rustfmt, clippy, miri" - - uses: taiki-e/install-action@v2 - with: - tool: nextest - - name: Run Miri - run: cargo +nightly 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 }} - toolchain: nightly - - 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 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/{} + - run: | + echo "path = $PATH" + ls -l $HOME/.cargo/bin + cargo hack --help + which sccache + +# 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: +# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 +# - family=m7i+m7i-flex+m7a +# - cpu=16 +# - extras=s3-cache +# - tag=python-lint +# timeout-minutes: 120 +# 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: 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 +# run: uv run basedpyright vortex-python +# +# python-test: +# name: "Python (test)" +# runs-on: +# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 +# - family=m7i+m7i-flex+m7a +# - cpu=16 +# - extras=s3-cache +# - tag=python-test +# timeout-minutes: 120 +# env: +# RUST_LOG: "info,uv=debug" +# 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: Install uv +# uses: spiraldb/actions/.github/actions/setup-uv@0.18.5 +# with: +# sync: false +# prune-cache: false +# +# - 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 +# - uses: ./.github/actions/setup-rust +# with: +# repo-token: ${{ secrets.GITHUB_TOKEN }} +# - 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 pip install "maturin[zig]" +# uv tool run maturin build --interpreter python3.11 --zig +# uv tool run maturin 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: +# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 +# - family=m7i+m7i-flex+m7a +# - cpu=8 +# - extras=s3-cache +# - tag=rust-docs +# steps: +# - uses: runs-on/action@v2 +# with: +# sccache: s3 +# - uses: actions/checkout@v6 +# - 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: +# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 +# - family=m7i+m7i-flex+m7a +# - cpu=8 +# - extras=s3-cache +# - tag=${{ matrix.config.name }} +# 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" +# command: "build" +# args: "--all-features --all-targets" +# - name: "default features" +# command: "build" +# args: "--all-targets" +# - name: "with tokio dispatcher" +# command: "build" +# args: "--no-default-features --features tokio --all-targets --ignore-unknown-features" +# - name: "wasm32 with default features" +# command: "build" +# target: wasm32-unknown-unknown +# env: +# rustflags: "RUSTFLAGS='-A warnings --cfg getrandom_backend=\"wasm_js\"'" +# args: "--target wasm32-unknown-unknown --exclude vortex --exclude vortex-datafusion --exclude vortex-duckdb --exclude vortex-tui --exclude vortex-zstd" +# steps: +# - uses: runs-on/action@v2 +# with: +# sccache: s3 +# - uses: actions/checkout@v6 +# - name: Install wasm32 target +# if: ${{ matrix.config.target == 'wasm32-unknown-unknown' }} +# run: rustup target add wasm32-unknown-unknown +# - name: Rust Build (${{matrix.config.name}}) +# run: ${{matrix.config.env.rustflags}} cargo hack ${{matrix.config.command}} --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: +# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 +# - family=m7i+m7i-flex+m7a +# - cpu=8 +# - extras=s3-cache +# - tag=rust-min-deps +# steps: +# - uses: runs-on/action@v2 +# with: +# sccache: s3 +# - uses: actions/checkout@v6 +# - run: cargo minimal-versions check --direct --workspace --ignore-private +# +# rust-lint: +# name: "Rust (lint)" +# timeout-minutes: 120 +# runs-on: +# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 +# - family=m7i+m7i-flex+m7a +# - cpu=16 +# - extras=s3-cache +# - tag=rust-lint +# steps: +# - uses: runs-on/action@v2 +# with: +# sccache: s3 +# - uses: actions/checkout@v6 +# - name: Rust Lint - Format +# run: cargo +nightly 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 +# +# +# rust-lint-no-default: +# name: "Rust (lint, no default)" +# timeout-minutes: 120 +# runs-on: +# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 +# - family=m7i+m7i-flex+m7a +# - cpu=16 +# - extras=s3-cache +# - tag=rust-lint-no-default +# steps: +# - uses: runs-on/action@v2 +# with: +# sccache: s3 +# - uses: actions/checkout@v6 +# - name: Rust Lint - Clippy No Default Features +# shell: bash +# run: | +# # https://spiraldb.slack.com/archives/C07BV3GKAJ2/p1732736281946729 +# cargo hack clippy --no-default-features -- -D warnings +# +# rust-semver: +# name: "Rust (semver checks)" +# timeout-minutes: 120 +# if: github.ref != 'refs/heads/develop' +# runs-on: +# - runs-on=${{ github.run_id }} +# - family=m7i+m7i-flex+m7a +# - cpu=16 +# - image=ubuntu24-full-x64 +# - extras=s3-cache +# - tag=rust-semver +# steps: +# - uses: runs-on/action@v2 +# with: +# sccache: s3 +# - uses: actions/checkout@v6 +# with: +# fetch-depth: 0 +# fetch-tags: true +# - uses: ./.github/actions/setup-rust +# with: +# repo-token: ${{ secrets.GITHUB_TOKEN }} +# +# # We have to set the correct Cargo.toml versions so semver checks uses the previous release. +# - name: Latest Tag +# id: latest-tag +# run: | +# LATEST_TAG=$(git describe --tags --abbrev=0) +# echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT +# - name: Cargo Set Version +# run: | +# cargo install cargo-edit +# cargo set-version --workspace ${{ steps.latest-tag.outputs.tag }} +# +# - name: Check semver +# uses: obi1kenobi/cargo-semver-checks-action@v2 +# +# rust-coverage: +# name: "Rust tests (coverage)" +# timeout-minutes: 120 +# permissions: +# id-token: write +# strategy: +# matrix: +# suite: +# - tests +# - tpc-h +# - ffi +# runs-on: +# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 +# - family=m7i+m7i-flex+m7a +# - cpu=16 +# - extras=s3-cache +# - tag=rust-coverage +# - tag=suite-${{ matrix.suite }} +# 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 +# with: +# sccache: s3 +# - uses: actions/checkout@v6 +# - name: Rust Tests +# if: ${{ matrix.suite == 'tests' }} +# run: | +# cargo +nightly nextest run --locked --workspace --all-features --no-fail-fast +# - name: Run TPC-H +# if: ${{ matrix.suite == 'tpc-h' }} +# # We use i2 to ensure that restarting the duckdb connection succeeds +# run: | +# cargo run --bin query_bench -- tpch -i2 --targets "datafusion:vortex,datafusion:vortex-compact,duckdb:vortex,duckdb:vortex-compact" --scale-factor 0.1 +# - name: Run FFI Example +# if: ${{ matrix.suite == 'ffi' }} +# run: | +# cargo build -p vortex-ffi +# cargo run -p vortex-ffi --example hello_vortex +# - name: Generate coverage report +# run: | +# grcov . --binary-path target/debug/ -s . -t lcov --llvm --ignore-not-existing \ +# --threads $(nproc) \ +# --ignore '../*' --ignore '/*' --ignore 'fuzz/*' --ignore 'bench-vortex/*' \ +# --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 'vortex-gpu/*' \ +# -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: +# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 +# - family=m7i+m7i-flex+m7a +# - cpu=16 +# - extras=s3-cache +# - tag=rust-test-sanitizer +# env: +# # Add debug symbols and enable ASAN/LSAN with better output +# RUSTFLAGS: "-A warnings -Zsanitizer=address -Zsanitizer=leak --cfg disable_loom -C debuginfo=2 -C opt-level=0 -C strip=none" +# 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" +# steps: +# - uses: runs-on/action@v2 +# with: +# sccache: s3 +# - uses: actions/checkout@v6 +# - name: Install llvm +# uses: aminya/setup-cpp@v1 +# with: +# compiler: llvm +# cache-tools: true +# - uses: ./.github/actions/setup-rust +# with: +# repo-token: ${{ secrets.GITHUB_TOKEN }} +# toolchain: nightly +# components: "rust-src, rustfmt, clippy, llvm-tools-preview" +# cache-suffix: "sanitizer" +# - 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 +# run: | +# # Build with full debug info first (helps with caching) +# cargo +nightly build --locked --workspace --all-features --target x86_64-unknown-linux-gnu +# # Run tests with sanitizers and debug output +# cargo +nightly nextest run \ +# --locked \ +# --workspace \ +# --all-features \ +# --no-fail-fast \ +# --target x86_64-unknown-linux-gnu \ +# --verbose +# +# 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 }} +# - family=m7i +# - cpu=8 +# - image=windows22-full-x64 +# - tag=rust-test-windows +# - os: linux-arm64 +# runner: +# - runs-on=${{ github.run_id }} +# - family=m7g +# - cpu=8 +# - image=ubuntu24-full-arm64 +# - extras=s3-cache +# - tag=rust-test-linux-arm64 +# runs-on: ${{ matrix.runner }} +# steps: +# - uses: runs-on/action@v2 +# if: matrix.os == 'linux-arm64' +# with: +# sccache: s3 +# - uses: actions/checkout@v5 +# - name: Install Visual Studio Build Tools (Windows) +# if: matrix.os == 'windows-x64' +# shell: bash +# run: | +# choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --passive" -y +# - name: Setup Python (Windows) +# if: matrix.os == 'windows-x64' +# uses: actions/setup-python@v5 +# with: +# python-version: "3.11" +# - 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 bench-vortex --exclude vortex-python --exclude vortex-duckdb --exclude vortex-fuzz +# - name: Rust Tests (Other) +# if: matrix.os != 'windows-x64' +# run: cargo nextest run --locked --workspace --all-features --no-fail-fast --exclude bench-vortex --exclude vortex-duckdb +# +# build-java: +# name: "Java" +# runs-on: +# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 +# - family=m7i+m7i-flex+m7a +# - cpu=16 +# - extras=s3-cache +# - tag=java +# timeout-minutes: 120 +# steps: +# - uses: runs-on/action@v2 +# 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-dtype vortex-error" } +# - { shard: 2, name: "Array types", packages: "vortex-array vortex-scalar vortex-vector", features: "--features test-harness" } +# - { shard: 3, name: "Main library", packages: "vortex vortex-compute" } +# - { 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: +# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 +# - family=c7i.8xlarge +# - extras=s3-cache +# - tag=bench-codspeed-${{ matrix.shard }} +# 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: Install Codspeed +# run: cargo install --force cargo-codspeed --locked +# - 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@346a2d8a8d9d38909abd0bc3d23f773110f076ad +# 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: +# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 +# - family=m7i+m7i-flex+m7a +# - cpu=8 +# - extras=s3-cache +# - tag=cxx-build +# steps: +# - uses: actions/checkout@v6 +# - uses: ./.github/actions/setup-rust +# with: +# repo-token: ${{ secrets.GITHUB_TOKEN }} +# - name: Build and run C++ unit tests +# working-directory: vortex-cxx/ +# run: | +# mkdir -p build +# cd build +# cmake -DVORTEX_ENABLE_TESTING=ON -DVORTEX_ENABLE_ASAN=ON .. +# cmake --build . --parallel $(nproc) +# ctest -V +# - name: Build and run the example in release mode +# working-directory: vortex-cxx/examples +# run: | +# mkdir -p build +# cd build +# cmake -DCMAKE_BUILD_TYPE=Release .. +# cmake --build . --parallel $(nproc) +# ./hello-vortex ../goldenfiles/example.vortex +# +# 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 }} +# toolchain: nightly-2025-06-26 +# targets: "wasm32-wasip1" +# components: "rust-src" +# - name: Setup Wasmer +# uses: wasmerio/setup-wasmer@v3.1 +# # there is a compiler bug in nightly (but not in nightly-2025-06-26) +# - run: cargo +nightly-2025-06-26 -Zbuild-std=panic_abort,std 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" +# RUST_BACKTRACE: full +# steps: +# - uses: actions/checkout@v6 +# - uses: ./.github/actions/setup-rust +# with: +# repo-token: ${{ secrets.GITHUB_TOKEN }} +# toolchain: nightly +# components: "rust-src, rustfmt, clippy, miri" +# - uses: taiki-e/install-action@v2 +# with: +# tool: nextest +# - name: Run Miri +# run: cargo +nightly 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 }} +# toolchain: nightly +# - 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 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/{} From 55d1f0c94efc11cf41647f5e03e44421b778582a Mon Sep 17 00:00:00 2001 From: Andrew Duffy Date: Mon, 8 Dec 2025 17:02:58 -0500 Subject: [PATCH 7/7] bring back the workflow Signed-off-by: Andrew Duffy --- .github/workflows/ci.yml | 1320 +++++++++++++++++++------------------- 1 file changed, 655 insertions(+), 665 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 109b359528c..3a9044d3af7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,669 +17,659 @@ env: RUST_BACKTRACE: 1 jobs: - show-me-stuff: - name: "debug AMI issues" - runs-on: "runs-on=${{ github.run_id }}/image=vortex-ci-amd64" + lint-toml: + runs-on: ubuntu-latest + timeout-minutes: 120 steps: - - run: | - echo "path = $PATH" - ls -l $HOME/.cargo/bin - cargo hack --help - which sccache - -# 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: -# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 -# - family=m7i+m7i-flex+m7a -# - cpu=16 -# - extras=s3-cache -# - tag=python-lint -# timeout-minutes: 120 -# 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: 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 -# run: uv run basedpyright vortex-python -# -# python-test: -# name: "Python (test)" -# runs-on: -# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 -# - family=m7i+m7i-flex+m7a -# - cpu=16 -# - extras=s3-cache -# - tag=python-test -# timeout-minutes: 120 -# env: -# RUST_LOG: "info,uv=debug" -# 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: Install uv -# uses: spiraldb/actions/.github/actions/setup-uv@0.18.5 -# with: -# sync: false -# prune-cache: false -# -# - 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 -# - uses: ./.github/actions/setup-rust -# with: -# repo-token: ${{ secrets.GITHUB_TOKEN }} -# - 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 pip install "maturin[zig]" -# uv tool run maturin build --interpreter python3.11 --zig -# uv tool run maturin 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: -# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 -# - family=m7i+m7i-flex+m7a -# - cpu=8 -# - extras=s3-cache -# - tag=rust-docs -# steps: -# - uses: runs-on/action@v2 -# with: -# sccache: s3 -# - uses: actions/checkout@v6 -# - 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: -# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 -# - family=m7i+m7i-flex+m7a -# - cpu=8 -# - extras=s3-cache -# - tag=${{ matrix.config.name }} -# 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" -# command: "build" -# args: "--all-features --all-targets" -# - name: "default features" -# command: "build" -# args: "--all-targets" -# - name: "with tokio dispatcher" -# command: "build" -# args: "--no-default-features --features tokio --all-targets --ignore-unknown-features" -# - name: "wasm32 with default features" -# command: "build" -# target: wasm32-unknown-unknown -# env: -# rustflags: "RUSTFLAGS='-A warnings --cfg getrandom_backend=\"wasm_js\"'" -# args: "--target wasm32-unknown-unknown --exclude vortex --exclude vortex-datafusion --exclude vortex-duckdb --exclude vortex-tui --exclude vortex-zstd" -# steps: -# - uses: runs-on/action@v2 -# with: -# sccache: s3 -# - uses: actions/checkout@v6 -# - name: Install wasm32 target -# if: ${{ matrix.config.target == 'wasm32-unknown-unknown' }} -# run: rustup target add wasm32-unknown-unknown -# - name: Rust Build (${{matrix.config.name}}) -# run: ${{matrix.config.env.rustflags}} cargo hack ${{matrix.config.command}} --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: -# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 -# - family=m7i+m7i-flex+m7a -# - cpu=8 -# - extras=s3-cache -# - tag=rust-min-deps -# steps: -# - uses: runs-on/action@v2 -# with: -# sccache: s3 -# - uses: actions/checkout@v6 -# - run: cargo minimal-versions check --direct --workspace --ignore-private -# -# rust-lint: -# name: "Rust (lint)" -# timeout-minutes: 120 -# runs-on: -# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 -# - family=m7i+m7i-flex+m7a -# - cpu=16 -# - extras=s3-cache -# - tag=rust-lint -# steps: -# - uses: runs-on/action@v2 -# with: -# sccache: s3 -# - uses: actions/checkout@v6 -# - name: Rust Lint - Format -# run: cargo +nightly 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 -# -# -# rust-lint-no-default: -# name: "Rust (lint, no default)" -# timeout-minutes: 120 -# runs-on: -# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 -# - family=m7i+m7i-flex+m7a -# - cpu=16 -# - extras=s3-cache -# - tag=rust-lint-no-default -# steps: -# - uses: runs-on/action@v2 -# with: -# sccache: s3 -# - uses: actions/checkout@v6 -# - name: Rust Lint - Clippy No Default Features -# shell: bash -# run: | -# # https://spiraldb.slack.com/archives/C07BV3GKAJ2/p1732736281946729 -# cargo hack clippy --no-default-features -- -D warnings -# -# rust-semver: -# name: "Rust (semver checks)" -# timeout-minutes: 120 -# if: github.ref != 'refs/heads/develop' -# runs-on: -# - runs-on=${{ github.run_id }} -# - family=m7i+m7i-flex+m7a -# - cpu=16 -# - image=ubuntu24-full-x64 -# - extras=s3-cache -# - tag=rust-semver -# steps: -# - uses: runs-on/action@v2 -# with: -# sccache: s3 -# - uses: actions/checkout@v6 -# with: -# fetch-depth: 0 -# fetch-tags: true -# - uses: ./.github/actions/setup-rust -# with: -# repo-token: ${{ secrets.GITHUB_TOKEN }} -# -# # We have to set the correct Cargo.toml versions so semver checks uses the previous release. -# - name: Latest Tag -# id: latest-tag -# run: | -# LATEST_TAG=$(git describe --tags --abbrev=0) -# echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT -# - name: Cargo Set Version -# run: | -# cargo install cargo-edit -# cargo set-version --workspace ${{ steps.latest-tag.outputs.tag }} -# -# - name: Check semver -# uses: obi1kenobi/cargo-semver-checks-action@v2 -# -# rust-coverage: -# name: "Rust tests (coverage)" -# timeout-minutes: 120 -# permissions: -# id-token: write -# strategy: -# matrix: -# suite: -# - tests -# - tpc-h -# - ffi -# runs-on: -# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 -# - family=m7i+m7i-flex+m7a -# - cpu=16 -# - extras=s3-cache -# - tag=rust-coverage -# - tag=suite-${{ matrix.suite }} -# 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 -# with: -# sccache: s3 -# - uses: actions/checkout@v6 -# - name: Rust Tests -# if: ${{ matrix.suite == 'tests' }} -# run: | -# cargo +nightly nextest run --locked --workspace --all-features --no-fail-fast -# - name: Run TPC-H -# if: ${{ matrix.suite == 'tpc-h' }} -# # We use i2 to ensure that restarting the duckdb connection succeeds -# run: | -# cargo run --bin query_bench -- tpch -i2 --targets "datafusion:vortex,datafusion:vortex-compact,duckdb:vortex,duckdb:vortex-compact" --scale-factor 0.1 -# - name: Run FFI Example -# if: ${{ matrix.suite == 'ffi' }} -# run: | -# cargo build -p vortex-ffi -# cargo run -p vortex-ffi --example hello_vortex -# - name: Generate coverage report -# run: | -# grcov . --binary-path target/debug/ -s . -t lcov --llvm --ignore-not-existing \ -# --threads $(nproc) \ -# --ignore '../*' --ignore '/*' --ignore 'fuzz/*' --ignore 'bench-vortex/*' \ -# --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 'vortex-gpu/*' \ -# -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: -# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 -# - family=m7i+m7i-flex+m7a -# - cpu=16 -# - extras=s3-cache -# - tag=rust-test-sanitizer -# env: -# # Add debug symbols and enable ASAN/LSAN with better output -# RUSTFLAGS: "-A warnings -Zsanitizer=address -Zsanitizer=leak --cfg disable_loom -C debuginfo=2 -C opt-level=0 -C strip=none" -# 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" -# steps: -# - uses: runs-on/action@v2 -# with: -# sccache: s3 -# - uses: actions/checkout@v6 -# - name: Install llvm -# uses: aminya/setup-cpp@v1 -# with: -# compiler: llvm -# cache-tools: true -# - uses: ./.github/actions/setup-rust -# with: -# repo-token: ${{ secrets.GITHUB_TOKEN }} -# toolchain: nightly -# components: "rust-src, rustfmt, clippy, llvm-tools-preview" -# cache-suffix: "sanitizer" -# - 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 -# run: | -# # Build with full debug info first (helps with caching) -# cargo +nightly build --locked --workspace --all-features --target x86_64-unknown-linux-gnu -# # Run tests with sanitizers and debug output -# cargo +nightly nextest run \ -# --locked \ -# --workspace \ -# --all-features \ -# --no-fail-fast \ -# --target x86_64-unknown-linux-gnu \ -# --verbose -# -# 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 }} -# - family=m7i -# - cpu=8 -# - image=windows22-full-x64 -# - tag=rust-test-windows -# - os: linux-arm64 -# runner: -# - runs-on=${{ github.run_id }} -# - family=m7g -# - cpu=8 -# - image=ubuntu24-full-arm64 -# - extras=s3-cache -# - tag=rust-test-linux-arm64 -# runs-on: ${{ matrix.runner }} -# steps: -# - uses: runs-on/action@v2 -# if: matrix.os == 'linux-arm64' -# with: -# sccache: s3 -# - uses: actions/checkout@v5 -# - name: Install Visual Studio Build Tools (Windows) -# if: matrix.os == 'windows-x64' -# shell: bash -# run: | -# choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --passive" -y -# - name: Setup Python (Windows) -# if: matrix.os == 'windows-x64' -# uses: actions/setup-python@v5 -# with: -# python-version: "3.11" -# - 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 bench-vortex --exclude vortex-python --exclude vortex-duckdb --exclude vortex-fuzz -# - name: Rust Tests (Other) -# if: matrix.os != 'windows-x64' -# run: cargo nextest run --locked --workspace --all-features --no-fail-fast --exclude bench-vortex --exclude vortex-duckdb -# -# build-java: -# name: "Java" -# runs-on: -# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 -# - family=m7i+m7i-flex+m7a -# - cpu=16 -# - extras=s3-cache -# - tag=java -# timeout-minutes: 120 -# steps: -# - uses: runs-on/action@v2 -# 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-dtype vortex-error" } -# - { shard: 2, name: "Array types", packages: "vortex-array vortex-scalar vortex-vector", features: "--features test-harness" } -# - { shard: 3, name: "Main library", packages: "vortex vortex-compute" } -# - { 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: -# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 -# - family=c7i.8xlarge -# - extras=s3-cache -# - tag=bench-codspeed-${{ matrix.shard }} -# 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: Install Codspeed -# run: cargo install --force cargo-codspeed --locked -# - 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@346a2d8a8d9d38909abd0bc3d23f773110f076ad -# 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: -# - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 -# - family=m7i+m7i-flex+m7a -# - cpu=8 -# - extras=s3-cache -# - tag=cxx-build -# steps: -# - uses: actions/checkout@v6 -# - uses: ./.github/actions/setup-rust -# with: -# repo-token: ${{ secrets.GITHUB_TOKEN }} -# - name: Build and run C++ unit tests -# working-directory: vortex-cxx/ -# run: | -# mkdir -p build -# cd build -# cmake -DVORTEX_ENABLE_TESTING=ON -DVORTEX_ENABLE_ASAN=ON .. -# cmake --build . --parallel $(nproc) -# ctest -V -# - name: Build and run the example in release mode -# working-directory: vortex-cxx/examples -# run: | -# mkdir -p build -# cd build -# cmake -DCMAKE_BUILD_TYPE=Release .. -# cmake --build . --parallel $(nproc) -# ./hello-vortex ../goldenfiles/example.vortex -# -# 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 }} -# toolchain: nightly-2025-06-26 -# targets: "wasm32-wasip1" -# components: "rust-src" -# - name: Setup Wasmer -# uses: wasmerio/setup-wasmer@v3.1 -# # there is a compiler bug in nightly (but not in nightly-2025-06-26) -# - run: cargo +nightly-2025-06-26 -Zbuild-std=panic_abort,std 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" -# RUST_BACKTRACE: full -# steps: -# - uses: actions/checkout@v6 -# - uses: ./.github/actions/setup-rust -# with: -# repo-token: ${{ secrets.GITHUB_TOKEN }} -# toolchain: nightly -# components: "rust-src, rustfmt, clippy, miri" -# - uses: taiki-e/install-action@v2 -# with: -# tool: nextest -# - name: Run Miri -# run: cargo +nightly 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 }} -# toolchain: nightly -# - 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 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/{} + - 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: + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 + - family=m7i+m7i-flex+m7a + - cpu=16 + - extras=s3-cache + - tag=python-lint + timeout-minutes: 120 + 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: 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 + run: uv run basedpyright vortex-python + + python-test: + name: "Python (test)" + runs-on: + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 + - family=m7i+m7i-flex+m7a + - cpu=16 + - extras=s3-cache + - tag=python-test + timeout-minutes: 120 + env: + RUST_LOG: "info,uv=debug" + 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: Install uv + uses: spiraldb/actions/.github/actions/setup-uv@0.18.5 + with: + sync: false + prune-cache: false + + - 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 + - uses: ./.github/actions/setup-rust + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - 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 pip install "maturin[zig]" + uv tool run maturin build --interpreter python3.11 --zig + uv tool run maturin 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: + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 + - family=m7i+m7i-flex+m7a + - cpu=8 + - extras=s3-cache + - tag=rust-docs + steps: + - uses: runs-on/action@v2 + with: + sccache: s3 + - uses: actions/checkout@v6 + - 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: + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 + - family=m7i+m7i-flex+m7a + - cpu=8 + - extras=s3-cache + - tag=${{ matrix.config.name }} + 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" + command: "build" + args: "--all-features --all-targets" + - name: "default features" + command: "build" + args: "--all-targets" + - name: "with tokio dispatcher" + command: "build" + args: "--no-default-features --features tokio --all-targets --ignore-unknown-features" + - name: "wasm32 with default features" + command: "build" + target: wasm32-unknown-unknown + env: + rustflags: "RUSTFLAGS='-A warnings --cfg getrandom_backend=\"wasm_js\"'" + args: "--target wasm32-unknown-unknown --exclude vortex --exclude vortex-datafusion --exclude vortex-duckdb --exclude vortex-tui --exclude vortex-zstd" + steps: + - uses: runs-on/action@v2 + with: + sccache: s3 + - uses: actions/checkout@v6 + - name: Install wasm32 target + if: ${{ matrix.config.target == 'wasm32-unknown-unknown' }} + run: rustup target add wasm32-unknown-unknown + - name: Rust Build (${{matrix.config.name}}) + run: ${{matrix.config.env.rustflags}} cargo hack ${{matrix.config.command}} --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: + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 + - family=m7i+m7i-flex+m7a + - cpu=8 + - extras=s3-cache + - tag=rust-min-deps + steps: + - uses: runs-on/action@v2 + with: + sccache: s3 + - uses: actions/checkout@v6 + - run: cargo minimal-versions check --direct --workspace --ignore-private + + rust-lint: + name: "Rust (lint)" + timeout-minutes: 120 + runs-on: + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 + - family=m7i+m7i-flex+m7a + - cpu=16 + - extras=s3-cache + - tag=rust-lint + steps: + - uses: runs-on/action@v2 + with: + sccache: s3 + - uses: actions/checkout@v6 + - name: Rust Lint - Format + run: cargo +nightly 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 + + + rust-lint-no-default: + name: "Rust (lint, no default)" + timeout-minutes: 120 + runs-on: + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 + - family=m7i+m7i-flex+m7a + - cpu=16 + - extras=s3-cache + - tag=rust-lint-no-default + steps: + - uses: runs-on/action@v2 + with: + sccache: s3 + - uses: actions/checkout@v6 + - name: Rust Lint - Clippy No Default Features + shell: bash + run: | + # https://spiraldb.slack.com/archives/C07BV3GKAJ2/p1732736281946729 + cargo hack clippy --no-default-features -- -D warnings + + rust-semver: + name: "Rust (semver checks)" + timeout-minutes: 120 + if: github.ref != 'refs/heads/develop' + runs-on: + - runs-on=${{ github.run_id }} + - family=m7i+m7i-flex+m7a + - cpu=16 + - image=ubuntu24-full-x64 + - extras=s3-cache + - tag=rust-semver + steps: + - uses: runs-on/action@v2 + with: + sccache: s3 + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + fetch-tags: true + - uses: ./.github/actions/setup-rust + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + # We have to set the correct Cargo.toml versions so semver checks uses the previous release. + - name: Latest Tag + id: latest-tag + run: | + LATEST_TAG=$(git describe --tags --abbrev=0) + echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT + - name: Cargo Set Version + run: | + cargo install cargo-edit + cargo set-version --workspace ${{ steps.latest-tag.outputs.tag }} + + - name: Check semver + uses: obi1kenobi/cargo-semver-checks-action@v2 + + rust-coverage: + name: "Rust tests (coverage)" + timeout-minutes: 120 + permissions: + id-token: write + strategy: + matrix: + suite: + - tests + - tpc-h + - ffi + runs-on: + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 + - family=m7i+m7i-flex+m7a + - cpu=16 + - extras=s3-cache + - tag=rust-coverage + - tag=suite-${{ matrix.suite }} + 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 + with: + sccache: s3 + - uses: actions/checkout@v6 + - name: Rust Tests + if: ${{ matrix.suite == 'tests' }} + run: | + cargo +nightly nextest run --locked --workspace --all-features --no-fail-fast + - name: Run TPC-H + if: ${{ matrix.suite == 'tpc-h' }} + # We use i2 to ensure that restarting the duckdb connection succeeds + run: | + cargo run --bin query_bench -- tpch -i2 --targets "datafusion:vortex,datafusion:vortex-compact,duckdb:vortex,duckdb:vortex-compact" --scale-factor 0.1 + - name: Run FFI Example + if: ${{ matrix.suite == 'ffi' }} + run: | + cargo build -p vortex-ffi + cargo run -p vortex-ffi --example hello_vortex + - name: Generate coverage report + run: | + grcov . --binary-path target/debug/ -s . -t lcov --llvm --ignore-not-existing \ + --threads $(nproc) \ + --ignore '../*' --ignore '/*' --ignore 'fuzz/*' --ignore 'bench-vortex/*' \ + --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 'vortex-gpu/*' \ + -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: + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 + - family=m7i+m7i-flex+m7a + - cpu=16 + - extras=s3-cache + - tag=rust-test-sanitizer + env: + # Add debug symbols and enable ASAN/LSAN with better output + RUSTFLAGS: "-A warnings -Zsanitizer=address -Zsanitizer=leak --cfg disable_loom -C debuginfo=2 -C opt-level=0 -C strip=none" + 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" + steps: + - uses: runs-on/action@v2 + with: + sccache: s3 + - uses: actions/checkout@v6 + - name: Install llvm + uses: aminya/setup-cpp@v1 + with: + compiler: llvm + cache-tools: true + - uses: ./.github/actions/setup-rust + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + toolchain: nightly + components: "rust-src, rustfmt, clippy, llvm-tools-preview" + cache-suffix: "sanitizer" + - 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 + run: | + # Build with full debug info first (helps with caching) + cargo +nightly build --locked --workspace --all-features --target x86_64-unknown-linux-gnu + # Run tests with sanitizers and debug output + cargo +nightly nextest run \ + --locked \ + --workspace \ + --all-features \ + --no-fail-fast \ + --target x86_64-unknown-linux-gnu \ + --verbose + + 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 }} + - family=m7i + - cpu=8 + - image=windows22-full-x64 + - tag=rust-test-windows + - os: linux-arm64 + runner: + - runs-on=${{ github.run_id }} + - family=m7g + - cpu=8 + - image=ubuntu24-full-arm64 + - extras=s3-cache + - tag=rust-test-linux-arm64 + runs-on: ${{ matrix.runner }} + steps: + - uses: runs-on/action@v2 + if: matrix.os == 'linux-arm64' + with: + sccache: s3 + - uses: actions/checkout@v5 + - name: Install Visual Studio Build Tools (Windows) + if: matrix.os == 'windows-x64' + shell: bash + run: | + choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --passive" -y + - name: Setup Python (Windows) + if: matrix.os == 'windows-x64' + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - 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 bench-vortex --exclude vortex-python --exclude vortex-duckdb --exclude vortex-fuzz + - name: Rust Tests (Other) + if: matrix.os != 'windows-x64' + run: cargo nextest run --locked --workspace --all-features --no-fail-fast --exclude bench-vortex --exclude vortex-duckdb + + build-java: + name: "Java" + runs-on: + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 + - family=m7i+m7i-flex+m7a + - cpu=16 + - extras=s3-cache + - tag=java + timeout-minutes: 120 + steps: + - uses: runs-on/action@v2 + 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-dtype vortex-error" } + - { shard: 2, name: "Array types", packages: "vortex-array vortex-scalar vortex-vector", features: "--features test-harness" } + - { shard: 3, name: "Main library", packages: "vortex vortex-compute" } + - { 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: + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 + - family=c7i.8xlarge + - extras=s3-cache + - tag=bench-codspeed-${{ matrix.shard }} + 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: Install Codspeed + run: cargo install --force cargo-codspeed --locked + - 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@346a2d8a8d9d38909abd0bc3d23f773110f076ad + 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: + - runs-on=${{ github.run_id }}/image=vortex-ci-amd64 + - family=m7i+m7i-flex+m7a + - cpu=8 + - extras=s3-cache + - tag=cxx-build + steps: + - uses: actions/checkout@v6 + - uses: ./.github/actions/setup-rust + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Build and run C++ unit tests + working-directory: vortex-cxx/ + run: | + mkdir -p build + cd build + cmake -DVORTEX_ENABLE_TESTING=ON -DVORTEX_ENABLE_ASAN=ON .. + cmake --build . --parallel $(nproc) + ctest -V + - name: Build and run the example in release mode + working-directory: vortex-cxx/examples + run: | + mkdir -p build + cd build + cmake -DCMAKE_BUILD_TYPE=Release .. + cmake --build . --parallel $(nproc) + ./hello-vortex ../goldenfiles/example.vortex + + 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 }} + toolchain: nightly-2025-06-26 + targets: "wasm32-wasip1" + components: "rust-src" + - name: Setup Wasmer + uses: wasmerio/setup-wasmer@v3.1 + # there is a compiler bug in nightly (but not in nightly-2025-06-26) + - run: cargo +nightly-2025-06-26 -Zbuild-std=panic_abort,std 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" + RUST_BACKTRACE: full + steps: + - uses: actions/checkout@v6 + - uses: ./.github/actions/setup-rust + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + toolchain: nightly + components: "rust-src, rustfmt, clippy, miri" + - uses: taiki-e/install-action@v2 + with: + tool: nextest + - name: Run Miri + run: cargo +nightly 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 }} + toolchain: nightly + - 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 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/{}