<commit_before>sudo: true
language: generic

cache:
  directories:
    - $HOME/.stack

matrix:
  include:
    - env: GHCVER=8.0.1
      addons: {apt: {packages: [ghc-8.0.1], sources: [hvr-ghc]}}
    - env: GHCVER=8.6.1
      addons: {apt: {packages: [ghc-8.6.1], sources: [hvr-ghc]}}

install:
 - mkdir -p $HOME/.local/bin
 - export PATH=$HOME/.local/bin:/opt/ghc/$GHCVER/bin:$PATH
 - source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
 - wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
 - travis_retry sudo apt-get update -qq
 - travis_retry sudo apt-get install rethinkdb -y
 - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C $HOME/.local/bin '*/stack'
 - stack setup
 - echo "$(stack ghc -- --version) [$(stack ghc -- --print-project-git-commit-id 2> /dev/null || echo '?')]"

before_script:
 - sudo cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/default.conf
 - sudo /etc/init.d/rethinkdb restart

script:
 - script/cibuild<commit_msg>Switch to using plain ghc/cabal on travis<commit_after>sudo: true
language: generic

cache:
  directories:
    - $HOME/.cabal

matrix:
  include:
    - env: GHCVER=8.0.1
      addons: {apt: {packages: [ghc-8.0.1,cabal-install-2.0], sources: [hvr-ghc]}}
    - env: GHCVER=8.2.2
      addons: {apt: {packages: [ghc-8.2.2,cabal-install-2.0], sources: [hvr-ghc]}}
    - env: GHCVER=8.4.3
      addons: {apt: {packages: [ghc-8.4.3,cabal-install-2.0], sources: [hvr-ghc]}}
    - env: GHCVER=8.6.1
      addons: {apt: {packages: [ghc-8.6.1,cabal-install-2.0], sources: [hvr-ghc]}}

install:
 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/2.0/bin:$PATH
 - source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
 - wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
 - travis_retry sudo apt-get update -qq
 - travis_retry sudo apt-get install rethinkdb -y
 - cabal --version
 - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
 - travis_retry cabal update
 - cabal install --only-dependencies --enable-tests --enable-benchmarks

before_script:
 - sudo cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/default.conf
 - sudo /etc/init.d/rethinkdb restart

script:
 - cabal configure --enable-tests --enable-benchmarks
 - cabal build
 - cabal test
{'fraction_non_alphanumeric': 0.17524557956777997, 'fraction_numerical': 0.02082514734774067, 'mean_word_length': 3.106451612903226, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1110904', 'n_tokens_mistral': 1045, 'n_tokens_neox': 1011, 'n_words': 202}