<commit_before>sudo: required
dist: trusty
language: cpp
cache: ccache

branches:
  only:
    - 0.4

matrix:
  include:
    - compiler: gcc
      env: COMPILER=g++-4.9 PACKAGES=g++-4.9
    - compiler: gcc
      env: COMPILER=g++-5 PACKAGES=g++-5
    - compiler: gcc
      env: COMPILER=g++-6 PACKAGES=g++-6
    - compiler: gcc
      env: COMPILER=g++-7 PACKAGES=g++-7
    - compiler: clang
      env: COMPILER=clang++-3.6 PACKAGES=clang-3.6_libc++abi-dev_libc++-dev PARAMS=--libc++
    - compiler: clang
      env: COMPILER=clang++-3.7 PACKAGES=clang-3.7_libc++abi-dev_libc++-dev PARAMS=--libc++
    - compiler: clang
      env: COMPILER=clang++-3.8 PACKAGES=clang-3.8_libc++abi-dev_libc++-dev PARAMS=--libc++
    - compiler: clang
      env: COMPILER=clang++-3.9 PACKAGES=clang-3.9_libc++abi-dev_libc++-dev PARAMS=--libc++
    - compiler: clang
      env: COMPILER=clang++-4.0 PACKAGES=clang-4.0_libc++abi-dev_libc++-dev PARAMS=--libc++
    - os: osx
      osx_image: xcode7.3.1
      env: COMPILER=xcode7
    - os: osx
      osx_image: xcode8
      env: COMPILER=xcode8

install:
  - echo $TRAVIS_OS_NAME
  - |
    if [ "$TRAVIS_OS_NAME" = "osx" ]; then
      brew update
      brew install cmake ninja eigen devil libarchive ccache
      brew link libarchive --force
      export PATH="/usr/local/opt/ccache/libexec:$PATH"
    fi
  - |
    if [ "$TRAVIS_OS_NAME" = "linux" ]; then
      sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
      sudo add-apt-repository ppa:nschloe/eigen-backports -y
      sudo add-apt-repository ppa:jonathonf/llvm -y
      sudo apt-get update -qq
      sudo apt-get install -y ${PACKAGES//_/ } cmake cmake-data ninja-build libdevil-dev libeigen3-dev libarchive-dev
      export CXX="$COMPILER"
    fi
  - mkdir build

before_script:
  - pwd

script:
  - time bash build.sh --build-type Release --generator ninja --float --werror ${PARAMS}
  - ./build-release/apps/info --system
  - cd build-release/test && time ctest -j 3 -E "test_task_*"
  - cd ../../
  - time bash build.sh --build-type Debug --generator ninja --float --werror ${PARAMS}
  - cd build-debug/test && time ctest -j 3 -E "test_task_*"
#  - cd ../../
#  - ./build-release/apps/info --system
#  - time bash build.sh --build-type Release --generator ninja --double ${PARAMS}
#  - cd build-release/test && time ctest -j 3 -E "test_task_*"<commit_msg>improve travis script to use ccache<commit_after>sudo: required
dist: trusty
language: cpp
cache: ccache

branches:
  only:
    - 0.4

matrix:
  include:
    - compiler: gcc
      env: COMPILER=g++-4.9 PACKAGES=g++-4.9
    - compiler: gcc
      env: COMPILER=g++-5 PACKAGES=g++-5
    - compiler: gcc
      env: COMPILER=g++-6 PACKAGES=g++-6
    - compiler: gcc
      env: COMPILER=g++-7 PACKAGES=g++-7
    - compiler: clang
      env: COMPILER=clang++-3.6 PACKAGES=clang-3.6_libc++abi-dev_libc++-dev PARAMS=--libc++
    - compiler: clang
      env: COMPILER=clang++-3.7 PACKAGES=clang-3.7_libc++abi-dev_libc++-dev PARAMS=--libc++
    - compiler: clang
      env: COMPILER=clang++-3.8 PACKAGES=clang-3.8_libc++abi-dev_libc++-dev PARAMS=--libc++
    - compiler: clang
      env: COMPILER=clang++-3.9 PACKAGES=clang-3.9_libc++abi-dev_libc++-dev PARAMS=--libc++
    - compiler: clang
      env: COMPILER=clang++-4.0 PACKAGES=clang-4.0_libc++abi-dev_libc++-dev PARAMS=--libc++
    - os: osx
      osx_image: xcode7.3.1
      env: COMPILER=xcode7
    - os: osx
      osx_image: xcode8
      env: COMPILER=xcode8

install:
  - echo $TRAVIS_OS_NAME
  - |
    if [ "$TRAVIS_OS_NAME" = "osx" ]; then
      brew update
      brew install cmake ninja eigen devil libarchive ccache
      brew link libarchive --force
      export PATH="/usr/local/opt/ccache/libexec:$PATH"
    fi
  - |
    if [ "$TRAVIS_OS_NAME" = "linux" ]; then
      sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
      sudo add-apt-repository ppa:nschloe/eigen-backports -y
      sudo add-apt-repository ppa:jonathonf/llvm -y
      sudo apt-get update -qq
      sudo apt-get install -y ${PACKAGES//_/ } ccache cmake cmake-data ninja-build libdevil-dev libeigen3-dev libarchive-dev
      export CXX="$COMPILER"
      export CCACHE_CPP2=true
    fi
  - mkdir build

before_script:
  - pwd

script:
  - time bash build.sh --build-type Release --generator ninja --float --werror ${PARAMS}
  - ./build-release/apps/info --system
  - cd build-release/test && time ctest -j 3 -E "test_task_*"
  - cd ../../
  - time bash build.sh --build-type Debug --generator ninja --float --werror ${PARAMS}
  - cd build-debug/test && time ctest -j 3 -E "test_task_*"
#  - cd ../../
#  - ./build-release/apps/info --system
#  - time bash build.sh --build-type Release --generator ninja --double ${PARAMS}
#  - cd build-release/test && time ctest -j 3 -E "test_task_*"
{'fraction_non_alphanumeric': 0.15257082896117524, 'fraction_numerical': 0.017838405036726127, 'mean_word_length': 2.5807663410969197, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '7603425', 'n_tokens_mistral': 1938, 'n_tokens_neox': 1830, 'n_words': 401}