printf-compat 0.5.0

printf reimplemented in Rust
Documentation
name: CI

on:
  pull_request:
    branches:
      - master
  push:
    branches:
      - master
  schedule:
    - cron: '0 1 * * *'

env:
  RUSTFLAGS: -D warnings
  RUSTDOCFLAGS: -Dwarnings
  RUST_BACKTRACE: 1

defaults:
  run:
    shell: bash

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        channel: ['1.99', 'stable', 'beta', 'nightly']
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.channel }}
          targets: thumbv7m-none-eabi
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo fmt --check
      - run: cargo test
      - run: cargo clippy --all-features
      - run: cargo doc --all-features
      # Ensure that the library doesn't depend on std/alloc. A binary
      # that depends on the library is used for this (instead of
      # directly build the library), otherwise accidentally depending on
      # `alloc` would not result in an error.
      - run: cargo build --target thumbv7m-none-eabi --no-default-features
        working-directory: ci/ensure_no_std

  readme:
    name: check readme
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - run: cargo install cargo-readme
      - run: '[ "$(< README.md)" = "$(cargo readme)" ]'