You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by he...@apache.org on 2014/07/23 23:32:09 UTC

git commit: THRIFT-2635 Travis CI build and test matrix

Repository: thrift
Updated Branches:
  refs/heads/master feea9477e -> ac8d8e260


THRIFT-2635 Travis CI build and test matrix

This closes #163


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/ac8d8e26
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/ac8d8e26
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/ac8d8e26

Branch: refs/heads/master
Commit: ac8d8e260e3b0087ae2975ffcbea842255f57601
Parents: feea947
Author: henrique <he...@apache.org>
Authored: Wed Jul 23 23:31:04 2014 +0200
Committer: henrique <he...@apache.org>
Committed: Wed Jul 23 23:31:04 2014 +0200

----------------------------------------------------------------------
 .travis.yml                       | 79 ++++++++++++++++------------------
 contrib/installCXXDependencies.sh | 29 +++++++++++++
 contrib/installDependencies.sh    | 68 +++++++++++++++++++++++++++++
 3 files changed, 135 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/ac8d8e26/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 4ab649a..017ac74 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -26,51 +26,48 @@ cache:
  - npm
  - maven
 
-# see what we need: http://thrift.apache.org/docs/install/ubuntu
+
+
+## Build matrix:
+env:
+ # Small Set
+ - CONFIG="--without-erlang --without-haskell --without-python --without-go --without-lua --without-d --without-ruby --without-nodejs --without-java"
+
+ # Build All
+ # TODO: fix these languages
+ - CONFIG="--without-erlang --without-haskell --without-python --without-go --without-lua"
+
+ 
+matrix:
+  include:
+    - compiler: gcc
+      env: CONFIG="--disable-libs"
+      before_install:
+       - sh contrib/installCXXDependencies.sh;
+      script:
+       - make check -j4;
+       - mkdir build_native && cd build_native && cmake ../compiler/cpp/ && make -j4; cd ..;
+       - mkdir build_mingw32 && cd build_mingw32 && cmake -DCMAKE_TOOLCHAIN_FILE=../contrib/mingw32-toolchain.cmake ../compiler/cpp/ && make -j4; cd ..;
+
+    - compiler: clang
+      env: CONFIG="--disable-libs"
+      before_install:
+       - sh contrib/installCXXDependencies.sh;
+      script:
+       - make check -j4;
+
+
+
+## Default build sequence:
 before_install:
- - sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu/ trusty main restricted" -y
- - sudo apt-get update -qq
- - sudo apt-get install -qq libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev bc 
- - dpkg -S /usr/include/boost/version.hpp
-# Java
- - sudo apt-get install -qq ant
-# Ruby
- - gem install bundler -v 1.3.5 || true
-# Python
-# - sudo apt-get install -qq python-all python-all-dev python-all-dbg
-# Perl
- - sudo apt-get install -qq libbit-vector-perl libclass-accessor-class-perl
-# PHP
- - sudo apt-get install -qq php5-dev php5-cli phpunit php-pear
- - sudo pear channel-discover pear.phpunit.de
- - sudo pear channel-discover pear.symfony.com
-# - sudo pear channel-discover components.ez.no
- - sudo pear update-channels
- - sudo pear upgrade-all
- - sudo pear install --alldeps phpunit/PHPUnit
-# c_glib
- - sudo apt-get install -qq libglib2.0-dev
-# Erlang
-# - sudo apt-get install -qq erlang-base erlang-eunit erlang-dev
-# Csharp
- - sudo apt-get install -qq mono-gmcs mono-devel libmono-system-web2.0-cil nunit nunit-console
-# Haskell
-# - sudo apt-get install -qq ghc6 cabal-install libghc6-binary-dev libghc6-network-dev libghc6-http-dev
-# Thrift Compiler for Windows
- - sudo apt-get install -qq mingw32
-# node.js
- - sudo apt-get install -qq nodejs npm
- - sudo npm install nodeunit -g || true
+ - sh contrib/installDependencies.sh 1> /dev/null;
 
 install:
