File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 build :
77 runs-on : ubuntu-24.04
88 container :
9- image : giomba/ceda-cemu-builder:3
9+ image : giomba/ceda-cemu-builder:4
1010 options : --user root
1111 steps :
1212 - name : Checkout repository
2323 - name : Test
2424 run : |
2525 script/test
26+ - name : Coverage
27+ run : |
28+ script/coverage
2629
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ set_source_files_properties(src/3rd/disassembler.c PROPERTIES COMPILE_FLAGS -Wno
7272# Automatically add targets, with same properties
7373function (add_ceda_target target )
7474
75- target_compile_options (${target} PRIVATE -W -Wformat -Wall -Wundef -Wpointer-arith -Wcast-qual -Wwrite-strings -Wsign-compare -Wmissing-noreturn -Wextra -Wconversion )
75+ target_compile_options (${target} PRIVATE -W -Wformat -Wall -Wundef -Wpointer-arith -Wcast-qual -Wwrite-strings -Wsign-compare -Wmissing-noreturn -Wextra -Wconversion -coverage )
7676
7777 if (CMAKE_BUILD_TYPE MATCHES "Release" )
7878 target_compile_options (${target} PRIVATE -Werror )
@@ -86,6 +86,7 @@ function(add_ceda_target target)
8686 SDL3_mixer
8787 inih
8888 )
89+ target_link_options (${target} PRIVATE -coverage )
8990
9091 set_target_properties (${target} PROPERTIES C_CLANG_TIDY "${CLANG_TIDY_COMMAND} " )
9192
Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ RUN cd /build && \
3737 meson install -C build && \
3838 ldconfig
3939
40+ RUN apt install -y gcovr
41+
4042RUN useradd -s /bin/bash --create-home builder
4143USER builder
4244RUN mkdir -p /home/builder/workspace
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -euo pipefail
4+
5+ pushd build.release
6+ ctest -T coverage
7+
8+ pushd Testing/CoverageInfo
9+ gcovr --root ../../.. --html-details coverage.html
10+
11+ popd
12+ popd
13+
14+
Original file line number Diff line number Diff line change @@ -12,5 +12,5 @@ docker run --rm -ti -u ubuntu \
1212 -v " $( pwd) " :/home/ubuntu/workspace \
1313 -v /tmp:/tmp \
1414 -w /home/ubuntu/workspace \
15- giomba/ceda-cemu-builder:3 \
15+ giomba/ceda-cemu-builder:4 \
1616 " $@ "
You can’t perform that action at this time.
0 commit comments