<commit_before>language: cpp
sudo: false

matrix:
  include:
    - compiler: clang
      env: COMPILER=clang++-3.6
      addons:
        apt:
          sources: &sources
            - boost-latest
            - llvm-toolchain-precise-3.6
            - llvm-toolchain-precise-3.7
            - llvm-toolchain-precise-3.8
            - ubuntu-toolchain-r-test
          packages:
            - clang-3.6
            - libstdc++-5-dev
            - libboost1.55-dev
            - libboost-iostreams1.55-dev
            - libboost-program-options1.55-dev
            - ninja-build
            - python-virtualenv
    - compiler: clang
      env: COMPILER=clang++-3.7
      addons:
        apt:
          sources: *sources
          packages:
            - clang-3.7
            - libstdc++-5-dev
            - libboost1.55-dev
            - libboost-iostreams1.55-dev
            - libboost-program-options1.55-dev
            - ninja-build
            - python-virtualenv
    - compiler: clang
      env: COMPILER=clang++-3.8
      addons:
        apt:
          sources: *sources
          packages:
            - clang-3.8
            - libstdc++-5-dev
            - libboost1.55-dev
            - libboost-iostreams1.55-dev
            - libboost-program-options1.55-dev
            - ninja-build
            - python-virtualenv
    - compiler: gcc
      # GCC doesn't like building in parallel on ninja. No idea why.
      env: COMPILER=g++-5 BUILD_ARGS="-j1"
      addons:
        apt:
          sources: *sources
          packages:
            - g++-5
            - libboost1.55-dev
            - libboost-iostreams1.55-dev
            - libboost-program-options1.55-dev
            - ninja-build
            - python-virtualenv
    - compiler: gcc
      env: COMPILER=g++-6 BUILD_ARGS="-j1"
      addons:
        apt:
          sources: *sources
          packages:
            - g++-6
            - libboost1.55-dev
            - libboost-iostreams1.55-dev
            - libboost-program-options1.55-dev
            - ninja-build
            - python-virtualenv
    - os: osx
      osx_image: xcode7.3
      env: COMPILER=clang++ BACKEND=ninja

cache:
  apt: true

before_install:
  - |
    if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
      brew update
      brew install ninja
      brew install python
      # For some reason, Homebrew's Python thinks msbuild will get installed by
      # bfg9000, and so is grumpy about not having lxml.
      pip install lxml
    else
      set -e
      virtualenv env && source env/bin/activate
    fi
  - pip install bfg9000
install:
  - |
    git clone https://github.com/jimporter/mettle.git
    pushd mettle
    CXX=${COMPILER} CXXFLAGS="-I`pwd`/../include" 9k build --backend=ninja --prefix=$HOME
    cd build<commit_msg>Update xcode version on Travis<commit_after>language: cpp
sudo: false

env:
  global:
    - PYTHON=python
    - PIP=pip

matrix:
  include:
    - compiler: clang
      env: COMPILER=clang++-3.6
      addons:
        apt:
          sources: &sources
            - boost-latest
            - llvm-toolchain-precise-3.6
            - llvm-toolchain-precise-3.7
            - llvm-toolchain-precise-3.8
            - ubuntu-toolchain-r-test
          packages:
            - clang-3.6
            - libstdc++-5-dev
            - libboost1.55-dev
            - libboost-iostreams1.55-dev
            - libboost-program-options1.55-dev
            - ninja-build
            - python-virtualenv
    - compiler: clang
      env: COMPILER=clang++-3.7
      addons:
        apt:
          sources: *sources
          packages:
            - clang-3.7
            - libstdc++-5-dev
            - libboost1.55-dev
            - libboost-iostreams1.55-dev
            - libboost-program-options1.55-dev
            - ninja-build
            - python-virtualenv
    - compiler: clang
      env: COMPILER=clang++-3.8
      addons:
        apt:
          sources: *sources
          packages:
            - clang-3.8
            - libstdc++-5-dev
            - libboost1.55-dev
            - libboost-iostreams1.55-dev
            - libboost-program-options1.55-dev
            - ninja-build
            - python-virtualenv
    - compiler: gcc
      # GCC doesn't like building in parallel on ninja. No idea why.
      env: COMPILER=g++-5 BUILD_ARGS="-j1"
      addons:
        apt:
          sources: *sources
          packages:
            - g++-5
            - libboost1.55-dev
            - libboost-iostreams1.55-dev
            - libboost-program-options1.55-dev
            - ninja-build
            - python-virtualenv
    - compiler: gcc
      env: COMPILER=g++-6 BUILD_ARGS="-j1"
      addons:
        apt:
          sources: *sources
          packages:
            - g++-6
            - libboost1.55-dev
            - libboost-iostreams1.55-dev
            - libboost-program-options1.55-dev
            - ninja-build
            - python-virtualenv
    - os: osx
      env: PYTHON=python2 PIP=pip2 COMPILER=clang++ BACKEND=ninja

cache:
  apt: true

before_install:
  - set -e
  - |
    if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
      shell_session_update() { :; }
      brew update
      brew install ${PYTHON} ninja
    else
      virtualenv env && source env/bin/activate
    fi
  - ${PIP} install bfg9000
install:
  - |
    git clone https://github.com/jimporter/mettle.git
    pushd mettle
    CXX=${COMPILER} CXXFLAGS="-I`pwd`/../include" 9k build --backend=ninja --prefix=$HOME
    cd build
{'fraction_non_alphanumeric': 0.10600512632735262, 'fraction_numerical': 0.02965946539729037, 'mean_word_length': 1.3436293436293436, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1111038', 'n_tokens_mistral': 1828, 'n_tokens_neox': 1766, 'n_words': 329}