unsigned-float 0.3.0

Unsigned floating-point formats for non-negative numeric domains.
Documentation
name: CI

"on":
  pull_request:
  push:
    branches:
      - main
  workflow_dispatch:

permissions:
  contents: read

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

env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: "1"

jobs:
  quality:
    name: quality
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - name: Check out repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          persist-credentials: false

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

      - name: Check formatting
        run: cargo fmt --check

      - name: Lint the stable library and unit tests
        run: cargo clippy --lib --tests -- -D warnings

      - name: Check public documentation
        env:
          RUSTDOCFLAGS: -D warnings
        run: cargo doc --no-deps

  stable-test:
    name: stable-test (${{ matrix.os }})
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest
          - macos-latest
          - windows-latest
    runs-on: ${{ matrix.os }}
    timeout-minutes: 15
    steps:
      - name: Check out repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          persist-credentials: false

      - name: Install stable Rust
        uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # stable
        with:
          toolchain: stable

      - name: Test the stable library
        run: cargo test --lib

      - name: Test public documentation
        run: cargo test --doc

      - name: Check release library compilation
        run: cargo check --release --lib

  msrv:
    name: msrv (1.85.0)
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - name: Check out repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          persist-credentials: false

      - name: Install MSRV
        uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # 1.85.0
        with:
          toolchain: 1.85.0

      - name: Check package and tests on MSRV
        run: |
          cargo check --lib
          cargo test --lib
          cargo test --doc

  no-std-targets:
    name: no-std (${{ matrix.target }})
    strategy:
      fail-fast: false
      matrix:
        target:
          - aarch64-unknown-none
          - riscv64gc-unknown-none-elf
          - wasm32-unknown-unknown
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - name: Check out repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          persist-credentials: false

      - name: Install stable Rust and portable target
        uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # stable
        with:
          toolchain: stable
          targets: ${{ matrix.target }}

      - name: Compile the default no_std API
        run: cargo check --no-default-features --target ${{ matrix.target }}

  nightly-features:
    name: nightly-features
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - name: Check out repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          persist-credentials: false

      - name: Install nightly Rust
        uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # nightly
        with:
          toolchain: nightly

      - name: Test every opt-in nightly path
        run: cargo test --all-targets --all-features

      - name: Check nightly public documentation
        env:
          RUSTDOCFLAGS: -D warnings
        run: cargo doc --all-features --no-deps

  publish-dry-run:
    name: publish-dry-run
    runs-on: ubuntu-latest
    timeout-minutes: 20
    steps:
      - name: Check out repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          persist-credentials: false

      - name: Install stable Rust
        uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # stable
        with:
          toolchain: stable

      - name: Verify the extracted publication archive
        run: bash ci/publish-dry-run.sh