-
Notifications
You must be signed in to change notification settings - Fork 136
46 lines (36 loc) · 1.2 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
45
46
name: coverage
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
build-and-test:
name: Coverage on Ubuntu 18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install dependencies
run: sudo apt install lcov
- name: make build directory
run: mkdir build_dir
- name: cmake configure
run: cmake .. -DTESTING:BOOL=ON -DPRECISION:STRING=2 -DQUEST_ENABLE_COVERAGE:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Debug
working-directory: build_dir
- name: cmake build
run: cmake --build . --parallel 2 --target tests
working-directory: build_dir
- name: cmake test
run: ctest -j2 --output-on-failure --timeout 5000
working-directory: build_dir
- name: upload coverage results
run: |
lcov --directory . --capture --output-file coverage.info
lcov --remove coverage.info '/usr/*' '*/tests/*' --output-file coverage.info
lcov --list coverage.info
bash <(curl https://codecov.io/bash) -f coverage.info -t 4f2a3b14-8095-447e-a58d-863c2538b35b
working-directory: build_dir