hook-inject 0.1.0

Cross-platform process injection via Frida Core.
name: CI

on:
  push:
  pull_request:

jobs:
  lint:
    name: Lint (fmt + clippy)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - name: Check formatting
        run: cargo fmt --all -- --check
      - name: Clippy
        run: cargo clippy --workspace --all-targets -- -D warnings

  test:
    name: Tests (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os:
          [
            ubuntu-latest,
            ubuntu-22.04,
            macos-latest,
            macos-14,
            windows-latest,
            windows-2022,
          ]
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - name: Relax ptrace restrictions (Linux)
        if: matrix.os == 'ubuntu-latest'
        run: sudo sysctl -w kernel.yama.ptrace_scope=0
      - name: Enable task_for_pid permissions (macOS)
        if: matrix.os == 'macos-latest'
        run: |
          sudo /usr/sbin/DevToolsSecurity -enable
          sudo /usr/sbin/dseditgroup -o edit -a "$USER" -t user _developer || true
          sudo /usr/bin/security authorizationdb write system.privilege.taskport allow
      - name: Run workspace tests (macOS)
        if: matrix.os == 'macos-latest'
        run: sudo -E cargo test --workspace --all-targets -- --nocapture
      - name: Run workspace tests
        if: matrix.os != 'macos-latest'
        run: cargo test --workspace --all-targets -- --nocapture