blob: 4d9faee69f9bad8b86d43f1af0158350e52abd4b [file] [log] [blame]
Roger Meiera0836f62013-05-05 00:19:38 +02001#
2# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
18#
19
20# build Apache Thrift on Travis CI - https://travis-ci.org/
21
henriqued17f1c92014-04-30 16:21:25 +020022language: cpp
henriquea139c912014-04-02 14:45:39 +020023
24cache:
25 - apt
26 - npm
henriqued17f1c92014-04-30 16:21:25 +020027 - maven
Roger Meiera0836f62013-05-05 00:19:38 +020028
henriqueac8d8e22014-07-23 23:31:04 +020029env:
Roger Meier5effab62014-11-16 22:31:33 +010030 global:
31 - TEST_NAME=""
32 - CONFIG=""
33 - GHCVER=7.8.3
henriquec0a7d722014-07-26 13:11:12 +020034
henriqueac8d8e22014-07-23 23:31:04 +020035matrix:
36 include:
Roger Meier5effab62014-11-16 22:31:33 +010037 - env:
38 - TEST_NAME="compiler (gcc, automake)"
39 CONFIG="--disable-libs"
40 compiler: gcc
henriqueac8d8e22014-07-23 23:31:04 +020041 before_install:
42 - sh contrib/installCXXDependencies.sh;
43 script:
Roger Meier5effab62014-11-16 22:31:33 +010044 - sh bootstrap.sh;
45 - sh configure $CONFIG;
Roger Meier71bd3602014-11-08 23:13:13 +010046 - make check -j2;
henriqueac8d8e22014-07-23 23:31:04 +020047
Roger Meier5effab62014-11-16 22:31:33 +010048 - env:
49 - TEST_NAME="compiler (gcc, CMake + CPack)"
50 compiler: gcc
henriqueac8d8e22014-07-23 23:31:04 +020051 before_install:
52 - sh contrib/installCXXDependencies.sh;
53 script:
Roger Meier5effab62014-11-16 22:31:33 +010054 - mkdir build_native && cd build_native && cmake ../compiler/cpp/ && make -j4 && cpack && cd ..;
55
56 - env:
57 - TEST_NAME="compiler (clang, automake)"
58 CONFIG="--disable-libs"
59 compiler: clang
60 before_install:
61 - sh contrib/installCXXDependencies.sh;
62 script:
63 - sh bootstrap.sh;
64 - sh configure $CONFIG;
65 - make check -j2;
66
67 - env:
68 - TEST_NAME="compiler (clang, CMake + CPack)"
69 compiler: clang
70 before_install:
71 - sh contrib/installCXXDependencies.sh;
72 script:
73 - mkdir build_native && cd build_native && cmake ../compiler/cpp/ && make -j4 && cpack && cd ..;
74
75 - env:
76 - TEST_NAME="compiler (mingw32-gcc, CMake + CPack)"
77 before_install:
78 - sh contrib/installCXXDependencies.sh;
79 - sudo apt-get install nsis
80 script:
81 - mkdir build_mingw32 && cd build_mingw32 && cmake -DCMAKE_TOOLCHAIN_FILE=../contrib/mingw32-toolchain.cmake ../compiler/cpp/ && make -j4 && cpack && cd ..;
82
83 - env:
84 - TEST_NAME="all (gcc, automake)"
85 CONFIG="--without-erlang --without-python --without-go --without-lua"
86 compiler: gcc
87 before_install:
88 - sh contrib/installCXXDependencies.sh;
89 - sh contrib/installDependencies.sh 1> /dev/null;
90 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.20/bin:$PATH
91 - cabal update
92 script:
93 - sh bootstrap.sh;
94 - sh configure $CONFIG;
Roger Meier71bd3602014-11-08 23:13:13 +010095 - make check -j2;
henriqueac8d8e22014-07-23 23:31:04 +020096
97
Roger Meier5effab62014-11-16 22:31:33 +010098 - env:
99 - TEST_NAME="C & C++ & Haskell (gcc, automake)"
100 CONFIG="--without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php-extension --without-ruby --without-go --without-d"
101 compiler: gcc
102 before_install:
103 - sh contrib/installCXXDependencies.sh;
104 - sh contrib/installDependencies.sh 1> /dev/null;
105 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.20/bin:$PATH
106 - cabal update
107 script:
108 - sh bootstrap.sh;
109 - sh configure $CONFIG;
110 - make check -j2;
henriqueac8d8e22014-07-23 23:31:04 +0200111
Roger Meiera0836f62013-05-05 00:19:38 +0200112
Roger Meier5effab62014-11-16 22:31:33 +0100113 - env:
114 - TEST_NAME="Small Set (gcc, automake)"
115 CONFIG="--without-erlang --without-haskell --without-python --without-go --without-lua --without-d --without-ruby --without-nodejs --without-java"
116 compiler: gcc
117 before_install:
118 - sh contrib/installCXXDependencies.sh;
119 - sh contrib/installDependencies.sh 1> /dev/null;
120 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.20/bin:$PATH
121 - cabal update
122 script:
123 - sh bootstrap.sh;
124 - sh configure $CONFIG;
125 - make check -j2;
Roger Meiera0836f62013-05-05 00:19:38 +0200126
Roger Meier5effab62014-11-16 22:31:33 +0100127 - env:
128 - TEST_NAME="dist (gcc, automake)"
129 CONFIG=""
130 compiler: gcc
131 before_install:
132 - sh contrib/installCXXDependencies.sh;
133 - sh contrib/installDependencies.sh 1> /dev/null;
134 script:
135 - sh bootstrap.sh;
136 - sh configure $CONFIG;
137 - make dist -j2;
138
139 - env:
140 - TEST_NAME="make cross (gcc, automake)"
141 CONFIG="--without-python"
142 compiler: gcc
143 before_install:
144 - sh contrib/installCXXDependencies.sh;
145 - sh contrib/installDependencies.sh 1> /dev/null;
146 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.20/bin:$PATH
147 - cabal update
148 script:
149 - sh bootstrap.sh;
150 - sh configure $CONFIG;
151 - make cross -j2;
152
153 - env:
154 - TEST_NAME="Debian Packages"
155 compiler: gcc
156 before_install:
157 - sh contrib/installCXXDependencies.sh;
158 - sh contrib/installDependencies.sh 1> /dev/null;
159 - sudo apt-get install build-essential mono-gmcs mono-devel libmono-system-web2.0-cil erlang-base ruby1.8-dev python-all python-all-dev python-all-dbg php5 php5-dev
160 script:
161 - dpkg-buildpackage -tc -us -uc
162 - ls -al ..
163
164
165
166 # QA jobs for code analytics and metrics
167
168 # static code analysis with cppcheck (we can add --enable=all later)
169 - env: TEST_NAME="cppcheck (compiler) error"
170 script: cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 compiler/cpp/src
171 before_install: sudo apt-get install cppcheck
172 - env: TEST_NAME="cppcheck (cpp) error"
173 script: cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp
174 before_install: sudo apt-get install cppcheck
175 - env: TEST_NAME="cppcheck (c_glib) error"
176 script: cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib
177 before_install: sudo apt-get install cppcheck
178 # add --error-exitcode=1 as soon as everything is fixed
179 - env: TEST_NAME="cppcheck (compiler) all"
180 script: cppcheck --force --quiet --inline-suppr --enable=all -j2 compiler/cpp/src
181 before_install: sudo apt-get install cppcheck
182 - env: TEST_NAME="cppcheck (cpp) all"
183 script: cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp
184 before_install: sudo apt-get install cppcheck
185 - env: TEST_NAME="cppcheck (c_glib) all"
186 script: cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib
187 before_install: sudo apt-get install cppcheck
188
189 # TODO use findbugs for Java
190 # TODO use fxcop for C#
191
192 # TODO do style checks
193
194 # search for TODO within source tree
195 - env: TEST_NAME="TODO"
196 script: grep -r TODO *
197 # search for FIXME within source tree
198 - env: TEST_NAME="FIXME"
199 script: grep -r FIXME *
200 # search for HACK within source tree
201 - env: TEST_NAME="HACK"
202 script: grep -r HACK *
203 # some statistics about the code base
204 - env: TEST_NAME="sloccount"
205 script: sloccount .
206 before_install: sudo apt-get install sloccount
207 # some info about the build machine
208 - env: TEST_NAME="info"
209 script:
210 - dpkg -l
211 - uname -a
212
213# TODO make it perfect ;-r