<commit_before>language: cpp

addons:
  apt:
    sources:
      - llvm-toolchain-trusty-3.8
      - ubuntu-toolchain-r-test
    packages:
      - clang-3.8
      - g++-5
      - lcov
      - valgrind

cache:
  ccache: true

matrix:
  include:

    # Linux clang
    - os: linux
      sudo: required
      env: BUILD_TYPE=Debug USE_VALGRIND=true CMAKE_GENERATOR="Unix Makefiles"
      compiler: clang

    - os: linux
      sudo: required
      env: BUILD_TYPE=Debug SANITIZE=undefined CMAKE_GENERATOR="Unix Makefiles"
      compiler: clang

    - os: linux
      sudo: required
      env: BUILD_TYPE=Debug SANITIZE=address CMAKE_GENERATOR="Unix Makefiles"
      compiler: clang

    - os: linux
      sudo: required
      env: BUILD_TYPE=Release CMAKE_GENERATOR="Unix Makefiles"
      compiler: clang

    # Linux gcc
    - os: linux
      sudo: false
      env: BUILD_TYPE=Debug USE_VALGRIND=true CMAKE_GENERATOR="Unix Makefiles"
      compiler: gcc

    - os: linux
      sudo: false
      env: BUILD_TYPE=Debug SANITIZE=undefined CMAKE_GENERATOR="Unix Makefiles"
      compiler: gcc

    - os: linux
      sudo: false
      env: BUILD_TYPE=Debug SANITIZE=address CMAKE_GENERATOR="Unix Makefiles"
      compiler: gcc

    - os: linux
      sudo: false
      env: BUILD_TYPE=Release CMAKE_GENERATOR="Unix Makefiles"
      compiler: gcc

    # OSX clang
    - os: osx
      osx_image: xcode8
      env: BUILD_TYPE=Debug USE_VALGRIND=true CMAKE_GENERATOR="Xcode"
      compiler: clang

    - os: osx
      osx_image: xcode8
      env: BUILD_TYPE=Release CMAKE_GENERATOR="Xcode"
      compiler: clang

    # Code coverage
    - os: linux
      sudo: false
      if: branch in (master, develop)
      env: BUILD_TYPE=Debug CMAKE_GENERATOR="Unix Makefiles" ENABLE_COVERAGE=true
      compiler: gcc

    # Conan
    - os: linux
      sudo: required
      language: python
      python: "3.6"
      if: branch = master
      env: CC=clang CXX=clang++
      install:
        - pip install conan
      script:
        - conan create . morwenn/stable
      after_success:
        - conan remote add bintray https://api.bintray.com/conan/morwenn/cpp-sort
        - conan user -r bintray -p ${CONAN_PASSWORD} morwenn
        - conan upload --all -r bintray cpp-sort/1.0.0@morwenn/stable

before_install:
  - if [[ $TRAVIS_OS_NAME = "osx" ]]; then
        brew update;
        brew install ccache valgrind;
        export PATH="/usr/local/opt/ccache/libexec:$PATH";
    fi
  - if [[ $TRAVIS_OS_NAME = "linux" && $CXX = "clang++" ]]; then
        sudo ln -s ../../bin/ccache /usr/lib/ccache/clang++;
        export CXXFLAGS="-Qunused-arguments";<commit_msg>Make ccache path detection a bit more automagic<commit_after>language: cpp

addons:
  apt:
    sources:
      - llvm-toolchain-trusty-3.8
      - ubuntu-toolchain-r-test
    packages:
      - clang-3.8
      - g++-5
      - lcov
      - valgrind

cache:
  ccache: true

matrix:
  include:

    # Linux clang
    - os: linux
      sudo: required
      env: BUILD_TYPE=Debug USE_VALGRIND=true CMAKE_GENERATOR="Unix Makefiles"
      compiler: clang

    - os: linux
      sudo: required
      env: BUILD_TYPE=Debug SANITIZE=undefined CMAKE_GENERATOR="Unix Makefiles"
      compiler: clang

    - os: linux
      sudo: required
      env: BUILD_TYPE=Debug SANITIZE=address CMAKE_GENERATOR="Unix Makefiles"
      compiler: clang

    - os: linux
      sudo: required
      env: BUILD_TYPE=Release CMAKE_GENERATOR="Unix Makefiles"
      compiler: clang

    # Linux gcc
    - os: linux
      sudo: false
      env: BUILD_TYPE=Debug USE_VALGRIND=true CMAKE_GENERATOR="Unix Makefiles"
      compiler: gcc

    - os: linux
      sudo: false
      env: BUILD_TYPE=Debug SANITIZE=undefined CMAKE_GENERATOR="Unix Makefiles"
      compiler: gcc

    - os: linux
      sudo: false
      env: BUILD_TYPE=Debug SANITIZE=address CMAKE_GENERATOR="Unix Makefiles"
      compiler: gcc

    - os: linux
      sudo: false
      env: BUILD_TYPE=Release CMAKE_GENERATOR="Unix Makefiles"
      compiler: gcc

    # OSX clang
    - os: osx
      osx_image: xcode8
      env: BUILD_TYPE=Debug USE_VALGRIND=true CMAKE_GENERATOR="Xcode"
      compiler: clang

    - os: osx
      osx_image: xcode8
      env: BUILD_TYPE=Release CMAKE_GENERATOR="Xcode"
      compiler: clang

    # Code coverage
    - os: linux
      sudo: false
      if: branch in (master, develop)
      env: BUILD_TYPE=Debug CMAKE_GENERATOR="Unix Makefiles" ENABLE_COVERAGE=true
      compiler: gcc

    # Conan
    - os: linux
      sudo: required
      language: python
      python: "3.6"
      if: branch = master
      env: CC=clang CXX=clang++
      install:
        - pip install conan
      script:
        - conan create . morwenn/stable
      after_success:
        - conan remote add bintray https://api.bintray.com/conan/morwenn/cpp-sort
        - conan user -r bintray -p ${CONAN_PASSWORD} morwenn
        - conan upload --all -r bintray cpp-sort/1.0.0@morwenn/stable

before_install:
  - if [[ $TRAVIS_OS_NAME = "osx" ]]; then
        brew update;
        brew install ccache valgrind;
        export PATH="/usr/local/opt/ccache/libexec:$PATH";
    fi
  - if [[ $TRAVIS_OS_NAME = "linux" && $CXX = "clang++" ]]; then
        sudo ln -s $(which ccache) /usr/lib/ccache/clang++;
        export CXXFLAGS="-Qunused-arguments";
{'fraction_non_alphanumeric': 0.09584664536741214, 'fraction_numerical': 0.004510430370231159, 'mean_word_length': 2.3097014925373136, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1004259', 'n_tokens_mistral': 1934, 'n_tokens_neox': 1807, 'n_words': 437}