summaryrefslogtreecommitdiff
path: root/.circleci/config.yml
blob: 4bbc884f7f20c5c3547d7d718c8426ea0f192f80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
version: 2
jobs:
  build:
    docker:
      - image: 'fpco/stack-build:latest'
    steps:
      - checkout
      - restore_cache:
          key: 'v1-hakyll-{{ arch }}-{{ .Branch }}'
      - run:
          name: 'Update cabal indices'
          command: 'cabal update'
      - run:
          # We set jobs to 1 here because that prevents Out-Of-Memory exceptions
          # while compiling dependencies.
          name: 'Install dependencies'
          command: '.circleci/tickle.sh cabal install --only-dependencies --enable-tests --jobs=1 --flags="+buildWebsite"'
      - run:
          name: 'Build and run tests'
          command: 'cabal test'
      - save_cache:
          key: 'v1-hakyll-{{ arch }}-{{ .Branch }}-{{ .Revision }}'
          paths:
            - '~/.cabal'
            - '~/.ghc'