Skip to content

Trim slow test fixtures and synchronize DuckDB spatial installs #50427

Trim slow test fixtures and synchronize DuckDB spatial installs

Trim slow test fixtures and synchronize DuckDB spatial installs #50427

Workflow file for this run

name: Linters and Tests
# Concurrency control:
# - PRs: new commits on a feature branch will cancel in-progress (outdated) runs.
# - Push to develop: runs queue sequentially, never cancelled.
# - `workflow_dispatch`: groups by branch and queues if run on develop.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}
on:
push:
branches: [develop]
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
workflow_dispatch: { }
permissions:
actions: read
contents: read
checks: write # audit-check creates checks
issues: write # audit-check creates issues
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
NIGHTLY_TOOLCHAIN: nightly-2026-11-13
TY_VERSION: 0.0.98
# Link with mold, which setup-prebuild installs on Linux.
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS: "-C link-arg=-fuse-ld=mold"
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS: "-C link-arg=-fuse-ld=mold"
jobs:
duckdb-mirror:
name: "Mirror DuckDB to R2"
if: github.event.pull_request.draft != true && github.event_name == 'pull_request'
uses: ./.github/workflows/duckdb-r2.yml
secrets: inherit
lightweight-checks:
name: "Formatting, Python lint and script tests"
if: github.event.pull_request.draft != true
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-ci-small/image=ubuntu26-full-x64-pre-v2/extras=s3-cache/tag=lightweight-checks', format('{0}/region={1}', github.run_id, vars.CI_REGION || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T1') && 'ap-northeast-1') || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T2') && 'eu-central-1') || 'us-east-1'))
|| 'ubuntu-latest' }}
timeout-minutes: 10
steps:
- parallel:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- parallel:
- uses: spiraldb/actions/.github/actions/setup-uv@a746510eafaa926484c354541cfc49b2ec06cc63 # 0.18.6
with:
sync: false
- name: Install missing formatting tools
run: |
packages=()
command -v yamllint >/dev/null || packages+=(yamllint)
command -v clang-format >/dev/null || packages+=(clang-format)
if [ ${#packages[@]} -gt 0 ]; then
sudo apt-get update
sudo apt-get install -y "${packages[@]}"
fi
- name: TOML Lint
if: "!cancelled()"
uses: spiraldb/actions/.github/actions/lint-toml@a746510eafaa926484c354541cfc49b2ec06cc63 # 0.18.6
- name: Validate YAML file
if: "!cancelled()"
run: |
# Lint the workflows and yamllint's configuration file.
yamllint \
--strict \
-c .yamllint.yaml \
.github/
- name: C/C++ Lint - clang-format
if: "!cancelled()"
run: |
git ls-files lang/cpp vortex-cuda vortex-duckdb vortex-ffi \
| grep -E '\.(cpp|hpp|cu|cuh|h)$' \
| grep -v 'arrow/reference/arrow_c_device\.h$' \
| grep -v 'kernels/src/bit_unpack_.*\.cu$' \
| grep -v 'kernels/src/bit_unpack_.*_lanes\.cuh$' \
| xargs clang-format --dry-run --Werror --style=file
# Use uvx for ruff to avoid building the Rust extension (saves ~4.5 min)
- name: Python Lint - Format
if: "!cancelled()"
run: uvx ruff format --check .
- name: Python Lint - Ruff
if: "!cancelled()"
run: uvx ruff check .
# ty needs the Python dependencies for type information, but resolves the
# vortex package itself from the in-tree sources and stubs, so skip the
# Rust extension build entirely.
- name: Python Lint - ty
if: "!cancelled()"
run: |
uv sync --all-packages --no-install-workspace
uvx ty@$TY_VERSION check vortex-python vortex-python-cuda vortex-ffi/cmake/tests scripts/tests
# Pins the measurement_id hash that scripts/post-ingest.py uses as the primary key of every
# benchmarks-database fact row. The golden vectors are a frozen artifact (see the note inside
# the JSON); this job fails if a change to scripts/_measurement_id.py drifts the hash, which
# would break ON CONFLICT idempotency against the rows already in production.
- name: Pytest - measurement_id, benchmark reporting, ingestion, CodSpeed shards, fuzz corpus, triage and compat
if: "!cancelled()"
run: |
uv run --no-project --with pytest --with pandas --with numpy --with orjson \
--with tabulate --with xxhash --with jsonschema --with pyarrow \
pytest scripts/tests \
vortex-test/compat-gen/tests/test_compat.py
# bench-orchestrator does not depend on vortex-data, so this needs no Rust build.
# Disable pytest-benchmark (installed in the workspace venv by the ty step above),
# which otherwise clashes with bench-orchestrator's `benchmark` test parameter.
- name: Pytest - bench-orchestrator
if: "!cancelled()"
run: uv run --project benchmarks/bench-orchestrator --with pytest pytest -p no:benchmark benchmarks/bench-orchestrator/tests
python-test:
name: "Python (test)"
if: github.event.pull_request.draft != true
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-ci-large/image=ubuntu26-full-x64-pre-v2/extras=s3-cache/tag=python-test', format('{0}/region={1}', github.run_id, vars.CI_REGION || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T1') && 'ap-northeast-1') || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T2') && 'eu-central-1') || 'us-east-1'))
|| 'ubuntu-latest' }}
timeout-minutes: 30
env:
RUST_LOG: "info,maturin=off,uv=debug"
MATURIN_PEP517_ARGS: "--profile ci"
steps:
- parallel:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: ./.github/actions/setup-prebuild
with:
enable-sccache: "true"
- name: Pytest - Vortex
run: |
uv run --all-packages pytest --benchmark-disable -n auto test/
working-directory: vortex-python/
# The first `uv run` above builds the extension and syncs the environment. These checks
# reuse it, and uv locks the environment, so they run at the same time.
- parallel:
# The lockfile tracks Polars 2, so also exercise the oldest supported 1.x release. The
# Polars integration parses Polars' serialized expression format, which differs across
# versions.
- name: Pytest - Vortex (Polars 1.x floor)
run: |
uv run --all-packages --with 'polars==1.32.0' \
pytest --benchmark-disable \
test/test_polars_.py test/test_dataset.py test/test_open_dataset.py \
test/test_engine_reads.py test/test_float_filters.py \
-k 'polars or test_file_reads_take_a_concurrency'
working-directory: vortex-python/
- name: Check Python documentation
run: |
uv run --all-packages make check
working-directory: docs/
rust-docs:
name: "Rust (docs)"
needs: duckdb-mirror
# The PR-only mirror is a skipped ancestor on develop; override implicit success().
if: github.event.pull_request.draft != true && !cancelled() && (needs.duckdb-mirror.result == 'success' || needs.duckdb-mirror.result == 'skipped')
timeout-minutes: 30
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-ci-docs/image=ubuntu26-full-x64-pre-v2/extras=s3-cache/tag=rust-docs', format('{0}/region={1}', github.run_id, vars.CI_REGION || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T1') && 'ap-northeast-1') || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T2') && 'eu-central-1') || 'us-east-1'))
|| 'ubuntu-latest' }}
steps:
- parallel:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: ./.github/actions/setup-prebuild
with:
enable-sccache: "true"
# Doctests use their own target dir so they don't wait on cargo doc's lock.
- parallel:
- name: Docs
id: docs
continue-on-error: true
env:
# required to make sure docs build for features
RUSTDOCFLAGS: "-D warnings --cfg docsrs"
run: |
# Build docs for the whole workspace (aside from vortex-python that is having hard time with the python-docs syntax),
# including all private docs.
# Each crate is documented into its own directory: merging them into one is what makes
# `cargo doc` slow, and nothing here uses the merged output. See the script for details.
RUSTDOC="${GITHUB_WORKSPACE}/.github/scripts/rustdoc-unmerged.sh" \
cargo doc --profile ci --no-deps --document-private-items --workspace --exclude vortex-python --exclude vortex-python-cuda
# nextest doesn't support doc tests, so we run them here
- name: Doctests
id: doctests
continue-on-error: true
env:
RUSTDOCFLAGS: "-D warnings --cfg docsrs"
run: >-
cargo test --profile ci --doc --target-dir target/doctest --workspace --all-features
--exclude vortex-jni --exclude vortex-ffi --exclude xtask --exclude vortex-python-cuda --no-fail-fast
- name: Check docs results
if: always()
env:
DOCS: ${{ steps.docs.outcome }}
DOCTESTS: ${{ steps.doctests.outcome }}
run: |
failed=""
if [ "$DOCS" = failure ]; then failed="$failed docs"; fi
if [ "$DOCTESTS" = failure ]; then failed="$failed doctests"; fi
if [ -n "$failed" ]; then
echo "::error::Failed:$failed"
exit 1
fi
build-rust:
name: "Rust build (${{matrix.config.name}})"
if: github.event.pull_request.draft != true
timeout-minutes: 30
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner={1}/image=ubuntu26-full-x64-pre-v2/extras=s3-cache/tag={2}', format('{0}/region={1}', github.run_id, vars.CI_REGION || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T1') && 'ap-northeast-1') || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T2') && 'eu-central-1') || 'us-east-1'), matrix.config.runner, matrix.config.name)
|| 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
config:
- name: "default features"
runner: amd64-ci-large
args: "--all-targets"
steps:
- parallel:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: ./.github/actions/setup-prebuild
with:
enable-sccache: "true"
# Feature-unification errors appear at type check. Codegen and linking add most of the
# time and sccache cannot cache links; the test jobs link the workspace already.
- uses: ./.github/actions/check-rebuild
with:
command: "cargo hack check --profile ci --locked ${{matrix.config.args}} --ignore-private"
- name: "Make sure no files changed after build"
run: |
git status --porcelain
test -z "$(git status --porcelain)"
- name: sccache stats
if: always() && github.repository == 'vortex-data/vortex'
run: sccache --show-stats
rust-lint:
name: "Rust (lint)"
needs: duckdb-mirror
if: github.event.pull_request.draft != true && !cancelled() && (needs.duckdb-mirror.result == 'success' || needs.duckdb-mirror.result == 'skipped')
timeout-minutes: 30
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-ci-large/image=ubuntu26-full-x64-pre-v2/extras=s3-cache/tag=rust-lint', format('{0}/region={1}', github.run_id, vars.CI_REGION || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T1') && 'ap-northeast-1') || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T2') && 'eu-central-1') || 'us-east-1'))
|| 'ubuntu-latest' }}
steps:
- parallel:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: ./.github/actions/setup-prebuild
with:
enable-sccache: "true"
- name: Install nightly for fmt
run: rustup toolchain install $NIGHTLY_TOOLCHAIN --component rustfmt
# Default-features clippy uses its own target dir so it doesn't wait on the other's lock.
- parallel:
- name: Rust Lint - Format
id: fmt
continue-on-error: true
run: cargo +$NIGHTLY_TOOLCHAIN fmt --all --check
- name: Rustc check (release)
id: check-release
continue-on-error: true
run: RUSTFLAGS="-D warnings" cargo check --locked --all-features --all-targets --release
- name: Rust Lint - Clippy All Features
id: clippy-all
continue-on-error: true
run: cargo clippy --profile ci --locked --all-features --all-targets -- -D warnings
- name: Rust Lint - Clippy Default Features
id: clippy-default
continue-on-error: true
run: CARGO_TARGET_DIR=target/clippy-default cargo clippy --profile ci --locked --all-targets -- -D warnings
- name: Check lint results
if: always()
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
with:
script: |
const failed = Object.entries({
fmt: '${{ steps.fmt.outcome }}',
'check-release': '${{ steps.check-release.outcome }}',
'clippy-all': '${{ steps.clippy-all.outcome }}',
'clippy-default': '${{ steps.clippy-default.outcome }}',
}).filter(([, o]) => o === 'failure').map(([n]) => n);
if (!failed.length) return;
const { data: { jobs } } = await github.rest.actions.listJobsForWorkflowRun({
...context.repo, run_id: context.runId,
});
const url = jobs.find(j => j.name === context.job)?.check_run_url;
if (url) {
await github.rest.checks.update({
...context.repo,
check_run_id: Number(url.split('/').pop()),
output: { title: `${failed.join(', ')} - failing`, summary: '' },
});
}
core.setFailed(`Lint failed: ${failed.join(', ')}`);
- name: sccache stats
if: always() && github.repository == 'vortex-data/vortex'
run: sccache --show-stats
rust-test-linux-arm64:
name: "Rust tests (linux-arm64)"
needs: duckdb-mirror
if: github.event.pull_request.draft != true && !cancelled() && (needs.duckdb-mirror.result == 'success' || needs.duckdb-mirror.result == 'skipped')
timeout-minutes: 30
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=arm64-ci-test/image=ubuntu26-full-arm64-pre-v2/extras=s3-cache/tag=rust-test-linux-arm64', format('{0}/region={1}', github.run_id, vars.CI_REGION || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T1') && 'ap-northeast-1') || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T2') && 'eu-central-1') || 'us-east-1'))
|| 'ubuntu-24.04-arm' }}
steps:
- parallel:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: ./.github/actions/setup-prebuild
with:
enable-sccache: "true"
- name: Install nextest
if: github.repository != 'vortex-data/vortex'
uses: taiki-e/install-action@1e29709c0ec63babbe8f266397a465f29a825f91 # v2
with:
tool: nextest
- name: Rust Tests
run: |
cargo nextest run --cargo-profile ci --locked --workspace --all-features --no-fail-fast --exclude vortex-bench --exclude xtask --exclude vortex-sqllogictest
- uses: ./.github/actions/check-rebuild
with:
command: "cargo test --profile ci --locked --workspace --all-features --no-run --exclude vortex-bench --exclude xtask --exclude vortex-sqllogictest"
java-changes:
name: "Detect Java changes"
if: github.event.pull_request.draft != true
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
pull-requests: read
outputs:
spark-compat: ${{ github.event_name != 'pull_request' || steps.filter.outputs.java == 'true' }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4
id: filter
if: github.event_name == 'pull_request'
with:
filters: |
java:
- "lang/java/**"
- "vortex-ffi/**"
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
- ".cargo/**"
- ".github/actions/setup-prebuild/**"
- ".github/workflows/ci.yml"
java-tests:
name: "Java (checks)"
if: github.event.pull_request.draft != true
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-ci-medium/image=ubuntu26-full-x64-pre-v2/extras=s3-cache/tag=java', format('{0}/region={1}', github.run_id, vars.CI_REGION || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T1') && 'ap-northeast-1') || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T2') && 'eu-central-1') || 'us-east-1'))
|| 'ubuntu-latest' }}
timeout-minutes: 30
steps:
- parallel:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- parallel:
- uses: ./.github/actions/setup-prebuild
with:
enable-sccache: "true"
- uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6
- name: Build documentation and run Java checks
run: >-
./gradlew --parallel javadoc check
-x :vortex-spark-4.0_2.13:spark41CompatTest
-x :vortex-spark-4.0_2.13:spark42CompatTest
-x :vortex-spark-4.0_2.13:spark43CompatTest
working-directory: ./lang/java
# The Spark 4.x compat suites all live in one Gradle project, and Gradle runs one project's
# tasks one at a time, so they took about 6.5 minutes in series. Each runs on its own runner
# on develop pushes and when Java or build-input files change.
java-spark-compat:
name: "Java (${{ matrix.name }})"
needs: [java-changes]
if: >-
github.event.pull_request.draft != true && !cancelled() &&
needs.java-changes.outputs.spark-compat == 'true'
strategy:
fail-fast: false
matrix:
include:
- name: Spark 4.1 compat
tasks: ":vortex-spark-4.0_2.13:spark41CompatTest"
- name: Spark 4.2 compat
tasks: ":vortex-spark-4.0_2.13:spark42CompatTest"
- name: Spark 4.3 compat
tasks: ":vortex-spark-4.0_2.13:spark43CompatTest"
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-ci-medium/image=ubuntu26-full-x64-pre-v2/extras=s3-cache/tag=java', format('{0}/region={1}', github.run_id, vars.CI_REGION || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T1') && 'ap-northeast-1') || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T2') && 'eu-central-1') || 'us-east-1'))
|| 'ubuntu-latest' }}
timeout-minutes: 30
steps:
- parallel:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- parallel:
- uses: ./.github/actions/setup-prebuild
with:
enable-sccache: "true"
- uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6
- name: Run Spark compatibility tests
env:
TASKS: ${{ matrix.tasks }}
run: ./gradlew $TASKS
working-directory: ./lang/java
# Keeps the "Java" check, which now gathers the Java checks and Spark compat jobs.
build-java:
name: "Java"
needs: [java-changes, java-tests, java-spark-compat]
# always(): a cancelled run must fail this check, not skip it (a skipped check passes).
if: always()
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check the jobs it gathers
env:
RESULTS: ${{ toJSON(needs.*.result) }}
run: |
echo "$RESULTS"
# A skipped job counts as passed, as it did when this check was a single job.
if echo "$RESULTS" | grep -qE '"(failure|cancelled)"'; then
exit 1
fi
license-check-and-audit-check:
# The name is a required status check on develop; keep it unchanged.
name: License Check and Audit Check (bans licenses sources)
if: github.event.pull_request.draft != true
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
# The two checks are independent, so they run at the same time.
- parallel:
# Prevent sudden announcement of a new advisory from failing ci:
- name: cargo deny check advisories
id: advisories
continue-on-error: true
uses: EmbarkStudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 # v2
with:
command: check advisories
- name: cargo deny check bans licenses sources
uses: EmbarkStudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 # v2
with:
command: check bans licenses sources
- name: Warn on advisory failures
# `!cancelled()` keeps the warning when bans/licenses/sources fails alongside it.
if: "!cancelled() && steps.advisories.outcome == 'failure'"
run: >-
echo "::warning title=cargo deny advisories::cargo deny check advisories
failed; see the 'cargo deny check advisories' step log."
sqllogic-test:
name: "SQL logic tests"
needs: duckdb-mirror
if: github.event.pull_request.draft != true && !cancelled() && (needs.duckdb-mirror.result == 'success' || needs.duckdb-mirror.result == 'skipped')
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-ci-sql-logic-test/image=ubuntu26-full-x64-pre-v2/extras=s3-cache/tag=sql-logic-test', format('{0}/region={1}', github.run_id, vars.CI_REGION || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T1') && 'ap-northeast-1') || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T2') && 'eu-central-1') || 'us-east-1'))
|| 'ubuntu-latest' }}
timeout-minutes: 30
steps:
- parallel:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: ./.github/actions/setup-prebuild
with:
enable-sccache: "true"
# Build each binary that data generation runs, with the same arguments as the scripts so that
# features match. The generators below then find them fresh and can run at the same time.
- name: Build data generators and tests
run: |
cargo build --profile ci --locked -p vortex-bench --bin data-gen
cargo build --profile ci --locked -p vortex-tui --bin vx
cargo nextest run --cargo-profile ci --locked -p vortex-sqllogictest --no-run
# Skip parity.slt during data generation; the nextest run below executes it.
- parallel:
- name: Generate TPC-H data
run: ./vortex-sqllogictest/slt/tpch/generate_data.sh
env:
VORTEX_SLT_PROFILE: ci
- name: Generate TPC-DS data
run: ./vortex-sqllogictest/slt/tpcds/generate_data.sh
env:
VORTEX_SLT_PROFILE: ci
VORTEX_SLT_SKIP_PARITY: "1"
- name: Generate ClickBench data
run: ./vortex-sqllogictest/slt/clickbench/generate_data.sh
env:
VORTEX_SLT_PROFILE: ci
VORTEX_SLT_SKIP_PARITY: "1"
- name: Run sqllogictest tests
run: cargo nextest run --cargo-profile ci --locked -p vortex-sqllogictest
- uses: ./.github/actions/check-rebuild
with:
command: "cargo nextest run --cargo-profile ci -p vortex-sqllogictest --no-run"
message-format-flag: "--cargo-message-format"
c-cxx-generated:
name: "Generated sources, C/C++ API and CMake integration"
if: github.event.pull_request.draft != true
# Leave room for cold, per-build-tree Cargo artifacts, including sanitized std.
timeout-minutes: 30
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-ci-medium/image=ubuntu26-full-x64-pre-v2/extras=s3-cache/tag=c-cxx-generated', format('{0}/region={1}', github.run_id, vars.CI_REGION || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T1') && 'ap-northeast-1') || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T2') && 'eu-central-1') || 'us-east-1'))
|| 'ubuntu-latest' }}
steps:
- parallel:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
# check-editions compares against the merge base, so it needs real history.
fetch-depth: 0
- uses: ./.github/actions/setup-prebuild
with:
enable-sccache: "true"
- parallel:
# The only job that needs flatc: builds use the checked-in bindings.
- uses: ./.github/actions/setup-flatc
- name: Install nightly for cbindgen macro expansion
run: |
rustup toolchain install $NIGHTLY_TOOLCHAIN \
--component rust-src,rustfmt,clippy,llvm-tools-preview
- name: Install Ninja for CMake integration tests
run: |
sudo apt-get update
sudo apt-get install -y ninja-build
- parallel:
- name: "regenerate the FlatBuffers and Protocol Buffers bindings"
# Fails on a flatc version mismatch, and the porcelain check below fails on stale bindings.
run: |
cargo run --profile ci -p xtask -- generate-flatbuffers
cargo run --profile ci -p xtask -- generate-proto
- name: "regenerate FFI header and test the C API"
env:
# Nightly regenerates cinclude/vortex.h with cbindgen during the build.
RUSTUP_TOOLCHAIN: ${{ env.NIGHTLY_TOOLCHAIN }}
run: |
cmake -S vortex-ffi -B "${RUNNER_TEMP}/ffi-c-build" \
-DCMAKE_LINKER_TYPE=MOLD \
-DBUILD_SHARED_LIBS=ON \
-DVORTEX_CARGO_PROFILE=ci \
-DVORTEX_BUILD_TESTS=ON
cmake --build "${RUNNER_TEMP}/ffi-c-build" --parallel "$(nproc)"
ctest --test-dir "${RUNNER_TEMP}/ffi-c-build" --parallel "$(nproc)" --output-on-failure
# Populate the registry cache for the lockfile-selected offline fixtures.
- name: Fetch Cargo dependencies for offline fixtures
run: cargo fetch --locked
- name: "regenerate the edition records"
run: |
cargo run --profile ci -p xtask -- generate-editions
- name: "check frozen edition records never change"
# Independent of the regeneration above: a stale record must not mask a frozen one
# being edited, nor the other way round.
if: "!cancelled()"
run: |
BASE="${{ github.event.pull_request.base.sha || 'HEAD^' }}"
cargo run --profile ci -p xtask -- check-editions --base "$BASE"
- name: "Make sure no files changed after regenerating"
run: |
git status --porcelain
test -z "$(git status --porcelain)"
# Schemas live under `<crate>/flatbuffers/` but resolve includes against those dirs
# collectively, so flatten each revision into one tree for flatc to compare.
- name: "Collect flatbuffer schemas from this revision and from develop"
if: "!cancelled()"
run: |
git fetch origin develop --depth 1
collect() {
git ls-tree -r --name-only "$1" \
| grep -E '(^|/)flatbuffers/.*\.fbs$' \
| while read -r path; do
rel="${path#*/flatbuffers/}"
mkdir -p "$2/$(dirname "$rel")"
git show "$1:$path" > "$2/$rel"
done
}
collect HEAD "$RUNNER_TEMP/fbs.head"
collect origin/develop "$RUNNER_TEMP/fbs.develop"
- name: "Verify flatbuffer back-compat"
if: "!cancelled()"
working-directory: ${{ runner.temp }}
run: |
find fbs.develop/ -type f -name "*.fbs" | sed 's|^fbs.develop/||' \
| xargs -I{} -n1 flatc -I fbs.head --conform-includes fbs.develop --conform fbs.develop/{} fbs.head/{}
- parallel:
- name: Build C++ tests and examples (asan)
if: "!cancelled()"
env:
RUSTUP_TOOLCHAIN: ${{ env.NIGHTLY_TOOLCHAIN }}
# symbolizing error backtrace on debug .so is slow
RUST_LIB_BACKTRACE: 0
run: |
cmake -S lang/cpp -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_LINKER_TYPE=MOLD \
-DVORTEX_CARGO_PROFILE=ci \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DVORTEX_SANITIZER=asan \
-DVORTEX_SANITIZE_RUST_STD=ON \
-DVORTEX_BUILD_TESTS=ON \
-DVORTEX_BUILD_EXAMPLES=ON
cmake --build build --parallel "$(nproc)"
- name: Test CMake integration
if: "!cancelled()"
run: |
# These tests assert on the compiler wrappers they observe.
unset RUSTC_WRAPPER CMAKE_C_COMPILER_LAUNCHER CMAKE_CXX_COMPILER_LAUNCHER
python3 -m unittest discover -s vortex-ffi/cmake/tests -v
- name: Show C++ API compiler cache statistics
if: "!cancelled() && github.repository == 'vortex-data/vortex'"
run: sccache --show-stats
- name: Run C++ tests
if: "!cancelled()"
env:
RUST_LIB_BACKTRACE: 0
run: ctest --test-dir build --output-on-failure
- name: Run C++ examples
if: "!cancelled()"
env:
RUST_LIB_BACKTRACE: 0
run: |
cd build/examples
./writer people0.vortex
./writer people1.vortex
./writer me.vortex
./scan '*.vortex'
./dtype me.vortex
./reader
integration-smoke:
name: "Integration smoke tests (btrblocks golden, WASM, DuckDB S3)"
needs: duckdb-mirror
if: github.event.pull_request.draft != true && !cancelled()
runs-on: >-
${{ github.repository == 'vortex-data/vortex'
&& format('runs-on={0}/runner=amd64-ci-medium/image=ubuntu26-full-x64-pre-v2/extras=s3-cache/tag=integration-smoke', format('{0}/region={1}', github.run_id, vars.CI_REGION || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T1') && 'ap-northeast-1') || (contains(github.event.pull_request.updated_at || github.event.head_commit.timestamp, 'T2') && 'eu-central-1') || 'us-east-1'))
|| 'ubuntu-latest' }}
timeout-minutes: 30
steps:
- parallel:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- parallel:
- uses: ./.github/actions/setup-prebuild
with:
enable-sccache: "true"
targets: "wasm32-wasip1,wasm32-unknown-unknown"
- name: Setup Wasmer
uses: wasmerio/setup-wasmer@ba7631cb2d521612aa7ac5b13cb76fb77e824a1a # v3
with:
version: "v7.4.0"
- name: Verify Wasmer installation
run: wasmer --version
- parallel:
- name: Build DuckDB tests
if: (needs.duckdb-mirror.result == 'success' || needs.duckdb-mirror.result == 'skipped')
shell: bash
run: |
cargo nextest run --cargo-profile ci --locked -p vortex-duckdb --no-run
- name: Start RustFS
if: (needs.duckdb-mirror.result == 'success' || needs.duckdb-mirror.result == 'skipped')
shell: bash
run: |
curl -sSL https://dl.rustfs.com/artifacts/rustfs/release/rustfs-linux-x86_64-musl-latest.zip \
-o "${RUNNER_TEMP}/rustfs.zip"
unzip -o -q "${RUNNER_TEMP}/rustfs.zip" rustfs -d "${RUNNER_TEMP}"
chmod +x "${RUNNER_TEMP}/rustfs"
mkdir -p "${RUNNER_TEMP}/rustfs-data"
RUSTFS_ACCESS_KEY=rustfsadmin RUSTFS_SECRET_KEY=rustfsadmin \
"${RUNNER_TEMP}/rustfs" "${RUNNER_TEMP}/rustfs-data" --address 127.0.0.1:9000 &
until curl -sf http://127.0.0.1:9000/health; do sleep 1; done
curl -sf -X PUT "http://127.0.0.1:9000/vortex-test" \
--user "rustfsadmin:rustfsadmin" --aws-sigv4 "aws:amz:us-east-1:s3"
# The golden suite pins compressor decisions for the core-only and explicitly enabled
# edition configurations; compact (zstd + pco) runs in the all-features workspace tests.
- name: Golden corpus (edition configurations)
run: |
cargo nextest run --cargo-profile ci --locked --no-fail-fast -p vortex-btrblocks --test golden
- run: cargo build --profile ci --target wasm32-wasip1
working-directory: ./wasm-test
- parallel:
- name: Run tests
if: "!cancelled() && (needs.duckdb-mirror.result == 'success' || needs.duckdb-mirror.result == 'skipped')"
shell: bash
env:
AWS_ACCESS_KEY_ID: rustfsadmin
AWS_SECRET_ACCESS_KEY: rustfsadmin
AWS_ENDPOINT: "http://127.0.0.1:9000"
AWS_REGION: "us-east-1"
AWS_ALLOW_HTTP: "true"
VORTEX_DUCKDB_S3_URI: "s3://vortex-test/duckdb"
run: |
cargo nextest run --cargo-profile ci --locked -p vortex-duckdb --run-ignored all s3_
- run: wasmer run ./target/wasm32-wasip1/ci/wasm-test.wasm
if: "!cancelled()"
working-directory: ./wasm-test
- run: RUSTFLAGS='--cfg getrandom_backend="unsupported"' cargo build --profile ci --target wasm32-unknown-unknown
if: "!cancelled()"
working-directory: ./wasm-test
- name: "Check wasm32-unknown-unknown does not need wasm-bindgen"
# Pure wasm hosts (e.g. wasmtime) cannot provide wasm-bindgen's JS imports.
if: "!cancelled()"
shell: bash
working-directory: ./wasm-test
run: |
! cargo tree --target wasm32-unknown-unknown -e normal --prefix none \
| grep -E '^(wasm-bindgen|js-sys) '
# Checks each publishable crate on its own, to catch features that only unify in wasm-test.
- name: "Check publishable crates for wasm32-unknown-unknown"
if: "!cancelled()"
uses: ./.github/actions/check-rebuild
with:
command: >-
RUSTFLAGS='-A warnings --cfg getrandom_backend="unsupported"'
cargo hack check --profile ci --locked --ignore-private --target wasm32-unknown-unknown
--exclude vortex --exclude vortex-cuda --exclude vortex-cub --exclude vortex-nvcomp
--exclude vortex-datafusion --exclude vortex-duckdb --exclude vortex-tui --exclude vortex-zstd
--exclude vortex-test-e2e-cuda --exclude vortex-python-cuda --exclude vortex-sqllogictest
--exclude vortex-parquet-variant
- name: "Make sure no files changed after build"
if: "!cancelled()"
run: |
git status --porcelain
test -z "$(git status --porcelain)"