name: CI
on:
push:
pull_request:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
quality:
name: Format and Clippy
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@2c7215f132e9ebf062739d9130488b56d53c060c with:
toolchain: stable
components: rustfmt, clippy
- run: cargo fmt --all -- --check
- run: cargo clippy --locked --all-targets -- -D warnings
- name: Verify publishable archive
run: cargo package --locked
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2025, macos-15]
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@2c7215f132e9ebf062739d9130488b56d53c060c with:
toolchain: stable
- run: cargo test --locked --all-targets
msrv:
name: Rust 1.88
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@2c7215f132e9ebf062739d9130488b56d53c060c with:
toolchain: 1.88.0
- run: cargo test --locked --all-targets
docs:
name: Documentation
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@2c7215f132e9ebf062739d9130488b56d53c060c with:
toolchain: stable
- name: Build docs without warnings
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --locked --no-deps
- run: cargo test --locked --doc
benchmark-harness:
name: Benchmark harness (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2025]
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@2c7215f132e9ebf062739d9130488b56d53c060c with:
toolchain: stable
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 with:
node-version: 20
- run: node --test tools/benchmarks/tests/harness.test.mjs
- run: node tools/benchmarks/run.mjs self-check --output tools/benchmarks/results/ci-self-check
- run: >-
cargo build --release --locked
--manifest-path tools/benchmarks/weavatrix-adapter/Cargo.toml
--target-dir tools/benchmarks/.tools/weavatrix-target
- run: >-
node tools/benchmarks/run.mjs run
--adapter weavatrix
--workloads modify,create,delete,rename,mixed
--counts 1,10 --workers 1
--modes dry-run,durable-apply --file-bytes 4096
--warmups 0 --repetitions 1
--output tools/benchmarks/results/ci-weavatrix
- run: >-
node tools/benchmarks/run.mjs run
--adapter weavatrix --workloads rename --counts 64 --workers 8
--modes dry-run,durable-apply --file-bytes 1024
--warmups 0 --repetitions 1
--output tools/benchmarks/results/ci-weavatrix-rename64
- run: >-
node tools/benchmarks/run.mjs run
--adapter git-apply
--workloads modify,create,delete,rename,mixed
--counts 1,10
--modes dry-run,non-durable-apply --file-bytes 4096
--warmups 0 --repetitions 1
--output tools/benchmarks/results/ci-git-apply