Skip to content

Commit af0b3e6

Browse files
ci: Add code coverage report
1 parent 8ae56e3 commit af0b3e6

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

.cirrus.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,37 @@ merge_base_script_snippet: &MERGE_BASE
4343
- git config --global user.name "ci"
4444
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts
4545

46+
task:
47+
name: Code coverage
48+
container:
49+
dockerfile: ci/linux-debian.Dockerfile
50+
cpu: 1
51+
memory: 1G
52+
env:
53+
EXTRAFLAGS: "--enable-coverage"
54+
ASM: no
55+
ECDH: yes
56+
RECOVERY: yes
57+
EXPERIMENTAL: yes
58+
SCHNORRSIG: yes
59+
CTIMETEST: no
60+
BENCH: no
61+
matrix:
62+
- env:
63+
WIDEMUL: int128
64+
STATICPRECOMPUTATION: yes
65+
- env:
66+
WIDEMUL: int64
67+
STATICPRECOMPUTATION: no
68+
<< : *MERGE_BASE
69+
test_script:
70+
- ./ci/cirrus.sh
71+
<< : *CAT_LOGS
72+
gcovr_script:
73+
- gcovr --print-summary --exclude 'src/bench*' --html --html-title "${CIRRUS_CHANGE_IN_REPO:0:7}, STATICPRECOMPUTATION=$STATICPRECOMPUTATION, WIDEMUL=$WIDEMUL" --html-details -o index.html
74+
coverage_report_artifacts:
75+
path: "**.html"
76+
4677
task:
4778
name: "x86_64: Linux (Debian stable)"
4879
container:
@@ -312,4 +343,3 @@ task:
312343
test_script:
313344
- ./ci/cirrus.sh
314345
<< : *CAT_LOGS
315-

ci/linux-debian.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ RUN apt-get update
1111
# llvm: for llvm-symbolizer, which is used by clang's UBSan for symbolized stack traces
1212
RUN apt-get install --no-install-recommends --no-upgrade -y \
1313
git ca-certificates \
14-
make automake libtool pkg-config dpkg-dev valgrind qemu-user \
14+
make automake libtool pkg-config dpkg-dev valgrind qemu-user gcovr \
1515
gcc clang llvm libc6-dbg \
1616
gcc-i686-linux-gnu libc6-dev-i386-cross libc6-dbg:i386 libubsan1:i386 libasan5:i386 \
1717
gcc-s390x-linux-gnu libc6-dev-s390x-cross libc6-dbg:s390x \

0 commit comments

Comments
 (0)