pollable-map 0.2.0

Utilities for storing futures and streams as a pollable map
Documentation
name: Rust

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

env:
  CARGO_TERM_COLOR: always

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

jobs:
  fmt:
    name: Format
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install rustfmt
        run: rustup component add rustfmt
      - name: Check formatting
        run: cargo fmt --all --check

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install clippy
        run: rustup component add clippy
      - name: Lint
        run: cargo clippy --all-features --all-targets -- -D warnings

  test:
    name: Test (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ ubuntu-latest ]
    steps:
      - uses: actions/checkout@v4
      - name: Run tests
        run: cargo test --all-features --verbose

  features:
    name: Features (${{ matrix.features }})
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        features:
          - --no-default-features
          - --no-default-features --features alloc
          - --no-default-features --features std
          - --no-default-features --features std,alloc
          - --no-default-features --features timeout
          - --all-features
    steps:
      - uses: actions/checkout@v4
      - name: Install clippy
        run: rustup component add clippy
      - name: Check ${{ matrix.features }}
        run: cargo clippy --lib ${{ matrix.features }} -- -D warnings
      - name: Test ${{ matrix.features }}
        run: cargo test --lib ${{ matrix.features }} --verbose

  no-std:
    name: no_std (${{ matrix.target }})
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        target: [ thumbv7em-none-eabi, riscv32imac-unknown-none-elf ]
    steps:
      - uses: actions/checkout@v4
      - name: Install target
        run: rustup target add ${{ matrix.target }}
      - name: Build core only
        run: cargo build --lib --no-default-features --target ${{ matrix.target }} --verbose
      - name: Build with alloc
        run: cargo build --lib --no-default-features --features alloc --target ${{ matrix.target }} --verbose

  msrv:
    name: MSRV
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install Rust 1.81.0
        run: rustup toolchain install 1.81.0 --profile minimal --no-self-update
      - name: Build
        run: cargo +1.81.0 build --lib --all-features --verbose

  docs:
    name: Docs
    runs-on: ubuntu-latest
    env:
      RUSTDOCFLAGS: -D warnings
    steps:
      - uses: actions/checkout@v4
      - name: Build documentation
        run: cargo doc --all-features --no-deps

  package:
    name: Package
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Verify publishable
        run: cargo publish --dry-run --verbose