fairqueue 0.2.0

Spatially distancing fair queue. A kind of queue for sequential round-robin processing.
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
  workflow_dispatch:

env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: 1

jobs:
  lint-test:
    name: Lint and Test
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        include:
          - os: ubuntu-latest
            rust: stable
            check_extras: true
          - os: ubuntu-latest
            rust: beta
            check_extras: false
          - os: macos-latest
            rust: stable
            check_extras: false
          - os: windows-latest
            rust: stable
            check_extras: false
    steps:
      - uses: actions/checkout@v5

      - name: Install Rust
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.rust }}
          components: rustfmt, clippy

      - name: Cache cargo registry
        uses: actions/cache@v4
        with:
          path: ~/.cargo/registry
          key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

      - name: Cache cargo index
        uses: actions/cache@v4
        with:
          path: ~/.cargo/git
          key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

      - name: Cache build output
        uses: actions/cache@v4
        with:
          path: target
          key: ${{ runner.os }}-cargo-build-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}

      - name: Check formatting
        if: matrix.check_extras
        run: cargo fmt -- --check

      - name: Run clippy
        if: matrix.check_extras
        run: cargo clippy --all-targets --all-features -- -D warnings

      - name: Build
        run: cargo build --all-features --verbose

      - name: Run tests
        run: cargo test --all-features --verbose

      - name: Ensure docs build
        if: matrix.check_extras
        run: cargo doc --no-deps --all-features

      - name: Ensure benchmarks compile
        if: matrix.check_extras
        run: cargo bench --no-run

  minimal-versions:
    name: Minimal Versions
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5

      - name: Install Rust nightly
        uses: dtolnay/rust-toolchain@nightly

      - name: Check with minimal versions
        run: |
          cargo +nightly update -Z minimal-versions
          cargo +nightly check --all-features