machine:
  environment:
    PATH: "$HOME/.local/bin:$PATH"
    STACK_VERSION: 1.2.0

dependencies:
  pre:
   - mkdir -p ~/.local/bin
   - curl -L https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar -xzv -C ~/.local/bin && ln -vsf ~/.local/bin/stack-*/stack ~/.local/bin/stack
  cache_directories:
    - "~/.stack"
    - "~/stratosphere/.stack-work"
  override:
    - stack setup
    - stack build --test --only-dependencies --no-run-tests --jobs=1

test:
  override:
    - "stack build --test --jobs=1 --flag stratosphere:-library-only"
    - "stack haddock --no-haddock-deps --jobs=1 --flag stratosphere:-library-only"

machine:
  environment:
    PATH: "$HOME/.local/bin:$PATH"
    STACK_VERSION: 1.5.0

    GHC_8_0_RESOLVER: nightly-2017-07-25

dependencies:
  pre:
   - mkdir -p ~/.local/bin
   - curl -L https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar -xzv -C ~/.local/bin && ln -vsf ~/.local/bin/stack-*/stack ~/.local/bin/stack
  cache_directories:
    - "~/.stack"
    - "~/stratosphere/.stack-work"
  override:
    - stack setup --resolver $GHC_8_0_RESOLVER
    - stack build --resolver $GHC_8_0_RESOLVER --test --only-dependencies --no-run-tests --jobs=1

    - stack setup
    - stack build --test --only-dependencies --no-run-tests --jobs=1

test:
  override:
    - stack --resolver $GHC_8_0_RESOLVER build --test --jobs=1 --flag stratosphere:-library-only
    - stack --resolver $GHC_8_0_RESOLVER haddock --no-haddock-deps --jobs=1 --flag stratosphere:-library-only

    - stack build --test --jobs=1 --flag stratosphere:-library-only
    - stack haddock --no-haddock-deps --jobs=1 --flag stratosphere:-library-only

Add GHC 8.0 resolver to CircleCI
Add GHC 8.0 resolver to CircleCI
