From 4344abc880a4217c540e5296a8ffae9264a756c7 Mon Sep 17 00:00:00 2001 From: Erwin Janssen Date: Thu, 8 Sep 2016 19:03:57 +0200 Subject: [PATCH] Travis: Add build on CentOS 7 using Docker. There are now two environments, one where the variable DOCKER_BUILD is true and one where it is false. False means a normal build on the Travis build image, true means docker will be used to run a build on a CentOS 7 image. The setup of the CentOS 7 image is done in the Dockerfile in `ci/centos7`. It takes a clean CentOS 7 image and installs the required build utilities and dependencies for a minimal build. --- .travis.yml | 14 ++++++++++++-- ci/centos7/Dockerfile | 10 ++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 ci/centos7/Dockerfile diff --git a/.travis.yml b/.travis.yml index 9ffa13023..e7f351ee5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,13 @@ addons: - freeglut3-dev - colorgcc +services: +- docker + +env: +- DOCKER_BUILD=FALSE +- DOCKER_BUILD=TRUE + install: # Enable colored gcc output - export CC=colorgcc @@ -22,10 +29,13 @@ install: - cmake --build . - sudo make install - sudo ldconfig - +- cd ${TRAVIS_BUILD_DIR} +- if [ ${DOCKER_BUILD} == "TRUE" ] ; then docker build -t centos7-build-env ci/centos7/ ; fi + script: - cd ${TRAVIS_BUILD_DIR} -- sudo ./ci/build_and_test.sh +- if [ ${DOCKER_BUILD} == "FALSE" ] ; then sudo ./ci/build_and_test.sh ; fi +- if [ ${DOCKER_BUILD} == "TRUE" ] ; then docker run --rm -v `pwd`:/graphviz -w /graphviz -i -t centos7-build-env bash "ci/build_and_test.sh" ; fi before_deploy: - export DEPLOYED_FILE=$(ls *.tar.gz) diff --git a/ci/centos7/Dockerfile b/ci/centos7/Dockerfile new file mode 100644 index 000000000..0e3ddbed0 --- /dev/null +++ b/ci/centos7/Dockerfile @@ -0,0 +1,10 @@ +FROM centos:7 + +# Install Development tools +RUN yum -y groupinstall 'Development Tools' + +# Instal autotools utilities +RUN yum -y install libtool-ltdl-devel ghostscript swig ksh tcl + +# Install dependencies +RUN yum -y install gd gd-devel qt-devel -- 2.40.0