From: Jacob Lifshay Date: Sun, 27 Aug 2017 22:59:53 +0000 (-0700) Subject: added docker build scripts for use with continuous integration X-Git-Tag: gsoc-2017~29 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=397bad93694b0226d841456960c44710b1531937;p=kazan.git added docker build scripts for use with continuous integration --- 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 +