grim-rs 0.1.8

Rust implementation of grim screenshot utility for Wayland
Documentation
name: CI

on:
  push:
  pull_request:

permissions:
  contents: read

concurrency:
  group: ci-${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  checks:
    name: Checks
    runs-on: ubuntu-latest

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

      - name: Setup Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy

      - name: Cache cargo artifacts
        uses: Swatinem/rust-cache@v2

      - name: Format check
        run: cargo fmt --all -- --check

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

      - name: Build all targets
        run: cargo check --all-targets --all-features

      - name: Headless-safe tests and example builds
        run: |
          cargo test --all-features --lib --bins --tests --examples -- \
            --skip test_mock_capture \
            --skip test_scale_functionality \
            --skip test_ppm_format \
            --skip test_to_png \
            --skip test_to_jpeg

      - name: Build benches
        run: cargo bench --no-run --all-features