-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (60 loc) · 1.72 KB
/
validate.yaml
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
name: Validate
on: pull_request
jobs:
test:
name: Test
strategy:
matrix:
os: [
ubuntu-latest,
windows-latest,
macos-latest
]
target: [
aarch64-unknown-linux-gnu,
armv7-unknown-linux-gnueabi,
x86_64-unknown-linux-gnu,
i686-unknown-linux-gnu
]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
run: rustup update --no-self-update stable
- name: Install Rust target
run: rustup target add ${{ matrix.target }}
- name: Install cross
run: cargo install cross
- name: Test the library
run: cargo test --target ${{ matrix.target }}
coverage:
env:
RUSTFLAGS: "-C instrument-coverage"
LLVM_PROFILE_FILE: "ms1553b-%p-%m.profraw"
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
run: rustup update --no-self-update stable
- name: Install grcov
run: |
rustup component add llvm-tools-preview &&
cargo install grcov
- name: Build the library
run: cargo test --no-run
- name: Test the library
run: cargo test
- name: Generate code coverage
run: grcov . -s . -b target/debug -t cobertura --branch --ignore-not-existing --keep-only 'src/**/*' -o .
- name: Make coverage report
uses: 5monkeys/cobertura-action@v13
with:
path: ./cobertura.xml
report_name: Coverage
skip_covered: false
only_changed_files: false
fail_below_threshold: true
minimum_coverage: 95