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

#===---------------------------------------------------------------------------------------------===
#   Build Matrix
#===---------------------------------------------------------------------------------------------===

matrix:
  include:

  # OSX / Clang
  - os: osx
    osx_image: xcode7.3
    env: CONFIG=Debug
      
  - os: osx
    osx_image: xcode7.3
    env: CONFIG=Release

  - os: osx
    osx_image: xcode8
    env: CONFIG=Debug

  - os: osx
    osx_image: xcode8
    env: CONFIG=Release

  # Linux / GCC
  - os: linux
    compiler: gcc
    env: 
      - CXX_COMPILER=g++-4.9
      - C_COMPILER=gcc-4.9
      - CONFIG=Release
    addons:
      apt:
        sources: ['ubuntu-toolchain-r-test']
        packages: 
          - gcc-4.9
          - g++-4.9
          - libboost-all-dev
          
#  - os: linux
#    compiler: gcc
#    env: COMPILER=g++-5
#    addons:
#      apt:
#        sources: ['ubuntu-toolchain-r-test']
#        packages: g++-5

#  - os: linux
#    compiler: gcc
#    env: COMPILER=g++-6
#    addons:
#      apt:
#        sources: ['ubuntu-toolchain-r-test']
#        packages: g++-6

#  # Linux / Clang
#  - os: linux
#    env: LLVM_VERSION=3.6.2
#    compiler: clang
#    addons:
#      apt:
#        sources: ['ubuntu-toolchain-r-test']
#        packages: 
#          - libboost-all-dev
#          - python3
#          - python3-numpy
#          - python3-nose

#  - os: linux
#    env: LLVM_VERSION=3.7.1
#    compiler: clang

#  - os: linux
#    env: LLVM_VERSION=3.8.1
#    compiler: clang
    
# Set directories to cache
#cache:
#  directories:
#    - ${TRAVIS_BUILD_DIR}/deps/llvm-3.6.2
#    - ${TRAVIS_BUILD_DIR}/deps/llvm-3.7.1
#    - ${TRAVIS_BUILD_DIR}/deps/llvm-3.8.1


#===---------------------------------------------------------------------------------------------===
#   Installation
#===---------------------------------------------------------------------------------------------===

install:
  # Create deps dir if not existing
  - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
  - mkdir -p ${DEPS_DIR}
  - pushd $(pwd)
  - cd ${DEPS_DIR}

  # Make sure CXX and C are set correctly for Linux builds
  - if [[ "${CXX_COMPILER}" != "" ]]; then export CXX=${CXX_COMPILER}; fi
  - if [[ "${C_COMPILER}" != "" ]]; then export CC=${C_COMPILER}; fi
  
  # Make sure CMAKE_BUILD_TYPE is correctly set
  - if [[ "${CONFIG}" != "" ]]; then export CMAKE_BUILD_TYPE=${CONFIG}; fi

  # install LLVM/clang when LLVM_VERSION is set
#  - |
#     if [[ "${LLVM_VERSION}" != "" ]]; then
#       LLVM_DIR=${DEPS_DIR}/llvm-${LLVM_VERSION}
#       if [[ -z "$(ls -A ${LLVM_DIR})" ]]; then
#         travis_retry wget --quiet https://cmake.org/files/v3.6/cmake-3.6.1.tar.gz
#         tar xfz cmake-3.6.1.tar.gz
#         (cd cmake-3.6.1 && ./configure --prefix=${LLVM_DIR}/cmake && make install)
#         export PATH="${LLVM_DIR}/cmake/bin:${PATH}"
#         LLVM_URL="http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz"
#         LIBCXX_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxx-${LLVM_VERSION}.src.tar.xz"
#         LIBCXXABI_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxxabi-${LLVM_VERSION}.src.tar.xz"
#         CLANG_URL="http://llvm.org/releases/${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-ubuntu-14.04.tar.xz"
#         mkdir -p ${LLVM_DIR} ${LLVM_DIR}/build ${LLVM_DIR}/projects/libcxx ${LLVM_DIR}/projects/libcxxabi ${LLVM_DIR}/clang
#         travis_retry wget --quiet -O - ${LLVM_URL}      | tar --strip-components=1 -xJ -C ${LLVM_DIR}
#         travis_retry wget --quiet -O - ${LIBCXX_URL}    | tar --strip-components=1 -xJ -C ${LLVM_DIR}/projects/libcxx
#         travis_retry wget --quiet -O - ${LIBCXXABI_URL} | tar --strip-components=1 -xJ -C ${LLVM_DIR}/projects/libcxxabi
#         travis_retry wget --quiet -O - ${CLANG_URL}     | tar --strip-components=1 -xJ -C ${LLVM_DIR}/clang
#         (cd ${LLVM_DIR}/build && cmake .. -DCMAKE_INSTALL_PREFIX=${LLVM_DIR}/install -DCMAKE_CXX_COMPILER=clang++)
#         (cd ${LLVM_DIR}/build/projects/libcxx && make install -j2)
#         (cd ${LLVM_DIR}/build/projects/libcxxabi && make install -j2)
#       fi
#       export CXXFLAGS="-nostdinc++ -isystem ${LLVM_DIR}/install/include/c++/v1"
#       export LDFLAGS="-L ${LLVM_DIR}/install/lib -l c++ -l c++abi"
#       export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${LLVM_DIR}/install/lib"
#       export PATH="${LLVM_DIR}/clang/bin:${PATH}"
#     fi
     
  # Install a recent CMake (unless already installed on OS X)
  - |
    if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
      CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz"
      mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
      export PATH=${DEPS_DIR}/cmake/bin:$PATH
    else 
      if ! brew ls --version cmake &>/dev/null; then brew install cmake; fi
    fi
  
  # Install Python dependencies (Linux)
  - |
    if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 
      PYTHON_DIR=/opt/python/3.5.0
      ${PYTHON_DIR}/bin/pip3 install nose numpy
    fi
    
  # Install Python dependencies (Mac OSX)
  - |
    if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 
      brew update
      brew install python3
      pip3 install numpy matplotlib nose
      
      brew tap homebrew/science
      brew install netcdf

      export PATH=/usr/local/bin:${PATH}
    fi
  
  - popd
  
