smon 0.1.2

Minimalistic TUI serial monitor
name: CI

on:
  push:
    branches: [master]
  pull_request:

permissions:
  contents: read

env:
  CARGO_TERM_COLOR: always

jobs:
  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: Swatinem/rust-cache@v2
      # serialport reads the port list through libudev on a gnu target. The
      # musl release build drops that dependency, but this job builds gnu.
      - name: Install libudev
        run: sudo apt-get update && sudo apt-get install -y libudev-dev
      - run: cargo clippy --all-targets -- -D warnings

  test:
    name: Test ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    steps:
      - uses: actions/checkout@v7
      - uses: Swatinem/rust-cache@v2
      - name: Install libudev
        if: runner.os == 'Linux'
        run: sudo apt-get update && sudo apt-get install -y libudev-dev
      - run: cargo test