-
-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (34 loc) · 1022 Bytes
/
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
name: CodeCov
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
coverage:
runs-on: ubuntu-20.04
steps:
- name: Install packages
run: sudo apt install gcc-10 g++-10 libunwind-dev libdwarf-dev libelf-dev lcov
- uses: actions/checkout@v2
- name: run-cmake
uses: lukka/[email protected]
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeBuildType: Debug
buildDirectory: ${{ github.workspace }}/build
cmakeAppendedArgs: -DSWIMPS_ENABLE_COVERAGE=ON
env:
CC: gcc-10
CXX: g++-10
- name: run-tests
working-directory: ${{ github.workspace }}/build
run: ctest -VV
- name: run-lcov
working-directory: ${{ github.workspace }}/build
run: lcov --directory . --capture --output-file coverage.info
- name: Codecov
uses: codecov/[email protected]
with:
fail_ci_if_error: true
file: ${{ github.workspace }}/build/coverage.info