-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.ci
63 lines (57 loc) · 2.59 KB
/
Dockerfile.ci
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
FROM ubuntu:20.04 as cmd-builder
ARG DEBIAN_FRONTEND=noninteractive
ARG VERSION=6.0
RUN apt update -y && apt install -y --no-install-recommends \
qt5-default libqt5opengl5-dev libgtk-3-0 default-jre osgearth libpython3-dev python3-distutils \
libeigen3-dev cmake g++ gdb gpg-agent software-properties-common wget \
vim bison flex make lld-12 git clang-format-12 clang-tidy-12 lldb-12 && \
wget https://bootstrap.pypa.io/get-pip.py --progress=dot:giga && \
python3 ./get-pip.py && rm get-pip.py && \
pip3 install numpy scipy pandas matplotlib posix_ipc && \
ln -s /usr/bin/clang-format-12 /usr/bin/clang-format && \
ln -s /usr/bin/clang-tidy-12 /usr/bin/clang-tidy && \
ln -sf /usr/bin/clang-12 /usr/bin/clang && \
ln -sf /usr/bin/clang++-12 /usr/bin/clang++ && \
ln -sf /usr/bin/llvm-profdata-12 /usr/bin/llvm-profdata && \
ln -sf /usr/bin/llvm-cov-12 /usr/bin/llvm-cov && \
ln -sf /usr/bin/lld-12 /usr/bin/lld
WORKDIR /root
RUN wget https://github.com/omnetpp/omnetpp/releases/download/omnetpp-$VERSION/omnetpp-$VERSION-linux-x86_64.tgz \
--referer=https://omnetpp.org/ -O omnetpp-src-linux.tgz --progress=dot:giga && \
tar xf omnetpp-src-linux.tgz && rm omnetpp-src-linux.tgz
RUN mv omnetpp-$VERSION omnetpp
WORKDIR /root/omnetpp
ENV PATH /root/omnetpp/bin:$PATH
ENV QT_LOGGING_RULES=*.debug=false;qt.qpa.*=false
ENV OMNETPP_RELEASE=omnetpp-$VERSION
RUN bash -c "source setenv && ./configure WITH_OSG=no && \
make -j $(nproc) MODE=release base && \
rm -r doc out test samples config.log config.status"
FROM node:16-bullseye as client-builder
ADD ./opp-wasm-app /root/client
WORKDIR /root/client
RUN npm ci
RUN npm run build --mode=production
RUN ls -la
FROM emscripten/emsdk:2.0.25
ARG VERSION=6.0
ENV PATH /root/omnetpp/bin:$PATH
ENV QT_LOGGING_RULES=*.debug=false;qt.qpa.*=false
ENV OMNETPP_RELEASE=omnetpp-$VERSION
ENV QT_SELECT=5
WORKDIR /root
COPY --from=cmd-builder /root/omnetpp/bin/* /usr/local/bin/
COPY --from=cmd-builder /root/omnetpp/lib/* /usr/lib/
COPY --from=cmd-builder /root/omnetpp/images/* /root/omnetpp/images/
COPY --from=client-builder /root/js-build/* /root/js-build/
RUN ls -la /root/js-build
RUN apt update && apt install bison flex vim file pkg-config libtool -y && pip3 install toml
ADD . /root/
RUN export PATH=$PATH:$HOME/qtbase/qtbase/bin && \
mkdir -p ~/omnetpp/bin && \
ln -s /usr/bin/python3 /usr/bin/python
RUN bash build_all.sh
WORKDIR /root/omnetpp
RUN rm -rf src ui test samples releng out
RUN cd ~/qtbase && rm -rf examples src tests util
RUN echo "#\!/bin/sh\necho /root/omnetpp/Makefile.inc" > /usr/local/bin/opp_configfilepath