-
Notifications
You must be signed in to change notification settings - Fork 15
86 lines (78 loc) · 2.41 KB
/
rust.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Rust
on:
push:
branches: ["master"]
paths-ignore:
- "docs/**"
pull_request:
branches: ["master"]
paths-ignore:
- "docs/**"
env:
CARGO_TERM_COLOR: always
jobs:
code-coverage:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- name: Install deps
run: |
sudo apt-get update
sudo apt install -y libsoxr-dev libopus-dev libssl-dev libfdk-aac-dev
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "25.1"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Running cargo test
run: cargo test --all-features --workspace
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --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: false
cargo-deny:
name: cargo-deny
# TODO: remove this matrix when https://github.com/EmbarkStudios/cargo-deny/issues/324 is resolved
strategy:
fail-fast: false
matrix:
platform:
- x86_64-unknown-linux-gnu
# - x86_64-unknown-linux-musl
- aarch64-unknown-linux-gnu
# - arm-unknown-linux-gnueabihf
# - armv7-unknown-linux-gnueabihf
# - mips-unknown-linux-gnu
# - mips64-unknown-linux-gnuabi64
# - mips64el-unknown-linux-gnuabi64
# - mipsel-unknown-linux-gnu
# - aarch64-unknown-linux-musl
- x86_64-apple-darwin
- aarch64-apple-darwin
# - x86_64-pc-windows-gnu
# - x86_64-pc-windows-msvc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check
log-level: error
arguments: --all-features --target ${{ matrix.platform }}