#===---------------------------------------------------------------------------------------------===
#   Building
#===---------------------------------------------------------------------------------------------=== 
  
before_script:
  - mkdir build
  - pushd $(pwd)
  - cd build

  # Linux build
  - |
    if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 
      cmake ../ -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DPYTHON_EXECUTABLE=${PYTHON_DIR}/bin/python3
    fi
  
  # OSX build
  - |
    if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 
      cmake ../ -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
    fi
  
  - make
  
  - popd

#===---------------------------------------------------------------------------------------------===
#   Testing
#===---------------------------------------------------------------------------------------------=== 

script:
  - pushd $(pwd)
  - cd build

  # Run Python, C and C++ unittests
  - ctest --output-on-failure --force-new-ctest-process

  - popd
 
notifications:
  email:
    recipients:
      - <EMAIL>
    on_success: never
    on_failure: always

<commit_msg>Enable clang in travis builds<commit_after>sudo: required
dist: trusty
language: cpp

#===---------------------------------------------------------------------------------------------===
#   Build Matrix
#===---------------------------------------------------------------------------------------------===

matrix:
  include:

  # OSX / Clang
  - os: osx
    osx_image: xcode7.3
    env: CONFIG=Debug
      
  - os: osx
    osx_image: xcode7.3
    env: CONFIG=Release

  - os: osx
    osx_image: xcode8
    env: CONFIG=Debug

  - os: osx
    osx_image: xcode8
    env: CONFIG=Release

  # Linux / GCC
  - os: linux
    compiler: gcc
    env: 
      - CXX_COMPILER=g++-4.9
      - C_COMPILER=gcc-4.9
      - CONFIG=Release
    addons:
      apt:
        sources: ['ubuntu-toolchain-r-test']
        packages: 
          - gcc-4.9
          - g++-4.9
          - libboost-all-dev
          
  - os: linux
    compiler: gcc
    env: 
      - CXX_COMPILER=g++-4.9
      - C_COMPILER=gcc-4.9
      - CONFIG=Debug
    addons:
      apt:
        sources: ['ubuntu-toolchain-r-test']
        packages: 
          - gcc-4.9
          - g++-4.9
          - libboost-all-dev
          
#  - os: linux
#    compiler: gcc
#    env: COMPILER=g++-5
#    addons:
#      apt:
#        sources: ['ubuntu-toolchain-r-test']
#        packages: g++-5

#  - os: linux
#    compiler: gcc
#    env: COMPILER=g++-6
#    addons:
#      apt:
#        sources: ['ubuntu-toolchain-r-test']
#        packages: g++-6

  # Linux / Clang
  - os: linux
    env: 
      - LLVM_VERSION=3.6.2
      - CONFIG=Release
    compiler: clang
    addons:
      apt:
        sources: ['ubuntu-toolchain-r-test']
        packages: 
          - libboost-all-dev

#  - os: linux
#    env: LLVM_VERSION=3.7.1
#    compiler: clang

#  - os: linux
#    env: LLVM_VERSION=3.8.1
#    compiler: clang
    
# Set directories to cache
cache:
  directories:
    - ${TRAVIS_BUILD_DIR}/deps/llvm-3.6.2
#    - ${TRAVIS_BUILD_DIR}/deps/llvm-3.7.1
#    - ${TRAVIS_BUILD_DIR}/deps/llvm-3.8.1


#===---------------------------------------------------------------------------------------------===
#   Installation
#===---------------------------------------------------------------------------------------------===

