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
- 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
- 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