From 0314519347a535579e4aa66b21e6d9c8ebd23f93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjell=20Hedstr=C3=B6m?= Date: Sun, 4 Jun 2017 10:45:26 -0600 Subject: [PATCH] first try (#49) * first try * test * typo removed * installing unzip * debug info * fixing path issues * Update Dockerfile * Install boost --- .travis.yml | 13 +++++++++++++ Dockerfile | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 .travis.yml create mode 100644 Dockerfile diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2409b65 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,13 @@ +sudo: required + +language: cpp +services: + - docker + +before_install: + - docker pull ubuntu:16.04 + +script: + - docker build . + + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e7f8eb7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,38 @@ +FROM ubuntu:16.04 + +# Install +RUN apt-get update -y +RUN apt-get install -y apt-utils | true +RUN apt-get install -y software-properties-common | true +RUN apt-get install -y python-software-properties +RUN apt-get update -y +RUN add-apt-repository -y ppa:jonathonf/gcc-7.1 +RUN apt-get update -y +RUN apt-get install -y cmake software-properties-common git make +RUN apt-get install -y gcc-7 g++-7 +RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 90 +RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90 +RUN apt-get install -y unzip zlib1g-dev +RUN apt-get install -y libboost-all-dev + +# Build Preparation +RUN mkdir -p /src/ +RUN mkdir -p /src/build/ + +# Build +WORKDIR /src/ +COPY . /src/ +RUN cd /src + + +RUN git clone https://github.com/KjellKod/g3log.git +RUN cd /src/g3log/3rdParty/gtest && unzip gtest-1.7.0.zip +RUN cd /src/g3log && mkdir build +RUN cd /src/g3log/build && cmake .. && make -j && make install + + +# Build g3sinks +# Cleanup +RUN cd /src/3rdparty && unzip gtest-1.7.0.zip +RUN cd /src/logrotate && mkdir build && cd build && cmake -DADD_LOGROTATE_UNIT_TEST=ON .. +RUN cd /src/logrotate/build && make -j && ./UnitTestRunner