hidapi-rusb 1.3.3

Rust-y wrapper around hidapi with rusb backend.
Documentation
name: Rust

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

env:
  CARGO_TERM_COLOR: always

jobs:
  build-ubuntu:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
        with:
          submodules: recursive
      - name: Install dependencies
        run: |
          sudo apt-get update -y
          sudo apt-get install -y libudev-dev
      - name: Setup Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          components: rustfmt, clippy
      - name: Build
        run: cargo build --no-default-features --features linux-static-hidraw --verbose
      - name: Run tests
        run: cargo test --no-default-features --features linux-static-hidraw --verbose

  build-macos:
    runs-on: macos-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
        with:
          submodules: recursive
      - name: Setup Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true
          components: rustfmt, clippy
      - name: Cache dependencies
        uses: Swatinem/rust-cache@v2
      - name: Build example
        run: cargo build --example open_first_device --verbose
      - name: Check for libusb
        run: |
          otool -L target/debug/examples/open_first_device | grep libusb && exit 1 || exit 0
      - name: Build
        run: cargo build --no-default-features --features linux-static-hidraw --verbose
      - name: Run tests
        run: cargo test --no-default-features --features linux-static-hidraw --verbose