50
50
# mingw is determined by this author to be too buggy to support
51
51
- os : windows-2019
52
52
compiler : gcc-8
53
-
54
- # - os: windows-2019
55
- # compiler: llvm
56
-
57
53
# These have anonalous failures, not sure what is up with no access to a physical Mac.
58
54
- os : macos-10.15
59
55
compiler : gcc-8
67
63
68
64
69
65
include :
66
+ # setup gcov variables for extra compiler versions
67
+ - compiler : llvm
68
+ gcov : " llvm-cov gcov"
69
+ - compiler : gcc-8
70
+ gcov : " gcov-8"
71
+
70
72
# This exists solely to make sure a non-multiconfig build works
71
73
- os : ubuntu-20.04
72
74
compiler : gcc
75
+ gcov : gcov
73
76
generator : " Unix Makefiles"
74
77
build_type : Debug
75
78
developer_mode : On
@@ -118,7 +121,7 @@ jobs:
118
121
restore-keys : |
119
122
${{ runner.os }}-${{ matrix.compiler }}-${{matrix.build_type}}-${{matrix.generator}}-${{matrix.developer_mode}}
120
123
121
- - run : pip3 install conan gcovr cmake ninja
124
+ - run : pip3 install conan cmake ninja
122
125
123
126
- name : Setup Cpp
124
127
uses : aminya/setup-cpp@v1
@@ -135,12 +138,12 @@ jobs:
135
138
136
139
cppcheck : true
137
140
138
- gcovr : false
141
+ gcovr : true
139
142
opencppcoverage : true
140
143
141
144
- name : Configure CMake
142
145
run : |
143
- cmake -S . -B ./build -G "${{matrix.generator}}" -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -DENABLE_DEVELOPER_MODE:BOOL=${{matrix.developer_mode}} -DENABLE_LARGE_TESTS:BOOL=${{matrix.large_tests}} -DOPT_ENABLE_COVERAGE:BOOL=TRUE
146
+ cmake -S . -B ./build -G "${{matrix.generator}}" -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -DENABLE_DEVELOPER_MODE:BOOL=${{matrix.developer_mode}} -DENABLE_LARGE_TESTS:BOOL=${{matrix.large_tests}} -DOPT_ENABLE_COVERAGE:BOOL=${{ matrix.build_type == 'Debug' }}
144
147
145
148
- name : Build
146
149
# Execute the build. You can specify a specific target with "--target <NAME>"
@@ -154,13 +157,17 @@ jobs:
154
157
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
155
158
run : |
156
159
ctest -C ${{matrix.build_type}}
157
- gcovr -j ${{env.nproc}} --delete --root ../ --print-summary --xml-pretty --xml coverage.xml .
160
+ pwd
161
+ which gcov
162
+ gcov --version
163
+ gcovr --version
164
+ gcovr -j ${{env.nproc}} --root ../ --print-summary --xml-pretty --xml coverage.xml . --verbose --gcov-executable '${{matrix.gcov}}'
158
165
159
166
- name : Windows - Test and coverage
160
167
if : runner.os == 'Windows'
161
168
working-directory : ./build
162
169
run : |
163
- OpenCppCoverage.exe --sources cpp_starter_project -- export_type cobertura:coverage.xml --cover_children -- ctest -C ${{matrix.build_type}}
170
+ OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children -- ctest -C ${{matrix.build_type}}
164
171
165
172
- name : Publish to codecov
166
173
uses : codecov/codecov-action@v2
0 commit comments