kinjo 0.1.0

Kinjo: mDNS TUI and commands launch for local network services
Documentation
name: Check and Build Rust project

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  format:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v6
    - name: Check formatting
      run: cargo fmt -- --check

  clippy:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v6
    - name: Install dependencies
      run: |
        sudo apt-get update
        # sudo apt-get install -y avahi-daemon avahi-utils
        sudo apt-get install -y xorg-dev libxcb-shape0-dev libxcb-xfixes0-dev clang avahi-daemon libavahi-client-dev
    - uses: Swatinem/rust-cache@v2
    - name: Run clippy
      run: cargo clippy --locked --all-targets -- -D warnings
    - name: Run clippy (all features)
      run: cargo clippy --locked --all-targets --all-features -- -D warnings

  build:

    name: Build on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    
    strategy:
      matrix:
        # Defines the target operating systems
        os: [ubuntu-latest, windows-latest, macos-latest]

    steps:
    - uses: actions/checkout@v6

    - name: Install dependencies 
      if: matrix.os == 'ubuntu-latest'
      run: |
        sudo apt-get update
        sudo apt-get install -y xorg-dev libxcb-shape0-dev libxcb-xfixes0-dev clang avahi-daemon libavahi-client-dev
    
    - uses: Swatinem/rust-cache@v2
    
    - name: Build
      run: cargo build --locked --verbose

    - name: Run tests
      run: cargo test --locked --verbose

    # The zeroconf backend is feature-gated and needs the Avahi client
    # headers, which only the Linux runner installs.
    - name: Run tests (all features)
      if: matrix.os == 'ubuntu-latest'
      run: cargo test --locked --verbose --all-features