added docker build scripts for use with continuous integration
authorJacob Lifshay <programmerjake@gmail.com>
Sun, 27 Aug 2017 22:59:53 +0000 (15:59 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Sun, 27 Aug 2017 22:59:53 +0000 (15:59 -0700)
.dockerignore [new file with mode: 0644]
Dockerfile [new file with mode: 0644]
docker-build-scripts/build.sh [new file with mode: 0755]

diff --git a/.dockerignore b/.dockerignore
new file mode 100644 (file)
index 0000000..2507326
--- /dev/null
@@ -0,0 +1,6 @@
+*
+!CMakeLists.txt
+!docker-build-scripts
+!src
+!test-files
+
diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..e70e028
--- /dev/null
@@ -0,0 +1,7 @@
+FROM ubuntu:xenial
+RUN apt-get update -q && apt-get dist-upgrade -qy && apt-get install -qy clang-4.0 build-essential cmake ninja-build llvm-4.0-dev libsdl2-dev curl imagemagick && apt-get clean -y
+WORKDIR /build
+COPY . /build
+RUN ./docker-build-scripts/build.sh
+RUN ./build/src/demo/demo && convert output.bmp output.png && curl --upload-file ./output.png https://transfer.sh/output.png || echo running failed
+CMD ["/bin/bash"]
diff --git a/docker-build-scripts/build.sh b/docker-build-scripts/build.sh
new file mode 100755 (executable)
index 0000000..a6a7eaf
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+mkdir -p build
+cd build
+cmake .. -G Ninja -DCMAKE_C_COMPILER=clang-4.0 -DCMAKE_CXX_COMPILER=clang++-4.0 -DCMAKE_BUILD_TYPE=Debug
+ninja
+