2019-07-05 15:12:18 +00:00
|
|
|
# docker build -t yandex/clickhouse-coverage .
|
2020-08-27 10:17:17 +00:00
|
|
|
ARG PARENT_TAG=latest
|
|
|
|
FROM yandex/clickhouse-test-base:${PARENT_TAG}
|
2019-07-05 15:12:18 +00:00
|
|
|
|
|
|
|
ENV COVERAGE_DIR=/coverage_reports
|
|
|
|
ENV SOURCE_DIR=/build
|
|
|
|
ENV OUTPUT_DIR=/output
|
2019-07-05 15:18:48 +00:00
|
|
|
ENV IGNORE='.*contrib.*'
|
|
|
|
|
2020-11-20 08:48:06 +00:00
|
|
|
RUN apt-get update && apt-get install cmake --yes --no-install-recommends
|
|
|
|
|
|
|
|
CMD mkdir -p /build/obj-x86_64-linux-gnu && cd /build/obj-x86_64-linux-gnu && CC=clang-11 CXX=clang++-11 cmake .. && cd /; \
|
2019-07-08 11:09:46 +00:00
|
|
|
dpkg -i /package_folder/clickhouse-common-static_*.deb; \
|
2020-11-20 08:48:06 +00:00
|
|
|
llvm-profdata-11 merge -sparse ${COVERAGE_DIR}/* -o clickhouse.profdata && \
|
|
|
|
llvm-cov-11 export /usr/bin/clickhouse -instr-profile=clickhouse.profdata -j=16 -format=lcov -skip-functions -ignore-filename-regex $IGNORE > output.lcov && \
|
2019-07-08 10:46:04 +00:00
|
|
|
genhtml output.lcov --ignore-errors source --output-directory ${OUTPUT_DIR}
|