forked from lpenz/ghaction-cmake
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile.orig
119 lines (110 loc) · 4.41 KB
/
Dockerfile.orig
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN set -x -e; \
apt-get -y update; \
apt-get -y install --no-install-recommends apt-transport-https ca-certificates gnupg software-properties-common wget; \
rm -rf /var/lib/apt/lists/*
RUN set -x -e; \
wget https://apt.llvm.org/llvm.sh; \
chmod +x llvm.sh; \
./llvm.sh 13 all; \
./llvm.sh 14 all; \
rm -rf /var/lib/apt/lists/*
RUN set -x -e; \
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add -; \
apt-add-repository -y -n 'https://apt.kitware.com/ubuntu/'; \
apt-get -y update; \
apt-get -y install --no-install-recommends \
# build
cmake pkg-config make ninja-build \
# GCC compilers
gcc-9 gcc-10 gcc-11 gcc-12 \
<<<<<<< HEAD
g++-9 g++-10 g++11 g++12 \
=======
g++-9 g++-10 g++-11 g++-12 \
>>>>>>> 00fa1cd (Fix actual installation of all compilers)
# Clang compilers (except ones installed by script above)
clang-11 clang-12 \
# Clang tools
clang-tidy-11 clang-tidy-12 \
clang-format-11 clang-format-12 \
# LLVM
llvm-11 llvm-12 \
gcovr \
# Coverage report upload
curl \
# ctest -D ExperimentalMemCheck
valgrind \
# Using boost as reference for tests
libboost1.74-all-dev \
# zlib needed for some boost components
zlib1g-dev \
# openssl needed for some users
libssl-dev \
# git for listing files in changes
git \
; \
rm -rf /var/lib/apt/lists/*
# x86 cross compilation
RUN set -x -e; \
apt-get -y update; \
apt-get -y install --no-install-recommends \
g++-multilib \
linux-libc-dev-i386-cross \
; \
rm -rf /var/lib/apt/lists/*
# Cross compilation for Windows: MinGW, boost, zlib, OpenSSL
RUN set -x -e; \
SOURCES_DIR="/home/sources"; \
MINGW_PREFIX="x86_64-w64-mingw32"; \
MINGW_PREFIX_DIR="/usr/${MINGW_PREFIX}"; \
mkdir -p ${SOURCES_DIR}; \
apt-get -y update; \
apt-get -y install --no-install-recommends mingw-w64; \
# Download packages
wget -q https://boostorg.jfrog.io/artifactory/main/release/1.74.0/source/boost_1_74_0.tar.gz -P ${SOURCES_DIR}; \
wget -q https://zlib.net/zlib-1.2.12.tar.gz -P ${SOURCES_DIR} ; \
wget -q https://www.openssl.org/source/openssl-1.1.1h.tar.gz -P ${SOURCES_DIR} ; \
# Extract packages
for f in ${SOURCES_DIR}/*.tar.gz; do tar xf "$f" -C ${SOURCES_DIR}; done; \
# Boost
cd ${SOURCES_DIR}/boost*; \
echo "using gcc : mingw : ${MINGW_PREFIX}-g++ ;" > ~/user-config.jam; \
CC=gcc-10 CXX=g++-10 ./bootstrap.sh --prefix="${MINGW_PREFIX_DIR}" --with-toolset=gcc; \
./b2 toolset=gcc-mingw target-os=windows variant=release address-model=64 --without-python --without-context --without-coroutine install; \
# zlib
cd ${SOURCES_DIR}/zlib*; \
make -j$(nproc) install -f win32/Makefile.gcc BINARY_PATH=${MINGW_PREFIX_DIR}/bin INCLUDE_PATH=${MINGW_PREFIX_DIR}/include LIBRARY_PATH=${MINGW_PREFIX_DIR}/lib SHARED_MODE=1 PREFIX=${MINGW_PREFIX}-; \
# OpenSSL
cd ${SOURCES_DIR}/openssl*; \
./Configure mingw64 shared --cross-compile-prefix=${MINGW_PREFIX}- --prefix="${MINGW_PREFIX_DIR}"; \
make -j$(nproc); \
make install_sw; \
# Cleanup
rm -rf "${SOURCES_DIR}" ~/user-config.jam; \
rm -rf /var/lib/apt/lists/*
# Java
RUN set -x -e; \
apt-get -y update; \
apt-get -y install --no-install-recommends openjdk-11-jre-headless; \
rm -rf get-pip.py /var/lib/apt/lists/*
# Python packages + Protobuf support for CMake based code generations
RUN set -x -e; \
apt-get -y update; \
apt-get -y install --no-install-recommends python3-distutils protobuf-compiler; \
wget -q https://bootstrap.pypa.io/pip/3.6/get-pip.py; \
python3 get-pip.py; \
pip3 install dataclasses Jinja2 protobuf pytest xmlschema lxml; \
rm -rf get-pip.py /var/lib/apt/lists/*
# Python 3.8
RUN set -x -e; \
add-apt-repository ppa:deadsnakes/ppa -y; \
apt-get -y update; \
apt-get -y install --no-install-recommends python3.8 python3.8-distutils; \
wget -q https://bootstrap.pypa.io/get-pip.py; \
python3.8 get-pip.py; \
python3.8 -m pip install dataclasses Jinja2 protobuf pytest xmlschema lxml; \
rm -rf get-pip.py /var/lib/apt/lists/*
COPY entrypoint.py /usr/local/bin/entrypoint
ENTRYPOINT ["/usr/bin/python3", "-u", "/usr/local/bin/entrypoint"]