-  - sh bootstrap.sh
+ - sh bootstrap.sh;
+ - sh configure $CONFIG;
 
 script:
-# TODO: fix these languages
-  - sh configure --without-erlang --without-haskell --without-python --without-go --without-lua
-  - make -j4 && make dist
-  - make cross -j4
-  - mkdir build_native && cd build_native && cmake ../compiler/cpp/ && make -j4; cd ..
-  - mkdir build_mingw32 && cd build_mingw32 && cmake -DCMAKE_TOOLCHAIN_FILE=../contrib/mingw32-toolchain.cmake ../compiler/cpp/ && make -j4; cd ..
+ - make -j4 && make dist;
+ - make cross -j4;
 # TODO: add these steps
 #  - sh bootstrap.sh ; dpkg-buildpackage -tc

http://git-wip-us.apache.org/repos/asf/thrift/blob/ac8d8e26/contrib/installCXXDependencies.sh
----------------------------------------------------------------------
diff --git a/contrib/installCXXDependencies.sh b/contrib/installCXXDependencies.sh
new file mode 100644
index 0000000..3d2c786
--- /dev/null
+++ b/contrib/installCXXDependencies.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+# Mainly aiming Travis CI's Ubuntu machines for now
+# see what we need: http://thrift.apache.org/docs/install/ubuntu
+
+
+# General dependencies
+sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu/ trusty main restricted" -y
+sudo apt-get update -qq
+sudo apt-get install -qq libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev make libqt4-dev git debhelper bc 
+dpkg -S /usr/include/boost/version.hpp

http://git-wip-us.apache.org/repos/asf/thrift/blob/ac8d8e26/contrib/installDependencies.sh
----------------------------------------------------------------------
diff --git a/contrib/installDependencies.sh b/contrib/installDependencies.sh
new file mode 100755
index 0000000..ef76d2f
--- /dev/null
+++ b/contrib/installDependencies.sh
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+SCRIPTPATH=$( cd $(dirname $0) ; pwd -P )
+
+# Mainly aiming Travis CI's Ubuntu machines for now
+# see what we need: http://thrift.apache.org/docs/install/ubuntu
+
+# General dependencies
+sh ${SCRIPTPATH}/installCXXDependencies.sh
+
+# Java dependencies
+sudo apt-get install -qq ant openjdk-7-jdk
+sudo update-java-alternatives -s java-1.7.0-openjdk-amd64 
+
+# Python dependencies
+sudo apt-get install -qq python-all python-all-dev python-all-dbg python-setuptools python-support
+
+# Ruby dependencies
+sudo apt-get install -qq ruby ruby-dev
+sudo gem install bundler rake
+
+# Perl dependencies
+sudo apt-get install -qq libbit-vector-perl libclass-accessor-class-perl
+
+# Php dependencies
+sudo apt-get install -qq php5 php5-dev php5-cli php-pear re2c
+
+# GlibC dependencies
+sudo apt-get install -qq libglib2.0-dev
+
+# Erlang dependencies
+sudo apt-get install -qq erlang-base erlang-eunit erlang-dev
+
+# GO dependencies
+echo "golang-go golang-go/dashboard boolean false" | debconf-set-selections
+sudo apt-get -y install -qq golang golang-go
+
+# Haskell dependencies TODO
+#sudo apt-get install -qq ghc cabal-install libghc-binary-dev libghc-network-dev libghc-http-dev libghc-hashable-dev libghc-unordered-containers-dev libghc-vector-dev
+#sudo cabal update
+
+# Lua dependencies
+sudo apt-get install -qq lua5.2 lua5.2-dev
+
+# Node.js dependencies
+sudo apt-get install -qq nodejs nodejs-dev npm
+sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
+
+# CSharp
+sudo apt-get install -qq mono-gmcs mono-devel libmono-system-web2.0-cil
+sudo apt-get install -qq mingw32 mingw32-binutils mingw32-runtime