Browse Source

Merge branch 'add-gui-to-docker-build' into 'develop'

Add GUI to CI to ensure buildable source

Closes #76

See merge request tobias.wach/ccats!70
Serdyukov, Denys 4 years ago
parent
commit
8a9fc1fb82
1 changed files with 14 additions and 1 deletions
  1. 14 1
      Dockerfile.testing

+ 14 - 1
Dockerfile.testing

@@ -1,7 +1,10 @@
 FROM debian
 
+# Install all packages available from the repos
+# second line is for GUI requirements
 RUN apt-get update -y && apt-get install -y \
-    build-essential git cmake libpcap-dev libjsoncpp-dev wget libssl-dev libreadline-dev pkg-config
+    build-essential git cmake libpcap-dev libjsoncpp-dev wget libssl-dev libreadline-dev pkg-config \
+    qtdeclarative5-dev
 
 WORKDIR /root/build
 
@@ -31,6 +34,7 @@ RUN git clone https://github.com/google/googletest.git \
 # Copy all required data into image
 COPY .cmake_modules/ /root/build/.cmake_modules
 RUN mkdir -p /root/build/daemon/build /root/build/cli/build
+RUN mkdir -p /root/build/gui/build
 
 # Daemon
 COPY /daemon/include	/root/build/daemon/include
@@ -44,6 +48,11 @@ COPY /cli/src		/root/build/cli/src
 COPY /cli/test		/root/build/cli/test
 COPY /cli/CMakeLists.txt /root/build/cli/
 
+# GUI
+COPY /gui/include	/root/build/gui/include
+COPY /gui/src		/root/build/gui/src
+COPY /gui/CMakeLists.txt /root/build/gui/
+
 # Create Daemon config
 # must be located in WORKDIR because running the container will set this as default dir, so all other scripts are also run from there
 RUN mkdir /root/build/files \
@@ -66,4 +75,8 @@ RUN cd cli/build && cmake -DENABLE_TESTS=true .. && make -j$(nproc) \
     && rm -rf CMakeFiles Makefile CMakeCache.txt cmake_install.cmake \
     CTestTestfile.cmake
 
+# Compile ccats-gui
+RUN cd gui/build && cmake .. && make -j$(nproc) \
+    && cd ../.. && rm -rf gui
+
 ENTRYPOINT /root/build/daemon/build/bin/ccats