From 397bad93694b0226d841456960c44710b1531937 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Sun, 27 Aug 2017 15:59:53 -0700 Subject: [PATCH] added docker build scripts for use with continuous integration --- .dockerignore | 6 ++++++ Dockerfile | 7 +++++++ docker-build-scripts/build.sh | 7 +++++++ 3 files changed, 20 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100755 docker-build-scripts/build.sh diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..2507326 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +* +!CMakeLists.txt +!docker-build-scripts +!src +!test-files + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e70e028 --- /dev/null +++ b/Dockerfile @@ -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 index 0000000..a6a7eaf --- /dev/null +++ b/docker-build-scripts/build.sh @@ -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 + -- 2.30.2