-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (37 loc) · 1.3 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
FROM ubuntu:18.04
# Install dependencies
RUN apt-get update -y && apt-get install -y libgtest-dev cmake gcc-8 g++-8 libasan5 google-mock git
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8
# Compile GTest
WORKDIR /usr/src/gtest
RUN cmake CMakeLists.txt && make -j$(nproc)
RUN cp *.a /usr/lib
WORKDIR /usr/src/gmock
RUN cmake CMakeLists.txt && make -j$(nproc)
RUN cp *.a /usr/lib
# Compile Messages
WORKDIR /
RUN git clone https://github.com/SoPra-Team-10/Messages.git
WORKDIR /Messages
RUN cmake . && make -j$(nproc) SopraMessages && make install
# Compile GameLogic
WORKDIR /
RUN git clone https://github.com/SoPra-Team-10/GameLogic.git
WORKDIR /GameLogic
RUN cmake . && make -j$(nproc) SopraGameLogic && make install
# Compile Util
WORKDIR /
RUN git clone https://github.com/SoPra-Team-10/Util.git
WORKDIR /Util
RUN cmake . && make -j$(nproc) SopraUtil && make install
RUN ldconfig
WORKDIR /
RUN mkdir /src
COPY . /src/
RUN rm -rf /src/build
RUN mkdir -p /src/build
WORKDIR /src/build
RUN cmake -DCMAKE_BUILD_TYPE=Release .. && make -j$(nproc) SopraAITools && make install
RUN cmake -DCMAKE_BUILD_TYPE=Release -DUSE_INSTALLED_LIB=true .. && make -j$(nproc) Tests
WORKDIR /src
CMD ["build/Tests/Tests", "--gtest_repeat=10", "--gtest_shuffle", "--gtest_color=yes"]