- Add CMake installation to Centos 7 dockerfile
- New build script for CMake
- Add `BUILD_SYSTEM` variable to Travis: perform Autotools and CMake build, both on native Travis and Docker.
env:
- DOCKER_BUILD=FALSE
+ BUILD_SYSTEM=autotools
+
+- DOCKER_BUILD=FALSE
+ BUILD_SYSTEM=cmake
+
- DOCKER_BUILD=TRUE
+ BUILD_SYSTEM=autotools
+
+- DOCKER_BUILD=TRUE
+ BUILD_SYSTEM=cmake
+
install:
# Enable colored gcc output
script:
- cd ${TRAVIS_BUILD_DIR}
-- 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
+- if [ ${DOCKER_BUILD} == "FALSE" ] ; then sudo ./ci/${BUILD_SYSTEM}-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_SYSTEM}-build_and_test.sh" ; fi
before_deploy:
- export DEPLOYED_FILE=$(ls *.tar.gz)
file: "${DEPLOYED_FILE}"
on:
repo: ellson/graphviz
- condition: ${DOCKER_BUILD} == "FALSE"
+ condition: ${DOCKER_BUILD} == "FALSE" && ${BUILD_SYSTEM} == "autotools"
notifications:
email:
# Install Development tools
RUN yum -y groupinstall 'Development Tools'
-# Instal autotools utilities
-RUN yum -y install libtool-ltdl-devel ghostscript swig ksh tcl
+# Instal build utilities
+RUN yum -y install libtool-ltdl-devel ghostscript swig ksh tcl cmake
# Install dependencies
RUN yum -y install gd gd-devel qt-devel
--- /dev/null
+#!/bin/sh
+
+# Run this script from the root source directory
+
+mkdir build || true
+
+cd build
+
+if cmake .. ; then
+ echo "'cmake ..' succesfull."
+else
+ echo "Error: 'cmake ..' failed." >&2
+ exit 1
+fi
+
+if cmake --build . ; then
+ echo "'cmake --build .' succesfull."
+else
+ echo "Error: 'cmake --build .' failed." >&2
+ exit 1
+fi