ecow 0.3.1

Compact, clone-on-write vector, string, and byte buffer.
Documentation
name: Continuous integration
on: [push, pull_request]

env:
  RUSTFLAGS: "-Dwarnings"
  RUSTDOCFLAGS: "-Dwarnings"

permissions:
  contents: read

jobs:
  tests:
    name: Tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
      - uses: dtolnay/rust-toolchain@a75363d06101555fc97c6c7e1e65670b99104d98 # 1.96.1
      - run: cargo test --all-features --no-run
      - run: cargo test --all-features --no-fail-fast
      - run: cargo test --release loom --features loom
        env:
          RUSTFLAGS: --cfg loom
      - run: git diff --exit-code

  checks:
    name: Check clippy, formatting, and documentation
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
      - uses: dtolnay/rust-toolchain@a75363d06101555fc97c6c7e1e65670b99104d98 # 1.96.1
        with:
          components: clippy, rustfmt
      - run: cargo clippy --all-targets --all-features
      - run: cargo clippy --all-targets --no-default-features
      - run: cargo fmt --check
      - run: cargo doc --no-deps --document-private-items

  min-version:
    name: Check minimum Rust version
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
      - uses: dtolnay/rust-toolchain@f8e4c262c5e54db7eedbb44479f7a9529947d9cb # 1.73
      - run: cargo check

  miri:
    name: Check unsafe code
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
      - uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # master
        with:
          components: miri
          toolchain: nightly-2025-10-28
      - name: Miri 64-bit LE
        run: cargo miri test --target x86_64-unknown-linux-gnu
      - name: Miri 64-bit BE
        run: cargo miri test --target sparc64-unknown-linux-gnu
      - name: Miri 32-bit LE
        run: cargo miri test --target i686-unknown-linux-gnu