liveplot 2.3.1

Realtime interactive plotting library using egui/eframe, with optional gRPC and Parquet export support.
Documentation
name: CI

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

permissions:
  contents: read

jobs:
  build:
    name: Build & test
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Install system dependencies (incl. protoc for grpc)
        run: |
          sudo apt-get update -qq
          sudo apt-get install -y --no-install-recommends \
            pkg-config build-essential ca-certificates \
            protobuf-compiler \
            libx11-dev libxcb1-dev libx11-xcb-dev \
            libxi-dev libxtst-dev libxrandr-dev libxinerama-dev \
            libxkbcommon-dev libwayland-dev \
            libgl1-mesa-dev libegl1-mesa-dev

      - name: Install Rust
        run: rustup toolchain install stable --profile minimal --component clippy,rustfmt

      - name: Cache cargo
        uses: Swatinem/rust-cache@v2
        with:
          workspaces: |
            . -> target

      - name: Check formatting
        run: cargo fmt -- --check

      - name: Run Clippy
        run: cargo clippy --workspace --all-targets --all-features -- -D warnings

      - name: cargo check (default features)
        run: cargo check --examples

      - name: cargo check (no optional features)
        run: cargo check --no-default-features --features tiles --examples

      - name: Cargo build
        run: cargo build --all-features

      - name: Run tests
        run: cargo test --all-features

  coverage:
    name: Coverage
    needs: build
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Install system dependencies
        run: |
          sudo apt-get update -qq
          sudo apt-get install -y --no-install-recommends \
            pkg-config build-essential ca-certificates \
            protobuf-compiler \
            libx11-dev libxcb1-dev libx11-xcb-dev \
            libxi-dev libxtst-dev libxrandr-dev libxinerama-dev \
            libxkbcommon-dev libwayland-dev \
            libgl1-mesa-dev libegl1-mesa-dev

      - name: Install Rust
        run: rustup toolchain install stable --profile minimal

      - name: Cache cargo
        uses: Swatinem/rust-cache@v2
        with:
          workspaces: |
            . -> target

      # cache the tarpaulin binary to avoid reinstalling every run
      - name: Cache tarpaulin
        id: cache-tarpaulin
        uses: actions/cache@v4
        with:
          path: ~/.cargo/bin/cargo-tarpaulin
          key: ${{ runner.os }}-tarpaulin-${{ hashFiles('**/Cargo.lock') }}
          restore-keys: |
            ${{ runner.os }}-tarpaulin-

      - name: Install cargo-tarpaulin
        if: steps.cache-tarpaulin.outputs.cache-hit != 'true'
        run: cargo install cargo-tarpaulin

      - name: Run tarpaulin
        # Xml output is compatible with codecov and many other tools
        run: cargo tarpaulin --all-features --out Xml

      # archive the report as an artifact so it can be inspected
      - uses: actions/upload-artifact@v4
        with:
          name: coverage-report
          path: tarpaulin-report.xml