install:
  # Create deps dir if not existing
  - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
  - mkdir -p ${DEPS_DIR}
  - pushd $(pwd)
  - cd ${DEPS_DIR}

  # Make sure CXX and C are set correctly for Linux builds
  - if [[ "${CXX_COMPILER}" != "" ]]; then export CXX=${CXX_COMPILER}; fi
  - if [[ "${C_COMPILER}" != "" ]]; then export CC=${C_COMPILER}; fi
  
  # Make sure CMAKE_BUILD_TYPE is correctly set
  - if [[ "${CONFIG}" != "" ]]; then export CMAKE_BUILD_TYPE=${CONFIG}; fi

  # Install LLVM/clang when LLVM_VERSION is set (check if chached)
  - |
     if [[ "${LLVM_VERSION}" != "" ]]; then
       LLVM_DIR=${DEPS_DIR}/llvm-${LLVM_VERSION}
       if [[ -z "$(ls -A ${LLVM_DIR})" ]]; then
         travis_retry wget --quiet https://cmake.org/files/v3.6/cmake-3.6.1.tar.gz
         tar xfz cmake-3.6.1.tar.gz
         (cd cmake-3.6.1 && ./configure --prefix=${LLVM_DIR}/cmake && make install)
         export PATH="${LLVM_DIR}/cmake/bin:${PATH}"
         LLVM_URL="http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz"
         LIBCXX_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxx-${LLVM_VERSION}.src.tar.xz"
         LIBCXXABI_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxxabi-${LLVM_VERSION}.src.tar.xz"
         CLANG_URL="http://llvm.org/releases/${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-ubuntu-14.04.tar.xz"
         mkdir -p ${LLVM_DIR} ${LLVM_DIR}/build ${LLVM_DIR}/projects/libcxx ${LLVM_DIR}/projects/libcxxabi ${LLVM_DIR}/clang
         travis_retry wget --quiet -O - ${LLVM_URL}      | tar --strip-components=1 -xJ -C ${LLVM_DIR}
         travis_retry wget --quiet -O - ${LIBCXX_URL}    | tar --strip-components=1 -xJ -C ${LLVM_DIR}/projects/libcxx
         travis_retry wget --quiet -O - ${LIBCXXABI_URL} | tar --strip-components=1 -xJ -C ${LLVM_DIR}/projects/libcxxabi
         travis_retry wget --quiet -O - ${CLANG_URL}     | tar --strip-components=1 -xJ -C ${LLVM_DIR}/clang
         (cd ${LLVM_DIR}/build && cmake .. -DCMAKE_INSTALL_PREFIX=${LLVM_DIR}/install -DCMAKE_CXX_COMPILER=clang++)
         (cd ${LLVM_DIR}/build/projects/libcxx && make install -j2)
         (cd ${LLVM_DIR}/build/projects/libcxxabi && make install -j2)
       fi
       
       export CC="${LLVM_DIR}/clang/bin/clang"
       export CXX="${LLVM_DIR}/clang/bin/clang++"
       export CXXFLAGS="-nostdinc++ -isystem ${LLVM_DIR}/install/include/c++/v1"
       export LDFLAGS="-L ${LLVM_DIR}/install/lib -l c++ -l c++abi"
       export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${LLVM_DIR}/install/lib"
       export PATH="${LLVM_DIR}/clang/bin:${PATH}"
     fi
     
  # Install a recent CMake (unless already installed on OS X)
  - |
    if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
      CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz"
      mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
      export PATH=${DEPS_DIR}/cmake/bin:$PATH
    else 
      if ! brew ls --version cmake &>/dev/null; then brew install cmake; fi
    fi
  
  # Install Python dependencies (Linux)
  - |
    if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 
      PYTHON_DIR=/opt/python/3.5.0
      ${PYTHON_DIR}/bin/pip3 install nose numpy
    fi
    
  # Install Python dependencies (Mac OSX)
  - |
    if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 
      brew update
      brew install python3
      pip3 install numpy matplotlib nose
      
      brew tap homebrew/science
      brew install netcdf

      export PATH=/usr/local/bin:${PATH}
    fi
  
  - popd
  
#===---------------------------------------------------------------------------------------------===
#   Building
#===---------------------------------------------------------------------------------------------=== 
  
before_script:
  - mkdir build
  - pushd $(pwd)
  - cd build

  # Linux build
  - |
    if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 
      cmake ../ -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DPYTHON_EXECUTABLE=${PYTHON_DIR}/bin/python3
    fi
  
  # OSX build
  - |
    if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 
      cmake ../ -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
    fi
  
  - make
  
  - popd

#===---------------------------------------------------------------------------------------------===
#   Testing
#===---------------------------------------------------------------------------------------------=== 

script:
  - pushd $(pwd)
  - cd build

  # Run Python, C and C++ unittests
  - ctest --output-on-failure --force-new-ctest-process

  - popd
 
notifications:
  email:
    recipients:
      - <EMAIL>
    on_success: never
    on_failure: always


{'fraction_non_alphanumeric': 0.25858480749219565, 'fraction_numerical': 0.012561320053515682, 'mean_word_length': 1.6346191501860192, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '6758082', 'n_tokens_mistral': 4829, 'n_tokens_neox': 4615, 'n_words': 865}