<commit_before>language: cpp
sudo: false

addons:
  apt:
    sources: &default_srcs
      - ubuntu-toolchain-r-test
      - llvm-toolchain-precise-3.8
    packages: &default_pkgs
      - libglib2.0-dev
      - libstdc++6-4.9-dbg
      - python3
      - llvm-3.8-dev
      - libllvm3.8

matrix:
  include:
    - compiler: gcc
      env:
        - COMPILERC=gcc-4.9
        - COMPILERCXX=g++-4.9
      addons:
        apt:
          sources:
            - *default_srcs
          packages:
            - *default_pkgs
            - gcc-4.9
            - g++-4.9
    - compiler: gcc
      env:
        - COMPILERC=gcc-5
        - COMPILERCXX=g++-5
      addons:
        apt:
          sources:
            - *default_srcs
          packages:
            - *default_pkgs
            - gcc-5
            - g++-5
    - compiler: gcc
      env:
        - COMPILERC=gcc-6
        - COMPILERCXX=g++-6
      addons:
        apt:
          sources:
            - *default_srcs
          packages:
            - *default_pkgs
            - gcc-6
            - g++-6
    - compiler: clang
      env:
        - COMPILERC=clang-3.6
        - COMPILERCXX=clang++-3.6
      addons:
        apt:
          sources:
            - *default_srcs
            - llvm-toolchain-precise-3.6
          packages:
            - *default_pkgs
            - clang-3.6
    - compiler: clang
      env:
        - COMPILERC=clang-3.7
        - COMPILERCXX=clang++-3.7
      addons:
        apt:
          sources:
            - *default_srcs
            - llvm-toolchain-precise-3.7
          packages:
            - *default_pkgs
            - clang-3.7
    - compiler: clang
      env:
        - COMPILERC=clang-3.8
        - COMPILERCXX=clang++-3.8
      addons:
        apt:
          sources:
            - *default_srcs
            - llvm-toolchain-precise-3.8
          packages:
            - *default_pkgs
            - clang-3.8
    - compiler: clang
      env:
        - COMPILERC=clang
        - COMPILERCXX=clang++
        - CLANGV=3.9.0

# TODO: Eventually cache clang
install:
  # - export LLVM_VERSION=3.8.1
  - if [ -n "$CLANGV" ]; then mkdir $HOME/clang+llvm-$CLANGV; fi
  - if [ -n "$CLANGV" ]; then export PATH=$HOME/clang+llvm-$CLANGV/bin:$PATH; fi
  - if [ -n "$CLANGV" ]; then export LD_LIBRARY_PATH=$HOME/clang+llvm-$CLANGV/lib:$LD_LIBRARY_PATH; fi
  - if [ -n "$CLANGV" ]; then wget http://llvm.org/releases/$CLANGV/clang+llvm-$CLANGV-x86_64-linux-gnu-ubuntu-14.04.tar.xz -O $HOME/clang+llvm-$CLANGV.tar.xz; fi
  - if [ -n "$CLANGV" ]; then tar xf $HOME/clang+llvm-$CLANGV.tar.xz -C $HOME/clang+llvm-$CLANGV --strip-components 1; fi
  # - if [ "$CLANGV" != "$LLVM_VERSION" ]; then mkdir $HOME/clang+llvm-$LLVM_VERSION; fi
  # - if [ "$CLANGV" != "$LLVM_VERSION" ]; then wget http://llvm.org/releases/$LLVM_VERSION/clang+llvm-$LLVM_VERSION-x86_64-linux-gnu-ubuntu-14.04.tar.xz -O $HOME/clang+llvm-$LLVM_VERSION.tar.xz; fi
  # - if [ "$CLANGV" != "$LLVM_VERSION" ]; then tar xf $HOME/clang+llvm-$LLVM_VERSION.tar.xz -C $HOME/clang+llvm-$LLVM_VERSION --strip-components 1; fi
  # - export LLVM_CONFIG=$HOME/clang+llvm-$LLVM_VERSION/bin/llvm-config
  - export LLVM_CONFIG=llvm-config-3.8
  - export CC=$COMPILERC
  - export CXX=$COMPILERCXX
  - $CC --version
  - $CXX --version
  - pkg-config --cflags glib-2.0
  - pkg-config --libs glib-2.0
  - $LLVM_CONFIG --version
  - $LLVM_CONFIG --cflags
  - $LLVM_CONFIG --cxxflags
  - $LLVM_CONFIG --cppflags
  - $LLVM_CONFIG --ldflags
  - $LLVM_CONFIG --libs
  - $LLVM_CONFIG --system-libs
  - $LLVM_CONFIG --components
  - $LLVM_CONFIG --shared-mode

script:
  - make -j4 CI=1 LLVM_CONFIG=$LLVM_CONFIG CC=$COMPILERC
  - make test CI=1 LLVM_CONFIG=$LLVM_CONFIG CC=$COMPILERC<commit_msg>ci: Update configuration for "recent" changes<commit_after>language: cpp
dist: xenial

addons:
  apt:
    sources: &default_srcs
      - ubuntu-toolchain-r-test
    packages: &default_pkgs
      - libglib2.0-dev
      - python3-pip
      - python3-setuptools
      # - libstdc++6-4.9-dbg
      - llvm-4.0-dev
      - ninja-build

matrix:
  include:
    - compiler: gcc
      env:
        - COMPILERC=gcc-5
        - COMPILERCXX=g++-5
      addons:
        apt:
          sources:
            - *default_srcs
          packages:
            - *default_pkgs
            - gcc-5
            - g++-5
    - compiler: gcc
      env:
        - COMPILERC=gcc-6
        - COMPILERCXX=g++-6
      addons:
        apt:
          sources:
            - *default_srcs
          packages:
            - *default_pkgs
            - gcc-6
            - g++-6
    - compiler: gcc
      env:
        - COMPILERC=gcc-7
        - COMPILERCXX=g++-7
      addons:
        apt:
          sources:
            - *default_srcs
          packages:
            - *default_pkgs
            - gcc-7
            - g++-7
    - compiler: clang
      env:
        - COMPILERC=clang-4.0
        - COMPILERCXX=clang++-4.0
      addons:
        apt:
          sources:
            - *default_srcs
          packages:
            - *default_pkgs
            - clang-4.0
    - compiler: clang
      env:
        - COMPILERC=clang-5.0
        - COMPILERCXX=clang++-5.0
      addons:
        apt:
          sources:
            - *default_srcs
          packages:
            - *default_pkgs
            - clang-5.0

install:
  # The meson included in the Xenial repositories is too old (0.29).
  - pip3 install meson
  # Hack to work around different versions of LLVM being installed and meson
  # always choosing the newest one, regardless of our specifications.
  - ln -s /usr/bin/llvm-config-4.0 $HOME/.local/bin/llvm-config
  - export CC=$COMPILERC
  - export CXX=$COMPILERCXX

script:
  - mkdir build
  - meson build
  - ninja -v -C build
  - ninja -v -C build test
{'fraction_non_alphanumeric': 0.12578288100208768, 'fraction_numerical': 0.021572720946416143, 'mean_word_length': 1.509384548232213, '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': '4954819', 'n_tokens_mistral': 2162, 'n_tokens_neox': 2062, 'n_words': 371}