feat: Dash table cache-mode segment-local eviction (#285 stage 2) #442
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-License-Identifier: MIT OR Apache-2.0 | |
| # | |
| # Rust workspace CI. Mirrors the guard idiom of release.yml: a leading `guard` | |
| # job short-circuits the whole workflow while the repo is docs-only (no root | |
| # Cargo.toml), so the workflow is inert until the first crate lands and active | |
| # thereafter. Gates: fmt, clippy (pedantic, -D warnings), test (ubuntu + macos), | |
| # msrv (1.85), musl static build, and the invariant lints (INVARIANTS.md). | |
| name: rust | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| paths: | |
| - "crates/**" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - "rust-toolchain.toml" | |
| - "deny.toml" | |
| - "scripts/ci/check-rust-invariants.sh" | |
| - ".github/workflows/rust.yml" | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: "-D warnings" | |
| jobs: | |
| guard: | |
| name: guard (skip until a Cargo project exists) | |
| runs-on: ubuntu-latest | |
| outputs: | |
| has_cargo: ${{ steps.check.outputs.has_cargo }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - id: check | |
| shell: bash | |
| run: | | |
| if [ -f Cargo.toml ] && [ -f Cargo.lock ]; then | |
| echo "has_cargo=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "has_cargo=false" >> "$GITHUB_OUTPUT" | |
| echo "::notice::repo is docs-only (no Cargo.toml/Cargo.lock); rust CI is a no-op" | |
| fi | |
| fmt: | |
| name: fmt | |
| needs: guard | |
| if: needs.guard.outputs.has_cargo == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --all --check | |
| clippy: | |
| name: clippy (pedantic, -D warnings) | |
| needs: guard | |
| if: needs.guard.outputs.has_cargo == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| test: | |
| name: test (${{ matrix.os }}) | |
| needs: guard | |
| if: needs.guard.outputs.has_cargo == 'true' | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo test --workspace --all-features | |
| msrv: | |
| name: msrv (1.85) | |
| needs: guard | |
| if: needs.guard.outputs.has_cargo == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # The workspace MSRV is the edition-2024 floor (Cargo.toml rust-version). | |
| - uses: dtolnay/rust-toolchain@1.85.0 | |
| - uses: Swatinem/rust-cache@v2 | |
| # Build only (not clippy): pedantic lints track the stable toolchain, while | |
| # MSRV guarantees the code compiles on the declared floor. | |
| # | |
| # rust-toolchain.toml pins 1.92.0 for dev reproducibility, and a bare `cargo` | |
| # would honor that file (the gate would silently build with 1.92.0, not the | |
| # MSRV). The `+1.85.0` directive overrides the toolchain file, so this gate | |
| # actually exercises the declared floor. | |
| - run: cargo +1.85.0 build --workspace --all-features | |
| musl: | |
| name: musl static build | |
| needs: guard | |
| if: needs.guard.outputs.has_cargo == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install musl tools | |
| run: sudo apt-get update && sudo apt-get install -y musl-tools | |
| # rust-toolchain.toml pins channel 1.92.0, so cargo builds with that toolchain | |
| # (auto-installed from the file), NOT the action's "stable" toolchain. Adding | |
| # the target via the action's `targets:` would attach it to "stable" and the | |
| # build would fail with "can't find crate for std". Add the musl target to the | |
| # active (pinned) toolchain here, in-repo, so `cargo build --target` resolves | |
| # the musl std on the same toolchain that compiles the workspace. | |
| - run: rustup target add x86_64-unknown-linux-musl | |
| - run: cargo build --release --target x86_64-unknown-linux-musl | |
| io-uring: | |
| name: io_uring datapath (Linux, default-off feature) | |
| needs: guard | |
| if: needs.guard.outputs.has_cargo == 'true' | |
| # The OPTIONAL Linux io_uring backend (PROD-10 / #28, docs/design/IOURING_DATAPATH.md) is | |
| # default-OFF and Linux-only; this ubuntu job is the dedicated gate that BUILDS + TESTS it | |
| # with `--features io_uring` (the default jobs above prove the byte-unchanged default build). | |
| # The io_uring `Runtime` impl + the per-shard io_uring bootstrap + the owned-buffer recv/send | |
| # round-trip test (`accept_recv_send_roundtrip_uring`) compile and run ONLY here (the code is | |
| # `#[cfg(all(target_os = "linux", feature = "io_uring"))]`, so it is inert on the macOS test | |
| # job even under that job's `--all-features`). GitHub's ubuntu runners run a kernel with | |
| # io_uring, so the tokio-uring runtime starts and the round-trip exercises real submissions. | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| # Clippy (pedantic, -D warnings) over the io_uring feature so the Linux-only path is held to | |
| # the SAME lint bar as the default build (the macOS dev box cannot lint this cfg). | |
| - name: clippy --features io_uring | |
| run: cargo clippy -p ironcache-runtime -p ironcache --features io_uring --all-targets -- -D warnings | |
| # Build the binary with the io_uring datapath compiled in. | |
| - name: build --features io_uring | |
| run: cargo build -p ironcache-runtime -p ironcache --features io_uring | |
| # Run the runtime crate's tests with io_uring on: the existing suite plus the io_uring | |
| # `Runtime` round-trip (accept/recv/send over a real ring) prove the owned-buffer append | |
| # semantics map correctly onto tokio-uring. | |
| - name: test --features io_uring | |
| run: cargo test -p ironcache-runtime --features io_uring | |
| invariant-lints: | |
| name: invariant lints (INVARIANTS.md) | |
| needs: guard | |
| if: needs.guard.outputs.has_cargo == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: bash scripts/ci/check-rust-invariants.sh | |
| deny: | |
| name: cargo-deny (advisories, licenses, bans, sources) | |
| needs: guard | |
| if: needs.guard.outputs.has_cargo == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Per-PR merge-blocking supply-chain gate (SUPPLY_CHAIN.md). Runs all four | |
| # cargo-deny checks against the committed deny.toml + Cargo.lock. The action | |
| # is pinned by commit SHA (v2.0.20) so the policy result is reproducible. | |
| - uses: EmbarkStudios/cargo-deny-action@bb137d7af7e4fb67e5f82a49c4fce4fad40782fe # v2.0.20 | |
| with: | |
| command: check advisories licenses bans sources |