forked from rqlite/rqlite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
308 lines (290 loc) · 8.55 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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
# CircleCI 2.0 configuration file
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2.1
parameters:
primary_image:
type: string
default: 'rqlite/circleci-primary:0.0.7'
commands: # a reusable command with parameters
restore_and_save_cache:
steps:
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
- run: go get -v -t -d ./...
- save_cache:
key: go-mod-v4-{{ checksum "go.sum" }}
paths:
- "/home/circleci/go/pkg/mod"
cross_compile:
parameters:
cc:
type: string
goarch:
default: ""
type: string
goos:
default: ""
type: string
steps:
- run: go version
- run:
name: "Cross compile using <<parameters.cc>>"
command: go install -a ./...
environment:
CGO_ENABLED: 1
GOARCH: <<parameters.goarch>>
GOOS: <<parameters.goos>>
CC: <<parameters.cc>>
jobs:
lint:
docker:
- image: << pipeline.parameters.primary_image >>
steps:
# Don't do a restore_cache here, so we regularly check that the Go
# modules are actually fetchable.
- checkout
- run: go version
- run: test -z "$(gofmt -l . | tee /dev/stderr)"
- run: go vet ./...
resource_class: large
test_odd:
docker:
- image: << pipeline.parameters.primary_image >>
steps:
- checkout
- restore_and_save_cache
- run: go test -failfast $(go list ./... | sed -n 'n;p')
resource_class: large
test_odd_race:
docker:
- image: << pipeline.parameters.primary_image >>
steps:
- checkout
- restore_and_save_cache
- run:
command: go test -failfast -timeout 20m -race $(go list ./... | sed -n 'n;p')
environment:
GORACE: "halt_on_error=1"
resource_class: large
test_even:
docker:
- image: << pipeline.parameters.primary_image >>
steps:
- checkout
- restore_and_save_cache
- run: go test -failfast $(go list ./... | sed -n 'p;n')
resource_class: large
test_even_race:
docker:
- image: << pipeline.parameters.primary_image >>
steps:
- checkout
- restore_and_save_cache
- run:
command: go test -failfast -timeout 20m -race $(go list ./... | sed -n 'p;n')
environment:
GORACE: "halt_on_error=1"
resource_class: large
cross_compile_windows:
docker:
- image: << pipeline.parameters.primary_image >>
steps:
- checkout
- restore_and_save_cache
- cross_compile:
cc: x86_64-w64-mingw32-gcc
goarch: amd64
goos: windows
resource_class: large
cross_compile:
docker:
- image: << pipeline.parameters.primary_image >>
steps:
- checkout
- restore_and_save_cache
- cross_compile:
cc: musl-gcc
goarch: amd64
- cross_compile:
cc: riscv64-linux-gnu-gcc
goarch: riscv64
- cross_compile:
cc: powerpc64le-linux-gnu-gcc
goarch: ppc64le
resource_class: large
cross_compile_arm:
docker:
- image: << pipeline.parameters.primary_image >>
steps:
- checkout
- restore_and_save_cache
- cross_compile:
cc: arm-linux-gnueabi-gcc
goarch: arm
- cross_compile:
cc: aarch64-linux-gnu-gcc
goarch: arm64
resource_class: large
cross_compile_mips:
docker:
- image: << pipeline.parameters.primary_image >>
steps:
- checkout
- restore_and_save_cache
- cross_compile:
cc: mips-linux-gnu-gcc
goarch: mips
- cross_compile:
cc: mips64-linux-gnuabi64-gcc
goarch: mips64
resource_class: large
cross_compile_mips_le:
docker:
- image: << pipeline.parameters.primary_image >>
steps:
- checkout
- restore_and_save_cache
- cross_compile:
cc: mipsel-linux-gnu-gcc
goarch: mipsle
- cross_compile:
cc: mips64el-linux-gnuabi64-gcc
goarch: mips64le
resource_class: large
end_to_end_single:
docker:
- image: << pipeline.parameters.primary_image >>
steps:
- checkout
- restore_and_save_cache
- run: go version
- run: go install ./...
- run:
command: python3 system_test/e2e/single_node.py
environment:
RQLITED_PATH: /home/circleci/go/bin/rqlited
resource_class: large
end_to_end_upgrade:
docker:
- image: << pipeline.parameters.primary_image >>
steps:
- checkout
- restore_and_save_cache
- run: go install ./...
- run:
command: |
cd system_test/e2e
python3 upgrade.py
environment:
RQLITED_PATH: /home/circleci/go/bin/rqlited
resource_class: large
end_to_end_joining:
docker:
- image: << pipeline.parameters.primary_image >>
steps:
- checkout
- restore_and_save_cache
- run: go install ./...
- run:
command: python3 system_test/e2e/joining.py
environment:
RQLITED_PATH: /home/circleci/go/bin/rqlited
resource_class: large
end_to_end_multi:
docker:
- image: << pipeline.parameters.primary_image >>
steps:
- checkout
- restore_and_save_cache
- run: go install ./...
- run:
command: python3 system_test/e2e/multi_node.py
environment:
RQLITED_PATH: /home/circleci/go/bin/rqlited
resource_class: large
end_to_end_multi_adv:
docker:
- image: << pipeline.parameters.primary_image >>
steps:
- checkout
- restore_and_save_cache
- run: go install ./...
- run:
command: python3 system_test/e2e/multi_node_adv.py
environment:
RQLITED_PATH: /home/circleci/go/bin/rqlited
resource_class: large
end_to_end_autoclustering:
docker:
- image: << pipeline.parameters.primary_image >>
- image: hashicorp/consul
- image: gcr.io/etcd-development/etcd:v3.5.1
steps:
- checkout
- restore_and_save_cache
- run: go install ./...
- run:
command: python3 system_test/e2e/auto_clustering.py
environment:
RQLITED_PATH: /home/circleci/go/bin/rqlited
resource_class: large
end_to_end_auto_state:
docker:
- image: << pipeline.parameters.primary_image >>
steps:
- checkout
- restore_and_save_cache
- run: go install ./...
- run:
command: python3 system_test/e2e/auto_state.py
environment:
RQLITED_PATH: /home/circleci/go/bin/rqlited
resource_class: large
end_to_end_extensions:
docker:
- image: << pipeline.parameters.primary_image >>
steps:
- checkout
- restore_and_save_cache
- run: go install ./...
- run: mkdir /home/circleci/extensions
- run: mkdir /home/circleci/extensions-misc
- run: gcc -g -fPIC -shared db/testdata/rot13.c -o /home/circleci/extensions/rot13.so
- run: gcc -g -fPIC -shared db/testdata/carray.c -o /home/circleci/extensions/carray.so
- run: zip -j /home/circleci/rot13.zip /home/circleci/extensions/rot13.so
- run: tar -czf /home/circleci/rot13.tar.gz --strip-components=1 -C /home/circleci/extensions rot13.so
- run: git clone https://github.com/rqlite/rqlite-sqlite-ext.git && cd rqlite-sqlite-ext/misc && make && cp *.so /home/circleci/extensions-misc
- run:
command: python3 system_test/e2e/extensions.py
environment:
RQLITED_PATH: /home/circleci/go/bin/rqlited
EXTENSIONS_PATH: /home/circleci/extensions/rot13.so
EXTENSIONS_PATH_DIR: /home/circleci/extensions
EXTENSIONS_PATH_ZIP: /home/circleci/rot13.zip
EXTENSIONS_PATH_TAR_GZIP: /home/circleci/rot13.tar.gz
EXTENSIONS_PATH_MULTIPLE: /home/circleci/rot13.zip,/home/circleci/extensions/carray.so
EXTENSIONS_PATH_MISC: /home/circleci/extensions-misc
resource_class: large
workflows:
version: 2
build_and_test:
jobs:
- lint
- cross_compile
- cross_compile_windows
- cross_compile_arm
- cross_compile_mips
- cross_compile_mips_le
- test_even
- test_even_race
- test_odd
- test_odd_race
- end_to_end_single
- end_to_end_multi
- end_to_end_multi_adv
- end_to_end_joining
- end_to_end_autoclustering
- end_to_end_auto_state
- end_to_end_upgrade
- end_to_end_extensions