Skip to content

chore: track prolly as submodule #9

chore: track prolly as submodule

chore: track prolly as submodule #9

Workflow file for this run

name: CI
on:
push:
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --check
- name: Check
run: cargo check -p crabdb
- name: Test
run: cargo test -p crabdb
- name: Scale Benchmark Syntax
run: bash -n scripts/cli-scale-bench.sh
- name: Scale Benchmark Smoke
run: make bench-cli-scale-smoke
env:
CRABDB_SCALE_BASE: ${{ runner.temp }}
CRABDB_SCALE_LABEL: ci-${{ github.run_id }}
- name: Scale Benchmark Thresholds
run: >
python3 scripts/check-cli-scale-thresholds.py
"${{ runner.temp }}/crabdb-cli-scale-ci-${{ github.run_id }}/1000/results.tsv"
init_working_tree=60
status_clean=15
status_dirty=20
diff_dirty=25
record_dirty=25
git_dirty_status=15
git_dirty_diff=20
git_dirty_record=20
git_status_after_dirty_record=15
daemon_wait_for_health=60
daemon_wait_for_hot_cache=60
daemon_persisted_snapshot_status=10
daemon_persisted_snapshot_record_clean=10
daemon_persisted_snapshot_diff_dirty=10
daemon_cli_session_start=10
daemon_cli_approval_request=10
daemon_cli_lease_acquire=10
daemon_cli_timeline=10
daemon_cli_why=10
daemon_cli_history=10
daemon_cli_code_from=10
agent_apply_patch=30
merge_queue_run=30
agent_spawn_sparse=15
agent_read_sparse_hydrate_neighbors=15
agent_sync_sparse_dir=15
agent_spawn_materialized=30
agent_status_materialized=15
agent_record_materialized=30
backup_create=30
backup_verify=30
--metrics
"${{ runner.temp }}/crabdb-cli-scale-ci-${{ github.run_id }}/1000/metrics.tsv"
sqlite_bytes=64000000
dbstat_repo_prolly_nodes=32000000
object_kind_repo_TextContent_bytes=16000000
object_count=20000
prolly:
name: Prolly core
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --check
- name: Check
run: cargo check -p prolly-map
- name: Default tests
run: cargo test -p prolly-map
- name: Clippy
run: cargo clippy -p prolly-map --all-targets --features "tokio sqlite" -- -D warnings
- name: Rustdoc
run: RUSTDOCFLAGS="-D warnings" cargo doc -p prolly-map --no-deps --features "tokio sqlite"
- name: Inspect binary
run: cargo check -p prolly-map --bin prolly-inspect
- name: Examples
run: cargo check -p prolly-map --examples
- name: Bench compile
run: cargo check -p prolly-map --benches --features "tokio sqlite"
- name: Package
run: cargo package -p prolly-map --no-verify
- name: Tokio feature tests
run: cargo test -p prolly-map --features tokio
- name: SQLite store contract
run: cargo test -p prolly-map --features sqlite --test sqlite_store
prolly-optional-backends:
name: Prolly optional backend (${{ matrix.backend }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- backend: rocksdb
features: rocksdb
test: rocksdb_store
- backend: slatedb
features: slatedb
test: slatedb_store
steps:
- uses: actions/checkout@v4
- name: Install RocksDB native dependencies
if: ${{ matrix.backend == 'rocksdb' }}
run: sudo apt-get update && sudo apt-get install -y clang libclang-dev
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Store contract
run: cargo test -p prolly-map --features "${{ matrix.features }}" --test "${{ matrix.test }}"
prolly-pglite-sidecar:
name: Prolly PGlite sidecar
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install PGlite node package
run: |
mkdir -p "${{ runner.temp }}/prolly-pglite-node"
npm install --prefix "${{ runner.temp }}/prolly-pglite-node" @electric-sql/[email protected]
- name: PGlite store contract
run: cargo test -p prolly-map --features pglite --test pglite_store
env:
PROLLY_PGLITE_TEST: "1"
PROLLY_PGLITE_NODE_CWD: ${{ runner.temp }}/prolly-pglite-node