<commit_before># https://docs.haskellstack.org/en/stable/travis_ci/

dist: bionic
language: generic
cache:
  directories:
  - $HOME/.stack
  - $HOME/codeworld-account/.stack-work
  - $HOME/codeworld-api/.stack-work
  - $HOME/codeworld-auth/.stack-work
  - $HOME/codeworld-compiler/.stack-work
  - $HOME/codeworld-error-sanitizer/.stack-work
  - $HOME/codeworld-game-api/.stack-work
  - $HOME/codeworld-game-server/.stack-work
  - $HOME/codeworld-prediction/.stack-work
  - $HOME/codeworld-server/.stack-work

addons:
  apt:
    packages:
      - libgmp-dev

matrix:
  include:
  - name: "root (no tests)"
    env: MODULE=. TEST=false
  - name: "account"
    env: MODULE=codeworld-account TEST=true
  - name: "api"
    env: MODULE=codeworld-api TEST=true
  - name: "auth"
    env: MODULE=codeworld-auth TEST=true
  - name: "compiler (no tests)"
    env: MODULE=codeworld-compiler TEST=false
  - name: "error-sanitizer"
    env: MODULE=codeworld-error-sanitizer TEST=true
  - name: "game-api"
    env: MODULE=codeworld-game-api TEST=true
  - name: "game-server"
    env: MODULE=codeworld-game-server TEST=true
  - name: "prediction"
    env: MODULE=codeworld-prediction TEST=true
  - name: "server"
    env: MODULE=codeworld-server TEST=true

before_install:
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'

script:
  - stack setup
  - stack build $MODULE --fast
  - if [ $TEST == "true" ]; then stack test $MODULE --fast; fi<commit_msg>Travis build stages<commit_after># https://docs.haskellstack.org/en/stable/travis_ci/

dist: bionic
language: generic
cache:
  directories:
  - $HOME/.local/bin
  - $HOME/.stack
  - $HOME/.stack-work
  - $HOME/codeworld-account/.stack-work
  - $HOME/codeworld-api/.stack-work
  - $HOME/codeworld-auth/.stack-work
  - $HOME/codeworld-compiler/.stack-work
  - $HOME/codeworld-error-sanitizer/.stack-work
  - $HOME/codeworld-game-api/.stack-work
  - $HOME/codeworld-game-server/.stack-work
  - $HOME/codeworld-prediction/.stack-work
  - $HOME/codeworld-server/.stack-work

addons:
  apt:
    packages:
      - libgmp-dev

jobs:
  include:
    - stage: Install Stack
      script:
        - export DIR=~/.local/bin
        - if [ ! -d "$DIR" ]; then mkdir -p ~/.local/bin; fi
        - export PATH=$HOME/.local/bin:$PATH
        - travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
        - stack setup
    - stage: Build dependencies
      name: "root"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build --dependencies-only
    - stage: Build dependencies
      name: "Account"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build --dependencies-only codeworld-account
    - stage: Build dependencies
      name: "API"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build --dependencies-only codeworld-api
    - stage: Build dependencies
      name: "Auth"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build --dependencies-only codeworld-auth
    - stage: Build dependencies
      name: "Compiler"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build --dependencies-only codeworld-compiler
    - stage: Build dependencies
      name: "Error Sanitizer"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build --dependencies-only codeworld-error-sanitizer
    - stage: Build dependencies
      name: "Game API"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build --dependencies-only codeworld-game-api
    - stage: Build dependencies
      name: "Game Server"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build --dependencies-only codeworld-game-server
    - stage: Build dependencies
      name: "Prediction"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build --dependencies-only codeworld-prediction
    - stage: Build dependencies
      name: "Server"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build --dependencies-only codeworld-server
    - stage: Build
      name: "root"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build
    - stage: Build
      name: "Account"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build codeworld-account
    - stage: Build
      name: "API"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build codeworld-api
    - stage: Build
      name: "Auth"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build codeworld-auth
    - stage: Build
      name: "Compiler"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build codeworld-compiler
    - stage: Build
      name: "Error Sanitizer"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build codeworld-error-sanitizer
    - stage: Build
      name: "Game API"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build codeworld-game-api
    - stage: Build
      name: "Game Server"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build codeworld-game-server
    - stage: Build
      name: "Prediction"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build codeworld-prediction
    - stage: Build
      name: "Server"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack build codeworld-server
    # - stage: Test
    #   name: "root"
    #   script:
    #     - export PATH=$HOME/.local/bin:$PATH
    #     - stack test
    - stage: Test
      name: "Account"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack test codeworld-account
    - stage: Test
      name: "API"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack test codeworld-api
    - stage: Test
      name: "Auth"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack test codeworld-auth
    # - stage: Test
    #   name: "Compiler"
    #   script:
    #     - export PATH=$HOME/.local/bin:$PATH
    #     - stack test codeworld-compiler
    - stage: Test
      name: "Error Sanitizer"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack test codeworld-error-sanitizer
    - stage: Test
      name: "Game API"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack test codeworld-game-api
    - stage: Test
      name: "Game Server"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack test codeworld-game-server
    - stage: Test
      name: "Prediction"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack test codeworld-prediction
    - stage: Test
      name: "Server"
      script:
        - export PATH=$HOME/.local/bin:$PATH
        - stack test codeworld-server
{'fraction_non_alphanumeric': 0.13180475453650303, 'fraction_numerical': 0.0014066676044450696, 'mean_word_length': 2.089960886571056, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '6360464', 'n_tokens_mistral': 2289, 'n_tokens_neox': 2215, 'n_words': 493}