d75d5585f5
We're likely to add more examples with more dependencies (e.g. ffmpeg, gstreamer, webrtc). Nice to not have their deps in the main crate's dev-dependencies, and likewise to have each example show its true dependencies. As mentioned here: https://github.com/scottlamb/retina/issues/19#issuecomment-902302720
64 lines
1.7 KiB
YAML
64 lines
1.7 KiB
YAML
name: CI
|
|
on: [push, pull_request]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUST_BACKTRACE: 1
|
|
|
|
jobs:
|
|
rust:
|
|
name: Test
|
|
strategy:
|
|
matrix:
|
|
rust:
|
|
- stable
|
|
- 1.59
|
|
include:
|
|
- rust: stable
|
|
extra_components: rustfmt
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: ${{ matrix.rust }}
|
|
override: true
|
|
components: ${{ matrix.extra_components }}
|
|
- name: Build
|
|
run: cargo build --all-features --all-targets --workspace
|
|
- name: Test
|
|
run: cargo test --all-features --all-targets --workspace
|
|
- name: Check fuzz tests
|
|
run: cd fuzz && cargo check --workspace
|
|
- name: Check main crate formatting
|
|
if: matrix.rust == 'stable'
|
|
run: cargo fmt -- --check
|
|
- name: Check fuzz crate formatting
|
|
if: matrix.rust == 'stable'
|
|
run: cd fuzz && cargo fmt -- --check --all
|
|
- name: Clippy on main crate
|
|
if: matrix.rust == 'stable'
|
|
run: cargo clippy --workspace -- -D warnings
|
|
- name: Clippy on fuzz crate
|
|
if: matrix.rust == 'stable'
|
|
run: cd fuzz && cargo clippy --workspace -- -D warnings
|
|
|
|
license:
|
|
name: Check copyright/license headers
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- run: find . -type f -print0 | xargs -0 .github/workflows/check-license.py
|