Skip to content

Commit

Permalink
Improves travis-ci config to support ubuntu/centos+gcc, cpplint
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Kazuki OIKAWA committed Mar 25, 2016
1 parent 656078c commit 4e9194b
Showing 1 changed file with 36 additions and 15 deletions.
51 changes: 36 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit 4e9194b

Please sign in to comment.