mpv-engine 0.1.0

Toolkit-agnostic libmpv embedding core: handle lifecycle, commands, typed events, and render seams.
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

permissions:
  contents: read

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: test (stable)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      # rsmpv-sys links libmpv via pkg-config; the headless tests generate
      # their media with ffmpeg (and skip themselves when it's missing).
      - name: Install libmpv and ffmpeg
        run: |
          sudo apt-get update
          sudo apt-get install -y --no-install-recommends libmpv-dev ffmpeg
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - run: cargo test --locked --all-targets
      - run: cargo test --locked --doc

  msrv:
    name: check (MSRV 1.85)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@1.85
      - uses: Swatinem/rust-cache@v2
      # check doesn't link, so no libmpv needed: rsmpv-sys's build script
      # degrades to a bare `rustc-link-lib` when pkg-config finds nothing.
      - run: cargo check --locked --all-targets

  lint:
    name: fmt + clippy + doc
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo fmt --check
      - run: cargo clippy --locked --all-targets -- -D warnings
      - run: cargo doc --locked --no-deps
        env:
          RUSTDOCFLAGS: -D warnings