stdint 1.0.1

C99 stdint/stdio types for easier interop
Documentation
---
name: Rust

on:
  push:
    branches: [ "main" ]
    paths:
      - 'Cargo.toml'
      - 'Cargo.lock'
      - 'build.rs'
      - 'src/**'
      - '.github/workflows/rust.yml'
  pull_request:
    branches: [ "main" ]
    paths:
      - 'Cargo.toml'
      - 'Cargo.lock'
      - 'build.rs'
      - 'src/**'
      - '.github/workflows/rust.yml'

env:
  CARGO_TERM_COLOR: always

jobs:
  lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Check format
        run: cargo fmt --check
      - name: Clippy
        run: cargo clippy

  build-std:
    needs: lint
    name: Build and Test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: taiki-e/install-action@nextest
      - name: Run tests
        run: cargo nextest run --verbose
      - name: Run doctests
        run: cargo test --doc --verbose

  build-others:
    needs:
      - lint
      - build-std
    name: Build and Test
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os:
          - macos-latest
          # - windows-latest  # TODO: Fix the build
    steps:
      - uses: actions/checkout@v4
      - uses: taiki-e/install-action@nextest
      - name: Run tests
        run: cargo nextest run --verbose
      - name: Run doctests
        run: cargo test --doc --verbose