name: ci
on:
push:
pull_request:
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install Linux deps
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libv4l-dev libclang-dev pkg-config v4l-utils
- name: Format check
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Test
run: cargo test --all-targets --all-features
- name: Coverage
if: runner.os == 'Linux'
run: |
cargo install cargo-tarpaulin
cargo tarpaulin --lib --ignore-tests --skip-clean --no-fail-fast --out xml