zimhide 0.2.2

Zim Steganography Toolkit - WAV steganography CLI for embedding and extracting encrypted text/audio
name: CI

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

# IMPORTANT: This workflow ONLY calls `just` commands.
# The justfile is the source of truth for all build/test/lint logic.
# This prevents drift between local development and CI.

env:
  CARGO_TERM_COLOR: always

jobs:
  ci:
    name: CI
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]

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

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

      - name: Verify Rust version
        run: rustc --version && cargo --version && cargo clippy --version

      - name: Install libopus (Ubuntu)
        if: runner.os == 'Linux'
        run: sudo apt-get update && sudo apt-get install -y libopus-dev

      - name: Install libopus (macOS)
        if: runner.os == 'macOS'
        run: brew install opus

      - name: Install Just
        uses: extractions/setup-just@v2

      - name: Cache cargo registry
        uses: actions/cache@v4
        with:
          path: ~/.cargo/registry
          key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

      - name: Cache cargo index
        uses: actions/cache@v4
        with:
          path: ~/.cargo/git
          key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}

      - name: Cache cargo build
        uses: actions/cache@v4
        with:
          path: target
          key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}

      - name: Run CI checks (just ci)
        run: just ci