rts-alloc 4.0.0

Shared memory allocator intended for small frequent allocations
Documentation
name: Rust CI

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

permissions:
  contents: read

jobs:
  check-and-test:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest]
    steps:
      - uses: actions/checkout@v4

      - name: Install Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy

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

      - name: Rustfmt check
        if: matrix.os == 'ubuntu-latest'
        run: cargo fmt --all -- --check

      - name: Clippy lint
        if: matrix.os == 'ubuntu-latest'
        run: cargo clippy --all-targets --all-features -- -D warnings

      - name: Build release
        if: matrix.os == 'ubuntu-latest'
        run: cargo build --release

      - name: Cargo check
        run: cargo check --all-targets --all-features

      - name: Run unit tests
        run: cargo test --all-targets

      - name: Run shuttle tests
        run: cargo test --all-targets --features shuttle shuttle_tests