-
Notifications
You must be signed in to change notification settings - Fork 36
46 lines (42 loc) · 1.48 KB
/
rust_check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Build
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: |
rustfmt --version
cargo fmt --all -- --check
- name: Check compilation
run: |
rustc --version
cargo check --all --features transcoding-cache,tags-encoding
- name: Clippy check
run: cargo clippy --all --features transcoding-cache,tags-encoding
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y openssl libssl-dev pkg-config ffmpeg yasm build-essential wget libbz2-dev zlib1g-dev libavformat-dev
- name: Run unit tests
run: cargo test --all --features transcoding-cache,tags-encoding
- name: Run integration tests
if: gihub.ref == 'refs/heads/mater'
run: cargo test -- --ignored --nocapture test_binary
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --all --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: lcov.info
fail_ci_if_error: true