Roger Meier | a0836f6 | 2013-05-05 00:19:38 +0200 | [diff] [blame] | 1 | # |
| 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 | |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 22 | language: cpp |
henrique | a139c91 | 2014-04-02 14:45:39 +0200 | [diff] [blame] | 23 | |
| 24 | cache: |
| 25 | - apt |
| 26 | - npm |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 27 | - maven |
Roger Meier | a0836f6 | 2013-05-05 00:19:38 +0200 | [diff] [blame] | 28 | |
henrique | ac8d8e2 | 2014-07-23 23:31:04 +0200 | [diff] [blame] | 29 | env: |
Roger Meier | 5effab6 | 2014-11-16 22:31:33 +0100 | [diff] [blame] | 30 | global: |
| 31 | - TEST_NAME="" |
| 32 | - CONFIG="" |
| 33 | - GHCVER=7.8.3 |
henrique | c0a7d72 | 2014-07-26 13:11:12 +0200 | [diff] [blame] | 34 | |
henrique | ac8d8e2 | 2014-07-23 23:31:04 +0200 | [diff] [blame] | 35 | matrix: |
| 36 | include: |
Roger Meier | 5effab6 | 2014-11-16 22:31:33 +0100 | [diff] [blame] | 37 | - env: |
| 38 | - TEST_NAME="compiler (gcc, automake)" |
| 39 | CONFIG="--disable-libs" |
| 40 | compiler: gcc |
henrique | ac8d8e2 | 2014-07-23 23:31:04 +0200 | [diff] [blame] | 41 | before_install: |
| 42 | - sh contrib/installCXXDependencies.sh; |
| 43 | script: |
Roger Meier | 5effab6 | 2014-11-16 22:31:33 +0100 | [diff] [blame] | 44 | - sh bootstrap.sh; |
| 45 | - sh configure $CONFIG; |
Roger Meier | 71bd360 | 2014-11-08 23:13:13 +0100 | [diff] [blame] | 46 | - make check -j2; |
henrique | ac8d8e2 | 2014-07-23 23:31:04 +0200 | [diff] [blame] | 47 | |
Roger Meier | 5effab6 | 2014-11-16 22:31:33 +0100 | [diff] [blame] | 48 | - env: |
| 49 | - TEST_NAME="compiler (gcc, CMake + CPack)" |
| 50 | compiler: gcc |
henrique | ac8d8e2 | 2014-07-23 23:31:04 +0200 | [diff] [blame] | 51 | before_install: |
| 52 | - sh contrib/installCXXDependencies.sh; |
| 53 | script: |
Roger Meier | 5effab6 | 2014-11-16 22:31:33 +0100 | [diff] [blame] | 54 | - 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 Meier | 71bd360 | 2014-11-08 23:13:13 +0100 | [diff] [blame] | 95 | - make check -j2; |
henrique | ac8d8e2 | 2014-07-23 23:31:04 +0200 | [diff] [blame] | 96 | |
| 97 | |
Roger Meier | 5effab6 | 2014-11-16 22:31:33 +0100 | [diff] [blame] | 98 | - 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; |
henrique | ac8d8e2 | 2014-07-23 23:31:04 +0200 | [diff] [blame] | 111 | |
Roger Meier | a0836f6 | 2013-05-05 00:19:38 +0200 | [diff] [blame] | 112 | |
Roger Meier | 5effab6 | 2014-11-16 22:31:33 +0100 | [diff] [blame] | 113 | - 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 Meier | a0836f6 | 2013-05-05 00:19:38 +0200 | [diff] [blame] | 126 | |
Roger Meier | 5effab6 | 2014-11-16 22:31:33 +0100 | [diff] [blame] | 127 | - 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 |