blob: c978c9b724fcf951c7ef5d10f55c76a5ed94121f [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)"
Pascal Bach54d39692014-12-12 14:10:24 +010050 CONFIG="-DBUILD_COMPILER=ON -DBUILD_LIBRARIES=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF"
Roger Meier5effab62014-11-16 22:31:33 +010051 compiler: gcc
henriqueac8d8e22014-07-23 23:31:04 +020052 before_install:
53 - sh contrib/installCXXDependencies.sh;
54 script:
Pascal Bach54d39692014-12-12 14:10:24 +010055 - mkdir build_native && cd build_native && cmake $CONFIG .. && make -j4 && cpack && cd ..;
Roger Meier5effab62014-11-16 22:31:33 +010056
57 - env:
58 - TEST_NAME="compiler (clang, automake)"
59 CONFIG="--disable-libs"
60 compiler: clang
61 before_install:
62 - sh contrib/installCXXDependencies.sh;
63 script:
64 - sh bootstrap.sh;
65 - sh configure $CONFIG;
66 - make check -j2;
67
68 - env:
69 - TEST_NAME="compiler (clang, CMake + CPack)"
Pascal Bach54d39692014-12-12 14:10:24 +010070 CONFIG="-DBUILD_COMPILER=ON -DBUILD_LIBRARIES=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF"
Roger Meier5effab62014-11-16 22:31:33 +010071 compiler: clang
72 before_install:
73 - sh contrib/installCXXDependencies.sh;
74 script:
Pascal Bach54d39692014-12-12 14:10:24 +010075 - mkdir build_native && cd build_native && cmake $CONFIG .. && make -j4 && cpack && cd ..;
Roger Meier5effab62014-11-16 22:31:33 +010076
77 - env:
78 - TEST_NAME="compiler (mingw32-gcc, CMake + CPack)"
Pascal Bach54d39692014-12-12 14:10:24 +010079 CONFIG="-DCMAKE_TOOLCHAIN_FILE=../contrib/mingw32-toolchain.cmake -DBUILD_COMPILER=ON -DBUILD_LIBRARIES=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF"
Roger Meier5effab62014-11-16 22:31:33 +010080 before_install:
81 - sh contrib/installCXXDependencies.sh;
82 - sudo apt-get install nsis
83 script:
Pascal Bach54d39692014-12-12 14:10:24 +010084 - mkdir build_mingw32 && cd build_mingw32 && cmake $CONFIG .. && make -j4 && cpack && cd ..;
Roger Meier5effab62014-11-16 22:31:33 +010085
86 - env:
87 - TEST_NAME="all (gcc, automake)"
88 CONFIG="--without-erlang --without-python --without-go --without-lua"
89 compiler: gcc
90 before_install:
91 - sh contrib/installCXXDependencies.sh;
92 - sh contrib/installDependencies.sh 1> /dev/null;
93 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.20/bin:$PATH
94 - cabal update
95 script:
96 - sh bootstrap.sh;
97 - sh configure $CONFIG;
Roger Meier71bd3602014-11-08 23:13:13 +010098 - make check -j2;
henriqueac8d8e22014-07-23 23:31:04 +020099
100
Roger Meier5effab62014-11-16 22:31:33 +0100101 - env:
102 - TEST_NAME="C & C++ & Haskell (gcc, automake)"
103 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"
104 compiler: gcc
105 before_install:
106 - sh contrib/installCXXDependencies.sh;
107 - sh contrib/installDependencies.sh 1> /dev/null;
108 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.20/bin:$PATH
109 - cabal update
110 script:
111 - sh bootstrap.sh;
112 - sh configure $CONFIG;
113 - make check -j2;
henriqueac8d8e22014-07-23 23:31:04 +0200114
Pascal Bach54d39692014-12-12 14:10:24 +0100115 - env:
Nobuaki Sukegawa28256642014-12-16 03:24:37 +0900116 - TEST_NAME="C++/boost-threads (gcc, CMake)"
117 CONFIG="-DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_BOOSTTHREADS=ON"
118 compiler: gcc
119 before_install:
120 - sh contrib/installCXXDependencies.sh;
121 - sh contrib/installDependencies.sh 1> /dev/null;
122 script:
123 - mkdir build_cmake && cd build_cmake && cmake $CONFIG .. && make -j4 && cd ..;
124
125 - env:
126 - TEST_NAME="C++/std-threads (gcc, CMake)"
127 CONFIG="-DCMAKE_CXX_FLAGS=-std=c++11 -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_STDTHREADS=ON"
128 compiler: gcc
129 before_install:
130 - sh contrib/installCXXDependencies.sh;
131 - sh contrib/installDependencies.sh 1> /dev/null;
132 script:
133 - mkdir build_cmake && cd build_cmake && cmake $CONFIG .. && make -j4 && cd ..;
134
135 - env:
Pascal Bach54d39692014-12-12 14:10:24 +0100136 - TEST_NAME="all (gcc, CMake + CPack)"
137 CONFIG=""
138 compiler: gcc
139 before_install:
140 - sh contrib/installCXXDependencies.sh;
141 - sh contrib/installDependencies.sh 1> /dev/null;
142 script:
143 - mkdir build_cmake && cd build_cmake && cmake $CONFIG .. && make -j4 && cpack && cd ..;
Roger Meiera0836f62013-05-05 00:19:38 +0200144
Roger Meier5effab62014-11-16 22:31:33 +0100145 - env:
146 - TEST_NAME="Small Set (gcc, automake)"
147 CONFIG="--without-erlang --without-haskell --without-python --without-go --without-lua --without-d --without-ruby --without-nodejs --without-java"
148 compiler: gcc
149 before_install:
150 - sh contrib/installCXXDependencies.sh;
151 - sh contrib/installDependencies.sh 1> /dev/null;
152 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.20/bin:$PATH
153 - cabal update
154 script:
155 - sh bootstrap.sh;
156 - sh configure $CONFIG;
157 - make check -j2;
Roger Meiera0836f62013-05-05 00:19:38 +0200158
Roger Meier5effab62014-11-16 22:31:33 +0100159 - env:
160 - TEST_NAME="dist (gcc, automake)"
161 CONFIG=""
162 compiler: gcc
163 before_install:
164 - sh contrib/installCXXDependencies.sh;
165 - sh contrib/installDependencies.sh 1> /dev/null;
166 script:
167 - sh bootstrap.sh;
168 - sh configure $CONFIG;
169 - make dist -j2;
170
171 - env:
172 - TEST_NAME="make cross (gcc, automake)"
173 CONFIG="--without-python"
174 compiler: gcc
175 before_install:
176 - sh contrib/installCXXDependencies.sh;
177 - sh contrib/installDependencies.sh 1> /dev/null;
178 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.20/bin:$PATH
179 - cabal update
180 script:
181 - sh bootstrap.sh;
182 - sh configure $CONFIG;
183 - make cross -j2;
184
185 - env:
186 - TEST_NAME="Debian Packages"
187 compiler: gcc
188 before_install:
189 - sh contrib/installCXXDependencies.sh;
190 - sh contrib/installDependencies.sh 1> /dev/null;
191 - 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
192 script:
193 - dpkg-buildpackage -tc -us -uc
194 - ls -al ..
195
196
197
198 # QA jobs for code analytics and metrics
199
200 # static code analysis with cppcheck (we can add --enable=all later)
201 - env: TEST_NAME="cppcheck (compiler) error"
202 script: cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 compiler/cpp/src
203 before_install: sudo apt-get install cppcheck
204 - env: TEST_NAME="cppcheck (cpp) error"
205 script: cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp
206 before_install: sudo apt-get install cppcheck
207 - env: TEST_NAME="cppcheck (c_glib) error"
208 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
209 before_install: sudo apt-get install cppcheck
210 # add --error-exitcode=1 as soon as everything is fixed
211 - env: TEST_NAME="cppcheck (compiler) all"
212 script: cppcheck --force --quiet --inline-suppr --enable=all -j2 compiler/cpp/src
213 before_install: sudo apt-get install cppcheck
214 - env: TEST_NAME="cppcheck (cpp) all"
215 script: cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp
216 before_install: sudo apt-get install cppcheck
217 - env: TEST_NAME="cppcheck (c_glib) all"
218 script: cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib
219 before_install: sudo apt-get install cppcheck
220
221 # TODO use findbugs for Java
222 # TODO use fxcop for C#
223
224 # TODO do style checks
225
226 # search for TODO within source tree
227 - env: TEST_NAME="TODO"
228 script: grep -r TODO *
229 # search for FIXME within source tree
230 - env: TEST_NAME="FIXME"
231 script: grep -r FIXME *
232 # search for HACK within source tree
233 - env: TEST_NAME="HACK"
234 script: grep -r HACK *
235 # some statistics about the code base
236 - env: TEST_NAME="sloccount"
237 script: sloccount .
238 before_install: sudo apt-get install sloccount
239 # some info about the build machine
240 - env: TEST_NAME="info"
241 script:
242 - dpkg -l
243 - uname -a
244
245# TODO make it perfect ;-r