<commit_before>sudo: true
dist: trusty
language: cpp
cache:
  directories:
    - $HOME/cmake-$CMAKE_VERSION.$CMAKE_PATCH-Linux-x86_64/bin
    - $HOME/cmake-$CMAKE_VERSION.$CMAKE_PATCH-Linux-x86_64/share
    - /tmp/downloads
env:
  global:
    - MAKEFLAGS=-j4
    - URHO3D_ENABLE_ALL=ON
    - CMAKE_VERSION=3.4
    - CMAKE_PATCH=3
    - URHO3D_WITH_MONO=ON
addons:
  apt:
    sources:
      - llvm-toolchain-trusty-6.0
      - ubuntu-toolchain-r-test
      - deadsnakes
    packages:
      - libasound2-dev
      - libxrandr-dev
      - libgl1-mesa-dev
      - libglu1-mesa-dev
      - g++-5
      - llvm-6.0
      - clang-6.0
      - libclang-6.0-dev
      - python3.6
notifications:
  email:
    on_success: never
    on_failure: never
branches:
  except:
    - /^(.*[^\w])?(appveyor|no-ci)-.+$/
matrix:
  fast_finish: true
  include:
    - &Linux-gcc
      os: linux
      compiler: gcc
      env:
        - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
    - <<: *Linux-gcc
      env:
        - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
        - BUILD_SHARED_LIBS=ON
    - &Linux-clang
      os: linux
      compiler: clang
    - <<: *Linux-clang
      env:
        - BUILD_SHARED_LIBS=ON
    - &MacOS
      os: osx
      osx_image: xcode8.3
      compiler: clang
    - <<: *MacOS
      env:
        - BUILD_SHARED_LIBS=ON
  exclude:
    - &MingW
      env:
        - CMAKE_TOOLCHAIN_FILE=CMake/Toolchains/MinGW.cmake
        - CMAKE_SYSTEM_PROCESSOR=x86_64
        - URHO3D_RENDERER=D3D9
      addons:
        apt:
          packages:
            - gcc-mingw-w64-x86-64
            - g++-mingw-w64-x86-64
            - binutils-mingw-w64-x86-64
    - <<: *MingW
      env:
        - BUILD_SHARED_LIBS=ON
        - CMAKE_TOOLCHAIN_FILE=CMake/Toolchains/MinGW.cmake
        - CMAKE_SYSTEM_PROCESSOR=x86_64
        - URHO3D_RENDERER=D3D9

before_install: |
  eval "${MATRIX_EVAL}"
  if [[ $TRAVIS_OS_NAME == 'linux' ]];
  then
      sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys <KEY>
      echo "deb http://download.mono-project.com/repo/ubuntu stable-trusty main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
      sudo apt-get update -qq
  else
      brew update
  fi

install: |
  # Update CMake to minimum required version
  mkdir -p /tmp/downloads
  if [[ $TRAVIS_OS_NAME == 'linux' ]];
  then
      if [[ ! -f /tmp/downloads/cmake.tar.gz ]];
      then
          wget --no-check-certificate https://cmake.org/files/v$CMAKE_VERSION/cmake-$CMAKE_VERSION.$CMAKE_PATCH-Linux-x86_64.tar.gz -O /tmp/downloads/cmake.tar.gz
      fi
      if [[ ! -f $HOME/cmake-$CMAKE_VERSION.$CMAKE_PATCH-Linux-x86_64/bin/cmake ]];
      then
          tar xf /tmp/downloads/cmake.tar.gz -C $HOME && rm /tmp/downloads/cmake.tar.gz
      fi
      export PATH=$HOME/cmake-$CMAKE_VERSION.$CMAKE_PATCH-Linux-x86_64/bin:$PATH
      sudo apt-get install -y --force-yes mono-devel
  else
      # mono
      if [[ ! -f /tmp/downloads/Mono.pkg ]];
      then
          wget https://download.mono-project.com/archive/5.10.1/macos-10-universal/MonoFramework-MDK-5.10.1.57.macos10.xamarin.universal.pkg -O /tmp/downloads/Mono.pkg
      fi
      sudo installer -pkg /tmp/downloads/Mono.pkg -target /
  fi
script: |
  mkdir build
  cd build

  echo "CMAKE_TOOLCHAIN_FILE: ${CMAKE_TOOLCHAIN_FILE}"

  cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} ..
  cmake --build .<commit_msg>CI: Avoid mono installation on builds that do not use it.<commit_after>sudo: true
dist: trusty
language: cpp
cache:
  directories:
    - $HOME/cmake-$CMAKE_VERSION.$CMAKE_PATCH-Linux-x86_64/bin
    - $HOME/cmake-$CMAKE_VERSION.$CMAKE_PATCH-Linux-x86_64/share
    - /tmp/downloads
