resource-tracker 0.1.6

Lightweight Linux resource and GPU tracker for system and process monitoring.
name: CI

on: [push]

jobs:
  test:
    name: Test (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest       # x86_64
          - ubuntu-24.04-arm    # arm64

    steps:
      - name: Checkout
        uses: actions/checkout@v6.0.2

      - name: Install Rust toolchain (stable)
        uses: dtolnay/rust-toolchain@stable

      - name: Install uv
        uses: astral-sh/setup-uv@v8.1.0
        with:
          enable-cache: false   # no uv.lock in repo; we use `uv run --with`

      - name: Cache cargo registry and build artifacts
        uses: actions/cache@v5.0.5
        with:
          path: |
            ~/.cargo/registry/index
            ~/.cargo/registry/cache
            ~/.cargo/git/db
            target
          key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('Cargo.lock') }}
          restore-keys: |
            ${{ runner.os }}-${{ runner.arch }}-cargo-

      - name: Formatting check
        run: cargo fmt --check

      - name: Build (debug)
        run: cargo build --locked

      - name: Unit tests (in-binary)
        run: cargo test --locked --bins

      - name: Integration tests (smoke)
        run: cargo test --locked --test smoke

      # Python vs Rust CSV comparison.  Timing-sensitive I/O columns (disk
      # write, network) are known to diverge under load; the step is allowed
      # to fail without blocking the overall CI result.
      - name: Comparison test (Python vs Rust CSV)
        run: cargo test --locked --test compare -- --nocapture
        continue-on-error: true

      - name: Release build (zero-warning check)
        run: cargo build --locked --release
        env:
          RUSTFLAGS: "-D warnings"