WorkTablesIndex 0.0.5

A two-level BTree with fast iteration and indexing operations
Documentation
name: Rust

on:
  push:
    branches: ["master"]
  pull_request:
    branches: ["master"]

permissions:
  contents: read

env:
  CARGO_TERM_COLOR: always

jobs:
  build_test:
    runs-on: ubicloud-standard-2
    # A hung test must fail fast, not squat the runner (a livelocking
    # concurrent test once held a runner for 28+ minutes).
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v4
      - uses: Swatinem/rust-cache@v2
        with:
          cache-on-failure: "true"
      - name: Format
        run: cargo fmt --all -- --check
      - name: Build (custom binary search, all targets)
        run: cargo build --no-default-features --all-targets --features "serde concurrent cdc multimap"
      - name: Build (superslice binary search, all targets)
        run: cargo build --no-default-features --all-targets --features "serde concurrent cdc multimap superslice-binary-search"
      - name: Build (default wt-slice hybrid binary search, all targets)
        run: cargo build --all-targets --features "serde concurrent cdc multimap"
      - name: Build (std binary search, all targets)
        run: cargo build --no-default-features --all-targets --features "serde concurrent cdc multimap std-binary-search"
      - name: Build (explicit custom override, all features, all targets)
        run: cargo build --all-targets --all-features
      - name: Test (composed search-feature precedence)
        run: >
          cargo test --no-default-features
          --features "concurrent custom-binary-search std-binary-search wt-slice-binary-search superslice-binary-search"
          configured_search_implementation_matches_precedence --lib
      # Doctests are excluded on purpose: upstream doc examples import
      # `indexset::...`, which is correct for consumers (they alias the
      # package back to `indexset`) but unresolvable under this crate name.
      # Fast tier only. The multi-threaded stress tests degrade badly (or
      # livelock) on 2-core runners - they spawn 8 OS threads over spin-retry
      # concurrent structures - so they are reserved for the manually
      # triggered full-suite workflow (heavy.yml), per repo policy: tests
      # that take too long do not run in automatic CI.
      - name: Test (fast tier, custom binary search)
        run: >
          cargo test --no-default-features --features "serde concurrent cdc multimap" --lib --tests --
          --skip test_concurrent_insert
          --skip test_concurrent_multimap_remove_reinsert_stress
          --skip test_remove_stress
          --skip parallel_iter_and_mut
          --skip test_concurrent_cdc_no_gaps
          --skip concurrent_first_writers_preserve_disjoint_ranges
          --skip mixed_structural_and_node_lock_paths_complete_without_deadlock
      - name: Test (fast tier, superslice binary search)
        run: >
          cargo test --no-default-features --features "serde concurrent cdc multimap superslice-binary-search" --lib --tests --
          --skip test_concurrent_insert
          --skip test_concurrent_multimap_remove_reinsert_stress
          --skip test_remove_stress
          --skip parallel_iter_and_mut
          --skip test_concurrent_cdc_no_gaps
          --skip concurrent_first_writers_preserve_disjoint_ranges
          --skip mixed_structural_and_node_lock_paths_complete_without_deadlock
      - name: Test (fast tier, default wt-slice hybrid binary search)
        run: >
          cargo test --features "serde concurrent cdc multimap" --lib --tests --
          --skip test_concurrent_insert
          --skip test_concurrent_multimap_remove_reinsert_stress
          --skip test_remove_stress
          --skip parallel_iter_and_mut
          --skip test_concurrent_cdc_no_gaps
          --skip concurrent_first_writers_preserve_disjoint_ranges
          --skip mixed_structural_and_node_lock_paths_complete_without_deadlock
      - name: Test (fast tier, std binary search)
        run: >
          cargo test --no-default-features --features "serde concurrent cdc multimap std-binary-search" --lib --tests --
          --skip test_concurrent_insert
          --skip test_concurrent_multimap_remove_reinsert_stress
          --skip test_remove_stress
          --skip parallel_iter_and_mut
          --skip test_concurrent_cdc_no_gaps
          --skip concurrent_first_writers_preserve_disjoint_ranges
          --skip mixed_structural_and_node_lock_paths_complete_without_deadlock
      - name: Test (fast tier, explicit custom override and all features)
        run: >
          cargo test --all-features --lib --tests --
          --skip test_concurrent_insert
          --skip test_concurrent_multimap_remove_reinsert_stress
          --skip test_remove_stress
          --skip parallel_iter_and_mut
          --skip test_concurrent_cdc_no_gaps
          --skip concurrent_first_writers_preserve_disjoint_ranges
          --skip mixed_structural_and_node_lock_paths_complete_without_deadlock

  clippy:
    runs-on: ubicloud-standard-2
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v4
      - uses: Swatinem/rust-cache@v2
        with:
          cache-on-failure: "true"
      # The frozen allow-list for inherited upstream code lives in
      # Cargo.toml's [lints] tables; everything else is denied.
      - name: Clippy (custom binary search, deny new warnings)
        run: cargo clippy --no-default-features --all-targets --features "serde concurrent cdc multimap" -- -D warnings
      - name: Clippy (superslice binary search, deny new warnings)
        run: cargo clippy --no-default-features --all-targets --features "serde concurrent cdc multimap superslice-binary-search" -- -D warnings
      - name: Clippy (default wt-slice hybrid binary search, deny new warnings)
        run: cargo clippy --all-targets --features "serde concurrent cdc multimap" -- -D warnings
      - name: Clippy (std binary search, deny new warnings)
        run: cargo clippy --no-default-features --all-targets --features "serde concurrent cdc multimap std-binary-search" -- -D warnings
      - name: Clippy (explicit custom override and all features, deny new warnings)
        run: cargo clippy --all-targets --all-features -- -D warnings