<commit_before>language: cpp
sudo: false

compiler:
  - clang

linux_gcc: &linux_gcc
  os: linux
  dist: xenial
  compiler: gcc
  addons:
    apt:
      sources:
        - ubuntu-toolchain-r-test
      packages:
        - g++-5

linux_clang: &linux_clang
  os: linux
  dist: xenial
  compiler: clang
  addons:
    apt:
      sources:
        - ubuntu-toolchain-r-test
        - llvm-toolchain-trusty-4.0
      packages:
        - clang-4.0

matrix:
  include:
  - <<: *linux_gcc
    env:
      - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && CONFIG=Debug && SHARED=False"

  - <<: *linux_gcc
    env:
      - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && CONFIG=Debug && SHARED=True"

  - <<: *linux_gcc
    env:
      - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && CONFIG=Release && SHARED=False"

  - <<: *linux_gcc
    env:
      - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && CONFIG=Release && SHARED=True"

  - <<: *linux_gcc
    env:
      - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && CONFIG=Debug && SHARED=False && SANITIZE=address"

  - <<: *linux_gcc
    env:
      - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && CONFIG=Debug && SHARED=False && COVERAGE=ON"

  - <<: *linux_clang
    env:
     - MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0 && CONFIG=Debug && SHARED=False"

  - <<: *linux_clang
    env:
     - MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0 && CONFIG=Debug && SHARED=True"

  - <<: *linux_clang
    env:
     - MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0 && CONFIG=Release && SHARED=False"

  - <<: *linux_clang
    env:
     - MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0 && CONFIG=Release && SHARED=True"

cache:
  - apt: true
  - directories:
    - lcov
    - .conan

before_install:
# Set up CC/CXX variables
  - eval "${MATRIX_EVAL}"
  - export CMAKE=cmake

# workaround for not having lcov 1.13
  - if [ ! -d "lcov/usr/local/bin/lcov" ]; then
      wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.13.orig.tar.gz;
      tar -xzf lcov_1.13.orig.tar.gz;
      mkdir lcov || true;
      DESTDIR=$HOME/lcov make -C lcov-1.13/ install;
    fi
  - export LCOV=$HOME/lcov/usr/local/bin/lcov

# install conan for package dependencies
  - pip install --user conan

# install coverage software
  - if [ "$COVERAGE" == "ON" ]; then gem install coveralls-lcov; fi

before_script:
  - mkdir build || true
  - cd build
  - conan remote add nonstd-lite https://api.bintray.com/conan/agauniyal/nonstd-lite
  - conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
  - conan remote add kazdragon-conan https://api.bintray.com/conan/kazdragon/conan-public
  - conan install .. -s compiler.libcxx=libstdc++11 -s cppstd=14 -o munin:withTests=True -o munin:shared=$SHARED --build=missing
  - conan build -c ..
  - $CMAKE -DCMAKE_BUILD_TYPE=$CONFIG -DMUNIN_SANITIZE=$SANITIZE -DMUNIN_COVERAGE=$COVERAGE ..

script:
  - make -j2
  - if [ "$COVERAGE" == "ON" ]; then
        $LCOV --gcov-tool=gcov-5 --base-directory . --directory . --zerocounters -q;
    fi
  - make test

after_failure:
  - cat Testing/Temporary/LastTest.log

after_success:
  - if [ "$COVERAGE" == "ON" ]; then
        $LCOV --gcov-tool=gcov-5 --base-directory . --directory .  --capture --output-file coverage.info;
        $LCOV --gcov-tool=gcov-5 --remove coverage.info '*/test/*' '/usr/*' '*/ext/*' '*/json/*' '*/.conan/*' --output-file coverage.info;
        $LCOV --gcov-tool=gcov-5 --list coverage.info;
        coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info;
    fi

notifications:
  email:
    on_success: change # [always|never|change] # default: change
    on_failure: change # [always|never|change] # default: always
  slack:
    rooms:
      - kazdragon:E8B4Cs4p3TiVLqHAq8wYYTr3#ci TODO: new token.

