ds4432 0.3.0

Platform-agnostic Rust driver for the Maxim DS4432 Dual-Channel, I2C, 7-Bit Sink/Source Current Digital To Analog (DAC) converter.
Documentation
name: CI builds

on:
  workflow_call: {}
  pull_request: {}
  push:
    branches: [ master ]
    paths: [ src ]

env:
  RUSTFLAGS: "-Dwarnings"

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v4
      with:
        fetch-depth: 0

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

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

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

    - name: Run clippy
      run: cargo clippy --all-targets --features=sync,async

    - name: Install cargo-binstall
      uses: cargo-bins/cargo-binstall@main

    - name: Install cargo-machete
      run: cargo binstall cargo-machete --no-confirm

    - name: Check for unused deps
      run: cargo machete --with-metadata

    - name: Compile tests
      run: cargo test --no-run --locked

    - name: Run tests
      run: cargo test -- --nocapture --quiet