Skip to content

Benchmark the default union estimator against the MLE union estimator #289

Benchmark the default union estimator against the MLE union estimator

Benchmark the default union estimator against the MLE union estimator #289

Workflow file for this run

name: Rust CI
on: [push, pull_request]
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
# CI gates the published library only (`hyperloglog-rs` and its `hyperloglog-derive`
# macro). The experimental comparison crates (`statistical_comparisons`, `measure_variant`,
# `test_utils`) pull in branch-pinned git forks and are not gated here; they are meant to be
# extracted into a separate repository. The exhaustive accuracy matrix in `tests/test_hll.rs`
# is a validation sweep (tens of minutes), run locally rather than on every push; CI runs the
# library unit tests and doctests instead.
jobs:
test:
name: Test (stable)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build (default / std / no-default-features)
run: |
cargo build -p hyperloglog-rs -p hyperloglog-derive
cargo build -p hyperloglog-rs --features std
cargo build -p hyperloglog-rs --no-default-features
# The library tests are an exhaustive precision x bits matrix; at high precision the
# hash-list operations are O(n^2) and take tens of minutes, and the statistical accuracy
# tests (test_plusplus_properties) are validation-grade. Those run locally / on capable
# hardware. CI runs a fast low-precision smoke of the encode/decode/round-trip logic
# (which is precision-generic) plus the doctests.
- name: Library smoke tests and doctests
run: |
cargo test -p hyperloglog-rs --features std --lib -- --skip test_plusplus_properties precision4 precision5 precision6
cargo test -p hyperloglog-rs --doc
lint:
name: Format and Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy (default and std)
run: |
cargo clippy -p hyperloglog-rs -p hyperloglog-derive -- -D clippy::all
cargo clippy -p hyperloglog-rs -p hyperloglog-derive --features std -- -D clippy::all
msrv:
name: MSRV 1.82.0 builds the library
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.82.0
- uses: Swatinem/rust-cache@v2
- name: Build on MSRV (default / std / no-default-features)
run: |
cargo build -p hyperloglog-rs -p hyperloglog-derive
cargo build -p hyperloglog-rs --features std
cargo build -p hyperloglog-rs --no-default-features