summaryrefslogtreecommitdiffstats
path: root/.circleci/images/rust-libical3-kcov/Dockerfile
blob: 3a0e20fd35745cee86d17f6dc0d2f5a5e34b5acc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#FROM debian:buster
FROM puzzlewolf/rust-libical3:0.5

ARG KCOV_GIT_REF

RUN apt-get update
# install pkg-config deliberately separate since it sometimes fails :( If it eventually
# is installed we do not repeat the whole image build.
#RUN apt-get install -y --fix-missing pkg-config
RUN apt-get install -y wget libcurl4-openssl-dev libelf-dev libdw-dev cmake cmake-data g++ binutils-dev \
                       libiberty-dev
#RUN apt-get install -y libical-dev

ENV SRC_DIR=/home/kcov-src \
    URL_GIT_KCOV=https://github.com/SimonKagstrom/kcov.git

RUN git clone $URL_GIT_KCOV $SRC_DIR; \
    cd $SRC_DIR; \
    # default to latest tagged version
    DEFAULT_KCOV_GIT_REF=$(git tag --list | grep "^v[0-9]\+$" | sort -V | tail --lines 1); \
    KCOV_GIT_REF=${KCOV_GIT_REF:-$DEFAULT_KCOV_GIT_REF}; \
    git reset --hard $KCOV_GIT_REF;

RUN cd $SRC_DIR && \
    mkdir build && \
    cd build && \
    cmake .. && \
    make && \
    make install

ENTRYPOINT ["kcov"]
CMD ["--help"]