From 4e9194b86f3da1827498f9621c3bcbddf09f71fc Mon Sep 17 00:00:00 2001 From: Kazuki OIKAWA Date: Fri, 25 Mar 2016 11:40:30 +0900 Subject: [PATCH] Improves travis-ci config to support ubuntu/centos+gcc, cpplint Enables build, unittest, cpplint tests in below distributions * CentOS6 + gcc 4.4 * CentOS7 + gcc 4.8 * Ubuntu 12.04 + gcc 4.6 * Ubuntu 14.04 + gcc 4.8 --- .travis.yml | 51 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 703056e2..d41f8eeb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,26 +1,47 @@ +sudo: required +dist: trusty + language: cpp -compiler: -# gcc test is disabled (see #120) -# - gcc - - clang +services: + - docker + +matrix: + include: + - env: + - DIST=centos + - VERSION=6 + - env: + - DIST=centos + - VERSION=7 + - env: + - DIST=ubuntu + - VERSION=12.04 + - env: + - DIST=ubuntu + - VERSION=14.04 before_install: - - lsb_release -a - - uname -a - - sudo apt-get -qq update + - docker pull ${DIST}:${VERSION} + - docker run -w /root --name test -d ${DIST}:${VERSION} sleep infinity + - docker cp . test:/root/ + - if [[ "$DIST$VERSION" == "centos6" ]]; then docker exec test rpm -Uvh http://download.jubat.us/yum/rhel/6/stable/x86_64/jubatus-release-6-2.el6.x86_64.rpm; fi + - if [[ "$DIST$VERSION" == "centos7" ]]; then docker exec test rpm -Uvh http://download.jubat.us/yum/rhel/7/stable/x86_64/jubatus-release-7-2.el7.x86_64.rpm; fi install: - # msgpack - - sudo apt-get -qq install libmsgpack-dev - # oniguruma - - wget https://github.com/kkos/oniguruma/releases/download/v5.9.6/onig-5.9.6.tar.gz && tar xvf onig-5.9.6.tar.gz - - pushd onig-5.9.6 && ./configure && make && sudo make install && popd - - sudo ldconfig + - if [[ "$DIST" == "centos" ]]; then docker exec test yum -y install redhat-lsb gcc-c++ bzip2 msgpack-devel oniguruma-devel; fi + - if [[ "$DIST" == "ubuntu" ]]; then docker exec test bash -c "apt-get update; apt-get -qq install lsb-release autoconf automake make g++ python2.7 wget tar bzip2 libmsgpack-dev"; fi + - if [[ "$DIST" == "ubuntu" ]]; then docker exec test bash -c "wget --no-check-certificate https://github.com/kkos/oniguruma/releases/download/v5.9.6/onig-5.9.6.tar.gz && tar xvf onig-5.9.6.tar.gz && cd onig-5.9.6 && ./configure && make && make install && ldconfig"; fi + - if [[ "$DIST$VERSION" == "ubuntu14.04" ]]; then docker exec test ln -sf /usr/bin/python2.7 /usr/bin/python; fi + +before_script: + - docker exec test lsb_release -a + - docker exec test g++ --version script: - - ./waf configure - - ./waf build --checkall + - docker exec test ./waf configure + - docker exec test ./waf build --checkall + - docker exec test ./waf cpplint branches: only: