-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
57 lines (46 loc) · 2.02 KB
/
circle.yml
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
version: 2.0
jobs:
build:
working_directory: ~/project
docker:
- image: quay.io/haskell_works/stack-build-minimal:2018-01-29
steps:
- checkout
- run:
name: Copying scripts
command: |
mkdir -p ~/.local/bin
cp ./scripts/* ~/.local/bin
- run:
name: Query resolver & ghc version
command: |
resolver > resolver.version
ghc-version $(cat resolver.version) > ghc.version
- restore_cache:
keys:
- stack--{{ checksum "ghc.version" }}--{{ .Environment.CACHE_VERSION }}--{{ checksum "resolver.version" }}--{{ checksum "package.yaml" }}--{{ checksum "stack.yaml" }}
- stack--{{ checksum "ghc.version" }}--{{ .Environment.CACHE_VERSION }}--{{ checksum "resolver.version" }}--{{ checksum "package.yaml" }}
- stack--{{ checksum "ghc.version" }}--{{ .Environment.CACHE_VERSION }}--{{ checksum "resolver.version" }}
- stack--{{ checksum "ghc.version" }}--only
- run:
name: Stack setup
command: stack setup
- save_cache:
key: stack--{{ checksum "ghc.version" }}--only
paths: [~/.stack, ~/project/.stack-work]
- run:
name: Building dependencies
command: stack build --only-dependencies
- save_cache:
key: stack--{{ checksum "ghc.version" }}--{{ .Environment.CACHE_VERSION }}--{{ checksum "resolver.version" }}--{{ checksum "package.yaml" }}
paths: [~/.stack, ~/project/.stack-work]
- run:
name: Compiling
command: stack build --test --no-run-tests
- save_cache:
key: stack--{{ checksum "ghc.version" }}--{{ .Environment.CACHE_VERSION }}--{{ checksum "resolver.version" }}--{{ checksum "package.yaml" }}--{{ checksum "stack.yaml" }}
paths: [~/.stack, ~/project/.stack-work]
##### Running tests
- run:
name: Running tests against latest on hackage
command: stack test