sudo: required

services:
    - docker

language: cpp

compiler: gcc

cache:
  directories:
  - $HOME/.hunter
  - $HOME/.ccache

before_install:
  - pip install --user cpp-coveralls

install:
    - if [ $TRAVIS_OS_NAME == osx ]; then
           brew update;
           brew install openssl cmake ccache;
           export PATH="/usr/local/opt/ccache/libexec:$PATH";
      fi

script:
    - if [ $TRAVIS_OS_NAME == osx ]; then
          mkdir build;
          cd build;
          cmake ..;
          make;
          make test;
      fi
    - if [ $TRAVIS_OS_NAME == linux ]; then
          cd ${HOME}/build;
          mv cpp-ipfs/cpp-multihash ${HOME}/src;
          docker run -v $HOME:/root --privileged -it lockblox/orthodox;
      fi

after_success:
  - if [ $TRAVIS_OS_NAME == linux ]; then
      find $HOME -name "*.gcda";
      cd ${HOME}/src;
      coveralls --gcov llvm-cov --gcov-options gcov --verbose -i multihash
                --root $HOME/build;
    fi

branches:
    only:
    - master

notification:
    email: true

os:
- linux
- osx

sudo: required

services:
    - docker

language: cpp

compiler: gcc

cache:
  directories:
  - $HOME/.hunter
  - $HOME/.ccache

before_install:
  - pip install --user cpp-coveralls

install:
    - if [ $TRAVIS_OS_NAME == osx ]; then
           brew update;
           brew install openssl cmake ccache;
           export PATH="/usr/local/opt/ccache/libexec:$PATH";
      fi

script:
    - if [ $TRAVIS_OS_NAME == osx ]; then
          mkdir build;
          cd build;
          cmake ..;
          make;
          make test;
      fi
    - if [ $TRAVIS_OS_NAME == linux ]; then
          cd ${HOME}/build;
          mv cpp-ipfs/cpp-multihash ${HOME}/src;
          docker run -v $HOME:/root --privileged -it lockblox/orthodox;
      fi

after_success:
  - if [ $TRAVIS_OS_NAME == linux ]; then
      find $HOME -name "*.gcda";
      cd ${HOME}/src;
      pwd;
      coveralls --gcov llvm-cov --gcov-options gcov --verbose -i multihash
    fi

branches:
    only:
    - master

notification:
    email: true

os:
- linux
- osx

Print working directory before running coveralls
Print working directory before running coveralls