env:
  global:
    - MAKEFLAGS=-j4
    - URHO3D_ENABLE_ALL=ON
    - CMAKE_VERSION=3.4
    - CMAKE_PATCH=3
addons:
  apt:
    sources:
      - llvm-toolchain-trusty-6.0
      - ubuntu-toolchain-r-test
      - deadsnakes
    packages:
      - libasound2-dev
      - libxrandr-dev
      - libgl1-mesa-dev
      - libglu1-mesa-dev
      - g++-5
      - llvm-6.0
      - clang-6.0
      - libclang-6.0-dev
      - python3.6
notifications:
  email:
    on_success: never
    on_failure: never
branches:
  except:
    - /^(.*[^\w])?(appveyor|no-ci)-.+$/
matrix:
  fast_finish: true
  include:
    - &Linux-gcc
      os: linux
      compiler: gcc
      env:
        - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
    - <<: *Linux-gcc
      env:
        - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
        - BUILD_SHARED_LIBS=ON
        - URHO3D_WITH_MONO=ON
    - &Linux-clang
      os: linux
      compiler: clang
    - <<: *Linux-clang
      env:
        - BUILD_SHARED_LIBS=ON
        - URHO3D_WITH_MONO=ON
    - &MacOS
      os: osx
      osx_image: xcode8.3
      compiler: clang
    - <<: *MacOS
      env:
        - BUILD_SHARED_LIBS=ON
        - URHO3D_WITH_MONO=ON
  exclude:
    - &MingW
      env:
        - CMAKE_TOOLCHAIN_FILE=CMake/Toolchains/MinGW.cmake
        - CMAKE_SYSTEM_PROCESSOR=x86_64
        - URHO3D_RENDERER=D3D9
      addons:
        apt:
          packages:
            - gcc-mingw-w64-x86-64
            - g++-mingw-w64-x86-64
            - binutils-mingw-w64-x86-64
    - <<: *MingW
      env:
        - BUILD_SHARED_LIBS=ON
        - CMAKE_TOOLCHAIN_FILE=CMake/Toolchains/MinGW.cmake
        - CMAKE_SYSTEM_PROCESSOR=x86_64
        - URHO3D_RENDERER=D3D9

before_install: |
  eval "${MATRIX_EVAL}"
  if [[ $TRAVIS_OS_NAME == 'linux' ]];
  then
      sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys <KEY>
      echo "deb http://download.mono-project.com/repo/ubuntu stable-trusty main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
      sudo apt-get update -qq
  else
      brew update
  fi

install: |
  # Update CMake to minimum required version
  mkdir -p /tmp/downloads
  if [[ $TRAVIS_OS_NAME == 'linux' ]];
  then
      if [[ ! -f /tmp/downloads/cmake.tar.gz ]];
      then
          wget --no-check-certificate https://cmake.org/files/v$CMAKE_VERSION/cmake-$CMAKE_VERSION.$CMAKE_PATCH-Linux-x86_64.tar.gz -O /tmp/downloads/cmake.tar.gz
      fi
      if [[ ! -f $HOME/cmake-$CMAKE_VERSION.$CMAKE_PATCH-Linux-x86_64/bin/cmake ]];
      then
          tar xf /tmp/downloads/cmake.tar.gz -C $HOME && rm /tmp/downloads/cmake.tar.gz
      fi
      export PATH=$HOME/cmake-$CMAKE_VERSION.$CMAKE_PATCH-Linux-x86_64/bin:$PATH
      if [[ "$URHO3D_WITH_MONO" != "" ]];
      then
          sudo apt-get install -y --force-yes mono-devel
      fi
  elif [[ "$URHO3D_WITH_MONO" != "" ]];
  then
      # mono
      if [[ ! -f /tmp/downloads/Mono.pkg ]];
      then
          wget https://download.mono-project.com/archive/5.10.1/macos-10-universal/MonoFramework-MDK-5.10.1.57.macos10.xamarin.universal.pkg -O /tmp/downloads/Mono.pkg
      fi
      sudo installer -pkg /tmp/downloads/Mono.pkg -target /
  fi
script: |
  mkdir build
  cd build

  echo "CMAKE_TOOLCHAIN_FILE: ${CMAKE_TOOLCHAIN_FILE}"

  cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} ..
  cmake --build .
{'fraction_non_alphanumeric': 0.13395904436860068, 'fraction_numerical': 0.027303754266211604, 'mean_word_length': 2.0873573309920985, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '443228', 'n_tokens_mistral': 3037, 'n_tokens_neox': 2807, 'n_words': 418}