studio-worker 0.4.3

Pull-based image-generation worker for the minis.gg studio.
Documentation
name: Checks

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

permissions:
  contents: read

jobs:
  checks:
    name: ${{ matrix.label }}
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        include:
          # Default build is now the windowed UI (rustls + ksni, no GTK,
          # dlopen GL) — the exact `cargo install studio-worker` path.
          - label: default-ui
            flags: ""
            fmt: true
          # Headless core (service / `run`), no UI deps.
          - label: headless
            flags: "--no-default-features"
            fmt: false
          # The fully-loaded release feature set: UI + in-process
          # llama.cpp + candle image + media.  Needs cmake (+ a C/C++
          # toolchain) for llama.cpp; clang for whisper isn't pulled here.
          - label: all-backends
            flags: "--features all"
            fmt: false
          # whisper static-links a second ggml that can't coexist with
          # llama's, so it ships in its own bundle — keep it compiling.
          - label: stt-backend
            flags: "--features all-engines-stt"
            fmt: false
    steps:
      - uses: actions/checkout@v6

      # The all-backends / stt-backend builds static-link candle +
      # whisper + llama (ggml), whose object files + the cache tarball
      # exhaust the runner's ~14 GB free disk.  Reclaim the ~25 GB of
      # preinstalled tooling we never use so the heavy matrix legs (and
      # their cache-save post-step) have headroom.
      - name: Free disk space
        run: |
          sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \
            /opt/hostedtoolcache/CodeQL /usr/local/share/boost
          sudo docker image prune --all --force || true
          df -h /

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

      - uses: swatinem/rust-cache@v2
        with:
          key: ${{ matrix.label }}

      - name: Check formatting
        if: matrix.fmt
        run: cargo fmt --check

      - name: Run clippy (tests too)
        run: cargo clippy --tests ${{ matrix.flags }} -- -D warnings

      - name: Compile check
        run: cargo check ${{ matrix.flags }}

      - name: Run tests
        run: cargo test ${{ matrix.flags }}