blob: ba49b7f59830a46dbee8a5ff19e4062a3283a38b (
plain)
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
|
name: Coverage
on:
push:
branches: [ master ]
jobs:
grcov:
name: Gather coverage data with grcov
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@master
with:
submodules: true
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
# toolchain: nightly
toolchain: nightly-2020-03-12 # latest nightly makes `quote` crash with -Zno-landing-pads
override: true
- name: Ensure workspace is clean
uses: actions-rs/cargo@v1
with:
command: clean
- name: Run tests with -Zprofile
uses: actions-rs/cargo@v1
with:
command: test
env:
CI_GRCOV: '1' # Tell the test harness to increase stack size
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads'
- name: Run grcov
id: grcov
uses: actions-rs/grcov@v0.1
- name: Upload coverage data to codecov.io
uses: codecov/codecov-action@v1
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ${{steps.grcov.outputs.report}}
|