forked from ZigRazor/CXXGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (44 loc) · 1.7 KB
/
Copy pathCode_Coverage.yml
File metadata and controls
55 lines (44 loc) · 1.7 KB
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
# This is a basic workflow that is manually triggered
name: Code Coverage
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
codacy-coverage-reporter:
runs-on: ubuntu-latest
name: codecov-coverage-reporter
steps:
- name: Install gtest manually
run: sudo apt-get install libgtest-dev
- name: Install benchmark manually
run: |
git clone https://github.com/google/benchmark.git
git clone https://github.com/google/googletest.git benchmark/googletest
cd benchmark
cmake -E make_directory "build"
cmake -E chdir "build" cmake -DCMAKE_BUILD_TYPE=Release ../
cmake --build "build" --config Release
sudo cmake --build "build" --config Release --target install
- name: Install tools manually
run: sudo apt-get install lcov gcovr
- uses: actions/checkout@v2
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCODE_COVERAGE=ON
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build
- name: run
working-directory: ${{github.workspace}}/build
run: ./test_exe
- name: create Report
working-directory: ${{github.workspace}}/build
run: lcov --capture --directory .. --output-file coverage.info
- uses: codecov/codecov-action@v1.5.2
with:
#token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
file: ./build/coverage.info # optional
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)