sudo: false

language: c

cache:
  directories:
  - "$HOME/.stack"
  - "$HOME/build/serokell/importify/.stack-work"

addons:
  apt:
    packages:
    - libgmp-dev

before_install:
  # Download and unpack the stack executable
  - mkdir -p ~/.local/bin
  - export PATH=$HOME/.local/bin:$PATH
  - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
  - stack --version

install:
  # Install GHC for current project
  - travis_wait 30 stack setup --no-terminal
  - stack ghc -- --version

  # Build project dependencies
  - travis_wait 30 stack build --only-dependencies --no-terminal

  # Build project itself
  - travis_wait 30 stack build --test --bench --no-run-tests --no-run-benchmarks --no-terminal

script:
  - travis_wait 30 stack test --no-terminal

notifications:
  email: false
  slack:
    rooms:
      - serokell:JWBvWb5PKOhknocQgcoQnflZ
    on_success: change
    on_failure: always
# `sudo: true` switches usage from default container 4Gb RAM, 2 Cores to GCE VM with 7.5Gb RAM and dynamically available >=2 Cores.
# Usage of `sudo: true` and VM in Travis is undesputably better for testing of Haskell builds.
sudo: true

language: c

cache:
  directories:
  - "$HOME/.stack"
  - "$HOME/build/serokell/importify/.stack-work"

addons:
  apt:
    packages:
    - libgmp-dev

before_install:
  # Download and unpack the stack executable
  - mkdir -p ~/.local/bin
  - export PATH=$HOME/.local/bin:$PATH
  - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
  - stack --version

install:
  # Install GHC for current project
  - travis_wait 30 stack setup --no-terminal
  - stack ghc -- --version

  # Build project dependencies
  - travis_wait 30 stack build --only-dependencies --no-terminal

  # Build project itself
  - travis_wait 30 stack build --test --bench --no-run-tests --no-run-benchmarks --no-terminal

script:
  - travis_wait 30 stack test --no-terminal

notifications:
  email: false
  slack:
    rooms:
      - serokell:JWBvWb5PKOhknocQgcoQnflZ
    on_success: change
    on_failure: always
Use more powerfull VM-based instances
Travis: Use more powerfull VM-based instances
