name: Build & test with static deps

on:
  push:
    branches:
      - master
  pull_request:

env:
  CARGO_TERM_COLOR: always

jobs:
  build-and-test:
    name: Build and test
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        feature: ["vendored", "vendored,media"]
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: recursive
      - run: rustup update
      - run: cargo build --features ${{ matrix.feature }}
      - run: cargo fmt --check --all
      - run: cargo clippy --features ${{ matrix.feature }} -- -D warnings
      - run: cargo test --features ${{ matrix.feature }} --verbose
