targrep 0.6.0

Search inside compressed log archives (.tgz, .tar.zst, .tar.xz) with ripgrep's flags and per-member line numbers
Documentation
name: CI

on:
  push:
    branches: [master]
  pull_request:

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: test (${{ matrix.os }})
    # Linux is the production platform and the only one where the page-cache
    # residency tests run (tests/residency.rs is `cfg(target_os = "linux")`);
    # macOS is where trg is developed.
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy
      - uses: Swatinem/rust-cache@v2

      # The differential tests use rg as the line-number oracle. cmake, for the
      # default zlib-ng backend, is preinstalled on both runner images.
      - name: Install ripgrep
        run: |
          if [ "$RUNNER_OS" = Linux ]; then
            sudo apt-get update -q && sudo apt-get install -y -q ripgrep
          else
            brew install ripgrep
          fi

      - name: Test
        run: cargo test

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

  msrv:
    # Must match `rust-version` in Cargo.toml. A build with the committed
    # Cargo.lock, so it fails when a dependency update needs a newer compiler.
    name: check (Rust 1.88)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@1.88
      - uses: Swatinem/rust-cache@v2
      - name: Check
        run: cargo check --locked --all-targets

  no-default-features:
    # The README's fallback for hosts without cmake: pure-Rust miniz_oxide
    # instead of zlib-ng. Nothing else builds it, so it would rot unnoticed.
    name: test (no default features)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - name: Install ripgrep
        run: sudo apt-get update -q && sudo apt-get install -y -q ripgrep
      - name: Test
        run: cargo test --no-default-features