<commit_msg>Explicitly pinned Travis caches to $HOME directory (#145)<commit_after>language: cpp
sudo: false

compiler:
  - clang

linux_gcc: &linux_gcc
  os: linux
  dist: xenial
  compiler: gcc
  addons:
    apt:
      sources:
        - ubuntu-toolchain-r-test
      packages:
        - g++-5

linux_clang: &linux_clang
  os: linux
  dist: xenial
  compiler: clang
  addons:
    apt:
      sources:
        - ubuntu-toolchain-r-test
        - llvm-toolchain-trusty-4.0
      packages:
        - clang-4.0

matrix:
  include:
  - <<: *linux_gcc
    env:
      - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && CONFIG=Debug && SHARED=False"

  - <<: *linux_gcc
    env:
      - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && CONFIG=Debug && SHARED=True"

  - <<: *linux_gcc
    env:
      - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && CONFIG=Release && SHARED=False"

  - <<: *linux_gcc
    env:
      - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && CONFIG=Release && SHARED=True"

  - <<: *linux_gcc
    env:
      - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && CONFIG=Debug && SHARED=False && SANITIZE=address"

  - <<: *linux_gcc
    env:
      - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && CONFIG=Debug && SHARED=False && COVERAGE=ON"

  - <<: *linux_clang
    env:
     - MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0 && CONFIG=Debug && SHARED=False"

  - <<: *linux_clang
    env:
     - MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0 && CONFIG=Debug && SHARED=True"

  - <<: *linux_clang
    env:
     - MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0 && CONFIG=Release && SHARED=False"

  - <<: *linux_clang
    env:
     - MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0 && CONFIG=Release && SHARED=True"

cache:
  - apt: true
  - directories:
    - $HOME/lcov
    - $HOME/.conan

before_install:
# Set up CC/CXX variables
  - eval "${MATRIX_EVAL}"
  - export CMAKE=cmake

# workaround for not having lcov 1.13
  - if [ ! -d "lcov/usr/local/bin/lcov" ]; then
      wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.13.orig.tar.gz;
      tar -xzf lcov_1.13.orig.tar.gz;
      mkdir lcov || true;
      DESTDIR=$HOME/lcov make -C lcov-1.13/ install;
    fi
  - export LCOV=$HOME/lcov/usr/local/bin/lcov

# install conan for package dependencies
  - pip install --user conan

# install coverage software
  - if [ "$COVERAGE" == "ON" ]; then gem install coveralls-lcov; fi

before_script:
  - mkdir build || true
  - cd build
  - conan remote add nonstd-lite https://api.bintray.com/conan/agauniyal/nonstd-lite || true
  - conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan || true
  - conan remote add kazdragon-conan https://api.bintray.com/conan/kazdragon/conan-public || true
  - conan install .. -s compiler.libcxx=libstdc++11 -s cppstd=14 -o munin:withTests=True -o munin:shared=$SHARED --build=missing
  - conan build -c ..
  - $CMAKE -DCMAKE_BUILD_TYPE=$CONFIG -DMUNIN_SANITIZE=$SANITIZE -DMUNIN_COVERAGE=$COVERAGE ..

script:
  - make -j2
  - if [ "$COVERAGE" == "ON" ]; then
        $LCOV --gcov-tool=gcov-5 --base-directory . --directory . --zerocounters -q;
    fi
  - make test

after_failure:
  - cat Testing/Temporary/LastTest.log

after_success:
  - if [ "$COVERAGE" == "ON" ]; then
        $LCOV --gcov-tool=gcov-5 --base-directory . --directory .  --capture --output-file coverage.info;
        $LCOV --gcov-tool=gcov-5 --remove coverage.info '*/test/*' '/usr/*' '*/ext/*' '*/json/*' '*/.conan/*' --output-file coverage.info;
        $LCOV --gcov-tool=gcov-5 --list coverage.info;
        coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info;
    fi

notifications:
  email:
    on_success: change # [always|never|change] # default: change
    on_failure: change # [always|never|change] # default: always
  slack:
    rooms:
      - kazdragon:E8B4Cs4p3TiVLqHAq8wYYTr3#ci TODO: new token.


{'fraction_non_alphanumeric': 0.16817456093666844, 'fraction_numerical': 0.016365087812666313, 'mean_word_length': 2.6739980449657867, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5467030', 'n_tokens_mistral': 3174, 'n_tokens_neox': 3016, 'n_words': 546}