forked from haskell/haskell-language-server
/
config.yml
130 lines (107 loc) · 3.39 KB
/
config.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
defaults: &defaults
working_directory: ~/build
docker:
- image: alanz/haskell-hie-ci
steps:
- checkout
- run:
name: Write provided stack.yaml with predictable name
command: cp ${STACK_FILE} stack-build.txt
- run:
name: Figure out resolver for better caching
command: grep '^resolver:' stack-build.txt > resolver.txt
- run:
name: Create a composite cabal file for changes detection
command: find . -name "*.cabal" | grep -v -e "stack-work" -e "dist-newstyle" -e "submodules" -e "testdata" | sort | xargs cat > all-cabal.txt
- restore_cache:
keys:
- stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }}
- stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}
- stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }}
- run:
name: Stack upgrade
command: stack upgrade
- run:
name: Stack setup
command: stack -j 2 --stack-yaml=${STACK_FILE} setup
- run:
name: Build (we need the exe for tests)
# need j1, else ghc-lib-parser triggers OOM
command: stack -j 1 --stack-yaml=${STACK_FILE} install --no-terminal
no_output_timeout: 30m
- run:
name: Build Testsuite without running it
command: stack -j 1 --stack-yaml=${STACK_FILE} build --test --no-run-tests --no-terminal
no_output_timeout: 30m
- store_artifacts:
path: ~/.local/bin
destination: bin
- save_cache:
key: stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }}
paths: &cache_paths
- ~/.stack
- ~/build/.stack-work
- ~/build/ghcide/.stack-work
- run:
name: Build including tests
command: stack --stack-yaml=${STACK_FILE} test --no-run-tests --no-terminal
no_output_timeout: 120m
- save_cache:
key: stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }}
paths: *cache_paths
version: 2
jobs:
ghc-8.6.4:
environment:
- STACK_FILE: "stack-8.6.4.yaml"
<<: *defaults
ghc-8.6.5:
environment:
- STACK_FILE: "stack-8.6.5.yaml"
<<: *defaults
ghc-8.8.2:
environment:
- STACK_FILE: "stack-8.8.2.yaml"
<<: *defaults
ghc-8.8.3:
environment:
- STACK_FILE: "stack-8.8.3.yaml"
<<: *defaults
ghc-8.8.4:
environment:
- STACK_FILE: "stack-8.8.4.yaml"
<<: *defaults
ghc-8.10.2:
environment:
- STACK_FILE: "stack-8.10.2.yaml"
<<: *defaults
ghc-8.10.3:
environment:
- STACK_FILE: "stack-8.10.3.yaml"
<<: *defaults
ghc-8.10.4:
environment:
- STACK_FILE: "stack-8.10.4.yaml"
<<: *defaults
ghc-9.0.1:
environment:
- STACK_FILE: "stack-9.0.1.yaml"
<<: *defaults
ghc-default:
environment:
- STACK_FILE: "stack.yaml"
<<: *defaults
workflows:
version: 2
multiple-ghcs:
jobs:
- ghc-8.6.4
- ghc-8.6.5
- ghc-8.8.2
- ghc-8.8.3
- ghc-8.8.4
- ghc-8.10.2
- ghc-8.10.3
- ghc-8.10.4
- ghc-9.0.1
- ghc-default