summaryrefslogtreecommitdiff
path: root/.circleci/config.yml
blob: 8aaf463095b1f38856b5dd18e054b20d447385a6 (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'
      - run:
          name: 'Build and run tests'
          command: 'cabal test'
      - save_cache:
          key: 'v1-hakyll-{{ arch }}-{{ .Branch }}-{{ .Revision }}'
          paths:
            - '~/.cabal'
            - '~/.ghc'