]> granicus.if.org Git - graphviz/commitdiff
Travis: Add build on CentOS 7 using Docker.
authorErwin Janssen <erwinjanssen@outlook.com>
Thu, 8 Sep 2016 17:03:57 +0000 (19:03 +0200)
committerErwin Janssen <erwinjanssen@outlook.com>
Thu, 8 Sep 2016 18:53:38 +0000 (20:53 +0200)
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
ci/centos7/Dockerfile [new file with mode: 0644]

index 9ffa13023c45f07f3fbc21ff153ce07270ecc899..e7f351ee5dfb4eaf991d07fb80af103e800c1584 100644 (file)
@@ -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 (file)
index 0000000..0e3ddbe
--- /dev/null
@@ -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