-
Notifications
You must be signed in to change notification settings - Fork 145
/
config.yml
174 lines (147 loc) · 4.85 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
defaults: &defaults
working_directory: ~/eta
docker:
- image: fpco/stack-build:lts-13.7
version: 2.0
jobs:
build:
<<: *defaults
steps:
- checkout
- run: mkdir -p ~/.local/bin
- run: git config --global user.email [email protected]
- run: git config --global user.name Eta
- run: git submodule sync
- run: git submodule update --init --recursive
- run: grep '^resolver:' stack.yaml > resolver.txt
- restore_cache:
keys:
- dot-stack1-{{ checksum "stack.yaml" }}-{{ checksum "eta.cabal" }}
- dot-stack1-{{ checksum "stack.yaml" }}
- dot-stack1-{{ checksum "resolver.txt" }}
- dot-stack1-resolver-{{ checksum "resolver.txt" }}
- run: stack setup
- save_cache:
key: dot-stack1-resolver-{{ checksum "resolver.txt" }}
paths:
- ~/.stack
- save_cache:
key: dot-stack1-{{ checksum "stack.yaml" }}
paths:
- ~/.stack
- restore_cache:
key: stack-works-{{ checksum "stack.yaml" }}
- run:
name: Installing or updating ETA
command: echo "n" | ./cci.sh
no_output_timeout: 1h
- save_cache:
key: dot-stack1-{{ checksum "stack.yaml" }}-{{ checksum "eta.cabal" }}
paths:
- ~/.stack
- save_cache:
key: stack-works-{{ checksum "stack.yaml" }}
paths:
- ~/eta/.stack-work
- ./etlas/etlas/.stack-work
- ./etlas/etlas-cabal/.stack-work
- ./codec-jvm/.stack-work
- ./libraries/eta-boot/.stack-work
- ./libraries/eta-boot-th/.stack-work
- ./shake/.stack-work
- save_cache:
key: v2-eta-bin-{{ .Revision }}
paths:
- ~/.eta
- ~/.etlas
- ~/.coursier
- ~/.local
- ~/.gitconfig
- persist_to_workspace:
root: .
paths: .
package-test:
<<: *defaults
steps:
- attach_workspace:
at: .
- restore_cache:
key: v2-eta-bin-{{ .Revision }}
- restore_cache:
keys:
- dot-stack1-{{ checksum "stack.yaml" }}-{{ checksum "eta.cabal" }}
- dot-stack1-{{ checksum "stack.yaml" }}
- dot-stack1-{{ checksum "resolver.txt" }}
- dot-stack1-resolver-{{ checksum "resolver.txt" }}
- run:
name: Running rts tests
working_directory: rts
command: ./gradlew test
- run: stack setup
- run: stack build eta:exe:eta-package-test
- run:
name: Running unit tests
command: stack exec eta-package-test
test-suite:
<<: *defaults
steps:
- attach_workspace:
at: .
- restore_cache:
key: v2-eta-bin-{{ .Revision }}
- restore_cache:
keys:
- dot-stack1-{{ checksum "stack.yaml" }}-{{ checksum "eta.cabal" }}
- dot-stack1-{{ checksum "stack.yaml" }}
- dot-stack1-{{ checksum "resolver.txt" }}
- dot-stack1-resolver-{{ checksum "resolver.txt" }}
- run: stack setup
- run: stack build eta:exe:eta-test-suite
- run:
name: Running unit tests
command: stack exec eta-test-suite
release_container:
<<: *defaults
steps:
- checkout
- restore_cache:
key: v2-eta-bin-{{ .Revision }}
- setup_remote_docker
- run:
name: Install Docker client
command: |
set -x
VER="17.03.0-ce"
curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
mv /tmp/docker/* /usr/bin
- run: ./docker/circleci-build-container.sh build
- run: ./docker/circleci-build-container.sh push
trigger_builds:
<<: *defaults
steps:
- checkout
- run: ./utils/scripts/circleci-trigger.sh typelead/eta-hackage master $ETA_HACKAGE_TOKEN $CIRCLE_BRANCH $CIRCLE_TAG $CI_PULL_REQUEST
- run: ./utils/scripts/circleci-trigger.sh typelead/eta-examples master $ETA_EXAMPLES_TOKEN $CIRCLE_BRANCH $CIRCLE_TAG $CI_PULL_REQUEST
- run: ./utils/scripts/circleci-trigger.sh typelead/eta-benchmarks master $ETA_BENCHMARKS_TOKEN $CIRCLE_BRANCH $CIRCLE_TAG $CI_PULL_REQUEST
- run: ./utils/scripts/circleci-trigger.sh rahulmutt/eta-2048 master $ETA_2048_TOKEN $CIRCLE_BRANCH $CIRCLE_TAG $CI_PULL_REQUEST
workflows:
version: 2
full_cycle:
jobs:
- build
- package-test:
requires:
- build
- test-suite:
requires:
- build
- release_container:
requires:
- build
- trigger_builds:
requires:
- build
filters:
branches:
only: master