probe-run 0.2.3

Runs embedded programs just like native ones
name: CI

on:
  push:
    branches: [ main, staging, trying ]
  pull_request:
    branches: [ main ]

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: "--deny warnings"

# NOTE if you change the `matrix` field or add/remove a job you'll need to update the list of jobs
# in `.github/bors.toml
jobs:
  test:
    strategy:
      matrix:
        rust:
          - stable
          - nightly
        os:
          - ubuntu-latest
          - macOS-latest
          - windows-latest
    runs-on: ${{ matrix.os }}
    timeout-minutes: 20
    steps:
    - uses: actions/checkout@v2
    - uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: ${{ matrix.rust }}
        override: true
        target: thumbv6m-none-eabi
        components: rustfmt
    - run: cargo fmt -- --check
    - name: Install C libraries for tooling
      if: matrix.os == 'ubuntu-latest'
      run: sudo apt-get update && sudo apt-get install libudev-dev libusb-1.0-0-dev
    - name: Build host tooling
      run: |
        cargo build