#
# 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.
#

# build Apache Thrift on Travis CI - https://travis-ci.org/

language: cpp

cache:
 - apt
 - npm
 - maven

compiler:
  - clang
  - gcc

before_install:
  - sh build/travis/installCXXDependencies.sh
  - if [ "$ALL_DEPS" != "no" ] ; then sh build/travis/installDependencies.sh 1> /dev/null ; fi
  - if [ "$ALL_DEPS" != "no" ] ; then export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.20/bin:$PATH ; fi
  - if [ "$ALL_DEPS" != "no" ] ; then cabal update ; fi

script:
  - if [ "x$CMAKE_CONFIG" != "xnone" ] ; then mkdir cmake_build && cd cmake_build && cmake -GNinja -DQT_MOC_EXECUTABLE="moq-qt5" $CMAKE_CONFIG $TRAVIS_BUILD_DIR ; fi
  - if [ "x$CMAKE_CONFIG" != "xnone" ] ; then ninja ; fi
  - if [ "x$CMAKE_CONFIG" != "xnone" ] ; then cpack ; cd $TRAVIS_BUILD_DIR ; fi
  - if [ "x$CONFIG" != "xnone" ] ; then sh bootstrap.sh ; fi
  - if [ "x$CONFIG" != "xnone" ] ; then sh configure $CONFIG ; fi
  - if [ "x$CONFIG" != "xnone" ] ; then make $MAKE_TARGET -j2 ; fi

env:
  global:
    - TEST_NAME=""
    - CMAKE_CONFIG="none"
    - CONFIG="none"
    - MAKE_TARGET="check"
    - ALL_DEPS="no"
    - GHCVER=7.8.3

  matrix:
    # Put it here because it's most time consuming
    - TEST_NAME="make cross (gcc, automake)"
      CONFIG="--without-python"
      ALL_DEPS="yes"
      MAKE_TARGET="cross"

    # CMake builds
    - TEST_NAME="compiler (CMake + CPack)"
      CMAKE_CONFIG="-DBUILD_COMPILER=ON -DBUILD_LIBRARIES=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF"
    - TEST_NAME="all (CMake + CPack)"
      CMAKE_CONFIG=""
      ALL_DEPS="yes"
    - TEST_NAME="C++/boost-threads (CMake + CPack)"
      CMAKE_CONFIG="-DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_BOOSTTHREADS=ON"
    - TEST_NAME="C++/std-threads (CMake + CPack)"
      CMAKE_CONFIG="-DCMAKE_CXX_FLAGS=-std=c++0x -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_STDTHREADS=ON"
    - TEST_NAME="compiler (mingw32-gcc, CMake + CPack)"
      CMAKE_CONFIG="-DCMAKE_TOOLCHAIN_FILE=../contrib/mingw32-toolchain.cmake -DBUILD_COMPILER=ON -DBUILD_LIBRARIES=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF"

    # Autotool builds
    # TODO: Remove them as migration is made
    - TEST_NAME="compiler (automake)"
      CONFIG="--disable-libs"
    - TEST_NAME="all (automake)"
      CONFIG="--without-erlang --without-python --without-go --without-lua"
      ALL_DEPS="yes"
    - TEST_NAME="C & C++ & Haskell (automake)"
      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"
      ALL_DEPS="yes"
    - TEST_NAME="Small Set (automake)"
      CONFIG="--without-erlang --without-haskell --without-python --without-go --without-lua --without-d --without-ruby --without-nodejs --without-java"
      ALL_DEPS="yes"
    - TEST_NAME="dist (gcc, automake)"
      CONFIG=""
      ALL_DEPS="yes"
      MAKE_TARGET="dist"

matrix:
  allow_failures:
    # gcc fails on travis seemingly due to out of memory
    - compiler: gcc

  exclude:
    # This one takes very long
    - compiler: gcc
      env: TEST_NAME="make cross (gcc, automake)" CONFIG="--without-python" ALL_DEPS="yes" MAKE_TARGET="cross"

    # Does not use native compiler, no need to do it twice
    - compiler: gcc
      env: TEST_NAME="compiler (mingw32-gcc, CMake + CPack)" CMAKE_CONFIG="-DCMAKE_TOOLCHAIN_FILE=../contrib/mingw32-toolchain.cmake -DBUILD_COMPILER=ON -DBUILD_LIBRARIES=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF"
    - compiler: gcc
      env: TEST_NAME="dist (gcc, automake)" CONFIG="" ALL_DEPS="yes" MAKE_TARGET="dist"

  include:
    - env:
        - TEST_NAME="Debian Packages"
      compiler: clang
      before_install:
       - sh build/travis/installCXXDependencies.sh;
       - sh build/travis/installDependencies.sh 1> /dev/null;
       - 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
      script:
       - dpkg-buildpackage -tc -us -uc
       - ls -al ..


    # QA jobs for code analytics and metrics

    # static code analysis with cppcheck (we can add --enable=all later)
    - env:    TEST_NAME="cppcheck (compiler) error"
      script: cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 compiler/cpp/src
      before_install: sudo apt-get install cppcheck
    - env:    TEST_NAME="cppcheck (cpp) error"
      script: cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp
      before_install: sudo apt-get install cppcheck
    - env:    TEST_NAME="cppcheck (c_glib) error"
      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
      before_install: sudo apt-get install cppcheck
    # add --error-exitcode=1 as soon as everything is fixed
    - env:    TEST_NAME="cppcheck (compiler) all"
      script: cppcheck --force --quiet --inline-suppr --enable=all -j2 compiler/cpp/src
      before_install: sudo apt-get install cppcheck
    - env:    TEST_NAME="cppcheck (cpp) all"
      script: cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp
      before_install: sudo apt-get install cppcheck
    - env:    TEST_NAME="cppcheck (c_glib) all"
      script: cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib
      before_install: sudo apt-get install cppcheck

    # TODO use findbugs for Java
    # TODO use fxcop for C#

    # TODO do style checks

    # search for TODO within source tree
    - env:    TEST_NAME="TODO"
      before_install:
      script: grep -r TODO *
    # search for FIXME within source tree
    - env:    TEST_NAME="FIXME"
      before_install:
      script: grep -r FIXME *
    # search for HACK within source tree
    - env:    TEST_NAME="HACK"
      before_install:
      script: grep -r HACK *
    # some statistics about the code base
    - env:    TEST_NAME="sloccount"
      before_install:
      script: sloccount .
      before_install: sudo apt-get install sloccount
    # some info about the build machine
    - env:    TEST_NAME="info"
      before_install:
      script:
       - dpkg -l
       - uname -a

# TODO make it perfect ;-r
#
