-
Notifications
You must be signed in to change notification settings - Fork 267
Expand file tree
/
Copy pathDockerfile_test
More file actions
54 lines (43 loc) · 1.26 KB
/
Copy pathDockerfile_test
File metadata and controls
54 lines (43 loc) · 1.26 KB
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
# vim: ft=dockerfile
FROM ubuntu:24.04
LABEL org.opencontainers.image.authors="Oleg Morozenkov <m@oleg.rocks>"
ARG MAKEFLAGS
ARG CMAKE_INSTALL_MESSAGE
ARG CMAKE_LOG_LEVEL
RUN apt-get -qq update && \
DEBIAN_FRONTEND=noninteractive apt-get -qq install -y \
build-essential \
cmake \
python3 \
python3-pip \
python3-venv >/dev/null && \
rm -rf /var/lib/apt/lists/*
RUN python3 -m venv /opt/conan && \
/opt/conan/bin/pip install --quiet --disable-pip-version-check --no-cache-dir \
"clang-format==22.1.8" \
"conan==2.31.1" \
"gcovr==8.6" \
"poetry==2.4.1"
ENV PATH="/opt/conan/bin:${PATH}"
WORKDIR /usr/src/tgbot-cpp
COPY conanfile.py Makefile poetry.lock pyproject.toml ./
ENV BUILD_TYPE=Debug
ENV ENABLE_SANITIZERS=ON
ENV ENABLE_COVERAGE=ON
ENV ASAN_OPTIONS=detect_leaks=1:halt_on_error=1
ENV UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1
RUN make dependencies-with-test
COPY include include
COPY src src
COPY tests tests
COPY examples examples
COPY api api
COPY api_codegen api_codegen
COPY cmake cmake
COPY .clang-format ./
COPY CMakeLists.txt ./
COPY coverage_summary.py ./
RUN make build-with-test && \
make install-only
RUN make examples
CMD ["make", "test-only", "test-api-codegen"]