-
Notifications
You must be signed in to change notification settings - Fork 249
/
Dockerfile_test
81 lines (66 loc) · 2.17 KB
/
Dockerfile_test
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
FROM ubuntu:jammy
MAINTAINER Oleg Morozenkov <m@oleg.rocks>
RUN apt-get -qq update && \
apt-get -qq install -y \
autotools-dev \
binutils \
build-essential \
cmake \
g++ \
libboost-all-dev \
libbz2-dev \
libcurl4-openssl-dev \
libicu-dev \
libssl-dev \
make \
python2.7-dev \
wget \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/tgbot-cpp
COPY include include
COPY src src
COPY test test
COPY CMakeLists.txt ./
RUN cmake -DENABLE_TESTS=ON . && \
make -j$(nproc) && \
make install
COPY samples samples
WORKDIR /usr/src/tgbot-cpp/samples/echobot
RUN rm -rf CMakeCache.txt CMakeFiles/ && \
cmake . && make -j$(nproc)
WORKDIR /usr/src/tgbot-cpp/samples/echobot-curl-client
RUN rm -rf CMakeCache.txt CMakeFiles/ && \
cmake . && make -j$(nproc)
WORKDIR /usr/src/tgbot-cpp/samples/echobot-setmycommands
RUN rm -rf CMakeCache.txt CMakeFiles/ && \
cmake . && make -j$(nproc)
WORKDIR /usr/src/tgbot-cpp
RUN rm -rf samples/echobot-submodule/tgbot-cpp/
COPY include samples/echobot-submodule/tgbot-cpp/include
COPY src samples/echobot-submodule/tgbot-cpp/src
COPY CMakeLists.txt samples/echobot-submodule/tgbot-cpp/
WORKDIR /usr/src/tgbot-cpp/samples/echobot-submodule
RUN rm -rf CMakeCache.txt CMakeFiles/ && \
cmake . && make -j$(nproc)
WORKDIR /usr/src/tgbot-cpp/samples/echobot-webhook-server
RUN rm -rf CMakeCache.txt CMakeFiles/ && \
cmake . && make -j$(nproc)
WORKDIR /usr/src/tgbot-cpp/samples/inline-keyboard
RUN rm -rf CMakeCache.txt CMakeFiles/ && \
cmake . && make -j$(nproc)
WORKDIR /usr/src/tgbot-cpp/samples/photo
RUN rm -rf CMakeCache.txt CMakeFiles/ && \
cmake . && make -j$(nproc)
WORKDIR /usr/src/tgbot-cpp/samples/received-text-processing
RUN rm -rf CMakeCache.txt CMakeFiles/ && \
cmake . && make -j$(nproc)
WORKDIR /usr/src/tgbot-cpp/samples/reply-keyboard
RUN rm -rf CMakeCache.txt CMakeFiles/ && \
cmake . && make -j$(nproc)
WORKDIR /usr/src/tgbot-cpp/samples/receive-file
RUN rm -rf CMakeCache.txt CMakeFiles/ && \
cmake . && make -j$(nproc)
WORKDIR /usr/src/tgbot-cpp
ENV CTEST_OUTPUT_ON_FAILURE=1
CMD make test