language: c
compiler:
  - gcc
  - clang
# Change this to your needs
before_script:
  - cd $TRAVIS_BUILD_DIR/..
  - mkdir build && cd build
  - cmake -DBUILD_STATIC=OFF -DCMAKE_BUILD_TYPE=Debug -DUSE_GCOV=ON -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/../install $TRAVIS_BUILD_DIR
script:
  - make
  - OY_MODULE_PATH=$TRAVIS_BUILD_DIR/../build/src/modules XDG_DATA_DIRS=$TRAVIS_BUILD_DIR make check
  - if [[ "$CC" == "gcc" ]]; then
      OY_MODULE_PATH=$TRAVIS_BUILD_DIR/../build/src/modules XDG_DATA_DIRS=$TRAVIS_BUILD_DIR make test-2;
      OY_MODULE_PATH=$TRAVIS_BUILD_DIR/../build/src/modules XDG_DATA_DIRS=$TRAVIS_BUILD_DIR make coverage;
      bash <(curl -s https://codecov.io/bash) -f coverage.info -R $TRAVIS_BUILD_DIR -X gcov;
    fi

before_install:
  - sudo apt-get update -qq
  - sudo apt-get install -y locales cmake pkg-config libxml2-dev libyajl-dev gettext valgrind icc-profiles-free lcov pkg-config libxfixes-dev libxmu-dev x11proto-xext-dev libxinerama-dev libxrandr-dev libxxf86vm-dev x11proto-xf86vidmode-dev liblcms2-dev libraw-dev libexiv2-dev libcups2-dev doxygen graphviz 
