From 88bef66dfaaa20274001aa454d606aaa185cb482 Mon Sep 17 00:00:00 2001 From: Chris Lapa Date: Fri, 6 Oct 2017 09:13:35 +1100 Subject: [PATCH] ci: dockerizes CI to get newer version of gtk (3.22.*) from Debian 9 image. Signed-off-by: Chris Lapa --- .ci_build.sh | 13 +++++++++++++ .travis.yml | 14 +++++++------- Dockerfile | 14 ++++++++++++++ 3 files changed, 34 insertions(+), 7 deletions(-) create mode 100755 .ci_build.sh create mode 100644 Dockerfile diff --git a/.ci_build.sh b/.ci_build.sh new file mode 100755 index 000000000..b994e27d1 --- /dev/null +++ b/.ci_build.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +export BUILD_DIR="/${SOURCE_DIR}/build" + +cd "${SOURCE_DIR}" +rm -Rf "${BUILD_DIR}" +meson "${BUILD_DIR}" + +cd "${BUILD_DIR}" +ninja +ninja -C "${BUILD_DIR}" test diff --git a/.travis.yml b/.travis.yml index 9282fe839..a019a6db2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,13 @@ +sudo: required + language: - csharp +services: + docker + before_install: - - sudo apt-get install -y git python3-pip unzip build-essential libgtk-3-dev - - sudo apt-get build-dep -y libgtk-3-0 - - wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip - - unzip ninja-linux.zip - - sudo mv ninja /usr/bin/ - - sudo pip3 install git+https://github.com/mesonbuild/meson/ + - docker build -t gtk-sharp-debian9 . script: - - meson build/ && ninja -C build/ test + - docker run gtk-sharp-debian9 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..c9047f6b6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM debian:9 + +RUN apt-get update && \ + apt-get install -y git python3 python3-pip ninja-build mono-devel libgtk-3-dev + +RUN pip3 install git+https://github.com/mesonbuild/meson/ + +ENV SOURCE_DIR="/source" + +RUN mkdir -p "${SOURCE_DIR}" + +COPY / "${SOURCE_DIR}" + +CMD ["/source/.ci_build.sh"]