whatcable 0.3.1

Tells you what each USB cable / device on Linux can actually do. Rust port of WhatCable.
Documentation
name: CI

on:
  push:
    branches: [master, main]
  pull_request:

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        features: ["", "--no-default-features"]

    steps:
      - uses: actions/checkout@v5

      - name: Install dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y libudev-dev pkg-config

      - uses: dtolnay/rust-toolchain@stable

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

      - name: Build
        run: cargo build --locked ${{ matrix.features }}

      - name: Test
        run: cargo test --locked ${{ matrix.features }}

  lint:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v5

      - name: Install dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y libudev-dev pkg-config

      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy

      - name: Format check
        run: cargo fmt --all --check

      - name: Clippy
        run: cargo clippy --all-targets -- -D warnings

  msrv:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v5

      - name: Install dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y libudev-dev pkg-config

      - uses: dtolnay/rust-toolchain@1.85

      - name: Build with MSRV
        run: cargo build --locked

  docs:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v5

      - name: Install dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y libudev-dev pkg-config

      - uses: dtolnay/rust-toolchain@stable

      - name: rustdoc
        env:
          RUSTDOCFLAGS: "-D warnings"
        run: cargo doc --no-deps