pixhunt 0.5.0

Fast, low-dependency screen finding: template matching (RGB tolerance / ZNCC), color-blob search and wait/poll APIs, with pluggable capture backends (GDI / DXGI / PrintWindow window capture).
name: CI

on:
  push:
    branches: [master]
  pull_request:

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: build & test (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest]
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@v2

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

      - name: Build (default features)
        run: cargo build --release

      - name: Test (default features)
        run: cargo test --release

      - name: Test (parallel)
        run: cargo test --release --features parallel

      - name: Test (all features) [windows]
        if: matrix.os == 'windows-latest'
        run: cargo test --release --all-features

      - name: Test (match-corr) [linux]
        if: matrix.os == 'ubuntu-latest'
        run: cargo test --release --features match-corr

      - name: Test (match-corr + parallel) [linux]
        if: matrix.os == 'ubuntu-latest'
        run: cargo test --release --features match-corr,parallel

      - name: Clippy (default features)
        run: cargo clippy --release --all-targets -- -D warnings

      - name: Clippy (all features) [windows]
        if: matrix.os == 'windows-latest'
        run: cargo clippy --release --all-targets --all-features -- -D warnings

      - name: Clippy (match-corr) [linux]
        if: matrix.os == 'ubuntu-latest'
        run: cargo clippy --release --all-targets --features match-corr -- -D warnings