summaryrefslogtreecommitdiff
path: root/Dockerfile_test
blob: e1093bf4d514fb78ee427d34cddaecd74afbfff6 (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:stretch
MAINTAINER Oleg Morozenkov <a@reo7sp.ru>

RUN apt-get -qq update && \
	apt-get -qq install -y g++ make binutils cmake libssl-dev libboost-system-dev libboost-test-dev libcurl4-openssl-dev

WORKDIR /tmp/tgbot-cpp
COPY include include
COPY src src
COPY test test
COPY samples samples
COPY CMakeLists.txt ./

RUN cmake -DENABLE_TESTS=ON . && \
	make -j4 && \
	make install

WORKDIR /tmp/tgbot-cpp/samples/echobot
RUN rm -rf CMakeCache.txt CMakeFiles/ && \
    cmake . && make -j4

WORKDIR /tmp/tgbot-cpp/samples/inline-keyboard
RUN rm -rf CMakeCache.txt CMakeFiles/ && \
    cmake . && make -j4

WORKDIR /tmp/tgbot-cpp/samples/photo
RUN rm -rf CMakeCache.txt CMakeFiles/ && \
    cmake . && make -j4

WORKDIR /tmp/tgbot-cpp
ENV CTEST_OUTPUT_ON_FAILURE=1
CMD make test