-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (34 loc) · 1.25 KB
/
coverage.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
name: coverage instrument based
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy, llvm-tools-preview
- name: Install lcov
run: sudo apt-get install lcov
- name: install grcov
run: cargo install grcov
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run grcov
env:
PROJECT_NAME: "havocompare"
RUSTFLAGS: "-Cinstrument-coverage -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
CARGO_INCREMENTAL: 0
run: |
cargo +nightly build --verbose
cargo +nightly test --verbose
grcov . -s . --binary-path ./target/debug/ -t lcov --llvm --branch --ignore-not-existing --ignore="/*" --ignore="target/*" --ignore="tests/*" -o lcov.info
- name: Push grcov results to Coveralls via GitHub Action
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: "lcov.info"