language: rust
sudo: required
dist: trusty

cache:
  directories:
  - ~/llvm

matrix:
  include:
    - os: linux
      rust: stable
#    - os: osx
#      rust: stable

install:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./build_linux.sh; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
        brew config;
        brew update;
        brew install -v https://raw.githubusercontent.com/Homebrew/homebrew-versions/master/llvm38.rb; fi

script:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export LIBCLANG_STATIC_PATH=~/clang/lib; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export LLVM_CONFIG_PATH=/usr/local/bin/llvm-config-3.8; export LIBCLANG_STATIC_PATH=`/usr/local/bin/llvm-config-3.8 --libdir`; fi
  - cargo build --verbose
  - RUST_TEST_THREADS=1 cargo test --verbose

language: rust
sudo: required
dist: trusty

cache:
  directories:
  - ~/llvm

matrix:
  include:
    - os: linux
      rust: stable
#    - os: osx
#      rust: stable

install:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./build_linux.sh; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
        brew config;
        brew update;
        brew install -v https://raw.githubusercontent.com/Homebrew/homebrew-versions/master/llvm38.rb; fi

script:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export LIBCLANG_STATIC_PATH=~/clang/lib; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export LLVM_CONFIG_PATH=/usr/local/bin/llvm-config-3.8; export LIBCLANG_STATIC_PATH=`/usr/local/bin/llvm-config-3.8 --libdir`; fi
  - cargo build --verbose
  - RUST_TEST_THREADS=1 cargo test --verbose

after_success: |
  if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
    sudo apt-get install libcurl4-openssl-dev libelf-dev libdw-dev &&
    wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
    tar xzf master.tar.gz &&
    mkdir kcov-master/build &&
    cd kcov-master/build &&
    cmake .. &&
    make &&
    sudo make install &&
    cd ../.. &&
    kcov --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo target/kcov target/debug/cpp-codegen-rs-*;
  fi

Add coverage to linux build
Add coverage to linux build
