libviprs 0.1.4

A pure-Rust, thread-safe image pyramiding engine for blueprint PDFs and raster images
Documentation
name: CI

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

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: -Dwarnings

jobs:
  check:
    name: Check & Lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy, rustfmt
      - uses: Swatinem/rust-cache@v2
      - run: cargo fmt -- --check
      - run: cargo clippy --all-targets -- -D warnings -W clippy::incompatible_msrv -W deprecated
      - run: cargo clippy --all-targets --features pdfium -- -D warnings -W clippy::incompatible_msrv -W deprecated

  msrv:
    name: MSRV (1.85)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@1.85
      - uses: Swatinem/rust-cache@v2
      - run: cargo check --all-targets
      - run: cargo check --all-targets --features pdfium

  test:
    name: Test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - run: cargo test

  integration-test:
    name: Integration Tests (libviprs-tests)
    runs-on: ubuntu-latest
    steps:
      # Check out libviprs at the current branch/PR ref into the "libviprs" subdirectory.
      # libviprs-tests depends on { path = "../libviprs" }, so the two repos must be siblings.
      - uses: actions/checkout@v4
        with:
          path: libviprs
      - name: Clone libviprs-tests (matching branch or main)
        run: |
          BRANCH="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}"
          git clone --depth 1 --branch "$BRANCH" https://github.com/${{ github.repository_owner }}/libviprs-tests.git libviprs-tests 2>/dev/null \
            || git clone --depth 1 https://github.com/${{ github.repository_owner }}/libviprs-tests.git libviprs-tests
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
        with:
          workspaces: libviprs-tests
      - name: Run integration tests
        working-directory: libviprs-tests
        run: cargo test