Skip to content

Commit e0b03fb

Browse files
committed
Added Windows CI builds for targeted code coverage
Windows has regular Clang available, and the associated LLVm tools to support code coverage, best to make sure it works.
1 parent 9249eca commit e0b03fb

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

Diff for: .gitlab-ci.yml

+65
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,37 @@ Targeted CC Clang Shared:
9999
- ninja -C build ccov
100100
- ninja -C build ccov-report
101101

102+
Targeted CC Clang Static (Windows):
103+
image: stabletec/build-core:windows
104+
stage: Targeted Code Coverage
105+
tags:
106+
- docker-windows
107+
- amd64
108+
variables:
109+
CC: clang
110+
CXX: clang++
111+
script:
112+
- cmake example/code-coverage-target/ -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DCODE_COVERAGE=ON ${CMAKE_OPTIONS}
113+
- ninja -C build
114+
- ninja -C build ccov
115+
- ninja -C build ccov-report
116+
117+
Targeted CC Clang Shared (Windows):
118+
image: stabletec/build-core:windows
119+
stage: Targeted Code Coverage
120+
tags:
121+
- docker-windows
122+
- amd64
123+
variables:
124+
CC: clang
125+
CXX: clang++
126+
CMAKE_OPTIONS: -DBUILD_SHARED_LIBS=ON
127+
script:
128+
- cmake example/code-coverage-target/ -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DCODE_COVERAGE=ON ${CMAKE_OPTIONS}
129+
- ninja -C build
130+
- ninja -C build ccov
131+
- ninja -C build ccov-report
132+
102133
# All Code Coverage
103134

104135
All CC GCC Static:
@@ -166,6 +197,40 @@ All CC Clang Shared:
166197
- ninja -C build ccov-report
167198
- ninja -C build ccov-all-report
168199

200+
All CC Clang Static (Windows):
201+
image: stabletec/build-core:windows
202+
stage: All Code Coverage
203+
tags:
204+
- docker-windows
205+
- amd64
206+
variables:
207+
CC: clang
208+
CXX: clang++
209+
script:
210+
- cmake example/code-coverage-all/ -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DCODE_COVERAGE=ON ${CMAKE_OPTIONS}
211+
- ninja -C build
212+
- ninja -C build ccov-all
213+
- ninja -C build ccov-report
214+
- ninja -C build ccov-all-report
215+
216+
All CC Clang Shared (Windows):
217+
image: stabletec/build-core:windows
218+
stage: All Code Coverage
219+
tags:
220+
- docker-windows
221+
- amd64
222+
variables:
223+
CC: clang
224+
CXX: clang++
225+
CMAKE_OPTIONS: -DBUILD_SHARED_LIBS=ON
226+
script:
227+
- cmake example/code-coverage-all/ -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DCODE_COVERAGE=ON ${CMAKE_OPTIONS}
228+
- ninja -C build
229+
- ninja -C build ccov
230+
- ninja -C build ccov-all
231+
- ninja -C build ccov-report
232+
- ninja -C build ccov-all-report
233+
169234
# Fedora
170235

171236
.fedora_success_template: &fedora_success_template

Diff for: code-coverage.cmake

+6
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,12 @@ function(add_code_coverage_all_targets)
484484
"The ccov-all-processing target is a stub on Windows, individual ccov targets still work"
485485
)
486486

487+
add_custom_target(
488+
ccov-all-report
489+
COMMENT
490+
"The ccov-all-report target is a stub on Windows, individual ccov targets still work"
491+
DEPENDS ccov-all-processing)
492+
487493
add_custom_target(
488494
ccov-all
489495
COMMENT

0 commit comments

Comments
 (0)