-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
75 lines (71 loc) · 1.95 KB
/
Dockerfile
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
FROM ubuntu:jammy
ARG GCC_VERSION="11"
RUN apt-get update && \
apt-get install -y \
apt-transport-https \
build-essential \
git autoconf \
libtool pkg-config \
libsqlite3-dev \
zlib1g-dev \
graphviz \
libacl1-dev \
libcap-dev \
cppcheck \
python3-pip \
lsb-release \
software-properties-common \
wget \
gcc-${GCC_VERSION} \
g++-${GCC_VERSION} \
cmake \
clang \
# clang-doc \
clang-format \
clang-tidy \
clang-tools \
clangd \
libc++-dev \
libc++abi-dev \
libclang-dev \
# libclang-common-dev \
libclang1 \
# liblldb \
python3-clang \
python3-lldb \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${GCC_VERSION} 10 \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_VERSION} 10 \
&& pip3 install cpplint && \
pip3 install cmake_format && \
pip3 install pyyaml \
&& mkdir /opt/project
WORKDIR /opt/project
CMD echo ${PWD} && \
PRJ_ROOT=${PWD} && \
cmake --version && \
gcc --version && \
g++ --version && \
clang --version && \
echo ${CXX} && \
echo ${CC} \
&& rm -rf build && mkdir -vp build \
&& cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DWARNINGS_AS_ERRORS=OFF \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DENABLE_SANITIZER_ADDRESS=TRUE \
-DENABLE_COVERAGE=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-S. \
-Bbuild \
&& cmake \
--build build \
--config Debug \
--parallel \
&& cd tests && \
ctest -V && \
cd ${PRJ_ROOT} && \
mkdir build/graphviz && \
cd build/graphviz && \
cmake --graphviz=graph ${PRJ_ROOT} && \
dot graph -T png -o graph.png