direct_ring_buffer 0.2.2

A high-performance, lock-free ring buffer for single-producer, single-consumer scenarios.
Documentation
name: Rust

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

env:
  CARGO_TERM_COLOR: always

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  test:
    name: tests (stable)
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: dtolnay/rust-toolchain@stable
    - uses: actions/cache@v4
      with:
        path: |
          ~/.cargo/registry
          ~/.cargo/git
          target
        key: test-${{ runner.os }}-stable-${{ hashFiles('**/Cargo.lock') }}
    - run: cargo test --workspace --all-features

  miri:
    name: tests (miri)
    needs: test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@nightly
        with:
          components: miri,rust-src
      - uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: miri-${{ runner.os }}-nightly-${{ hashFiles('**/Cargo.lock') }}
      - name: cargo miri test
        env:
          MIRIFLAGS: "-Zmiri-strict-provenance -Zmiri-backtrace=full"
          RUSTFLAGS: ""
        run: cargo +nightly miri test --workspace