forked from cosmos/cosmjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
675 lines (672 loc) · 28.2 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
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
version: 2.1
orbs:
browser-tools: circleci/[email protected]
workflows:
version: 2
workflow:
# Keep those job names in sync with .mergify.yml
jobs:
- build
- docs-build:
requires:
- build
- docs-deploy:
requires:
- docs-build
- build
- lint
filters:
branches:
only: main
- lint:
requires:
- build
- test-backends:
requires:
- build
matrix:
parameters:
simapp: ["simapp44", "simapp46", "simapp47", "simapp50"]
- test-node:
requires:
- build
matrix:
parameters:
node-version: ["16", "18", "20"]
- test-chrome:
requires:
- build
- coverage:
requires:
- build
- faucet-docker
jobs:
build:
docker:
- image: circleci/node:16.13-bullseye
steps:
- run:
name: Install Git Large File Storage (LFS)
command: sudo apt-get install git-lfs
- checkout
- run:
name: Version information
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
- run:
name: Install libusb
command: sudo apt-get install libusb-1.0-0-dev
- run:
name: Install Dependencies
command: yarn install --immutable --immutable-cache --check-cache
- run:
command: yarn build
- persist_to_workspace:
root: .
paths:
- packages/*/build/*
test-backends:
parameters:
simapp:
type: string
machine:
# We can't use a containerized environment since it requires remote docker to start custom containers.
# However, we can't access the remote docker's network from the primary container. This is a
# feature, as documented in https://circleci.com/docs/2.0/building-docker-images/#separation-of-environments
# As a consequence, we cannot use the circleci CLI for this job because "You cannot use the machine
# executor in local jobs." (https://circleci.com/docs/2.0/local-cli/#limitations-of-running-jobs-locally)
#
# Available images: https://circleci.com/docs/2.0/configuration-reference/#available-machine-images
image: ubuntu-2004:202107-02
steps:
- run:
name: Install Git Large File Storage (LFS)
# In the current image, `sudo apt install git-lfs` requires `sudo apt update` which is too slow
command: |
wget -O "$HOME/git-lfs.deb" https://packagecloud.io/github/git-lfs/packages/ubuntu/focal/git-lfs_2.13.3_amd64.deb/download.deb
sudo dpkg -i "$HOME/git-lfs.deb"
- checkout
- run: # start early for less wait time below
name: Start wasmd
command: ./scripts/wasmd/start.sh
background: true
- run:
name: Start simapp
command: ./scripts/<< parameters.simapp >>/start.sh
background: true
- run:
name: Start slow simapp
command: ./scripts/<< parameters.simapp >>/slow_start.sh
background: true
- run:
name: Start Tendermint blockchains
command: ./scripts/tendermint/all_start.sh
background: true
- attach_workspace:
at: /tmp/builds
- run:
name: Merge build folders into project (merge with hardlinks)
command: cp --recursive --link /tmp/builds/* .
- run:
# The images comes with preinstalled nvm, which does not work well with non-login shells
name: Uninstall nvm
# Moving to trash is faster than deleting (gvfs-trash is not installed on this image)
command: |
nvm --version && nvm ls
mkdir -p ~/.local/share/Trash && mv "$NVM_DIR" ~/.npm ~/.local/share/Trash
- run:
name: Install nodejs
# In the current image, `sudo apt install nodejs` requires `sudo apt update` which is too slow.
# Follow instructions of https://deb.nodesource.com/ except the last step. Then run
# `apt download --print-uris nodejs` to get a download URL.
command: |
wget -O "$HOME/nodejs.deb" https://deb.nodesource.com/node_18.x/pool/main/n/nodejs/nodejs_18.17.1-1nodesource1_amd64.deb
sudo dpkg -i "$HOME/nodejs.deb"
- run:
name: Install yarn
command: |
wget -O "$HOME/yarn.deb" https://dl.yarnpkg.com/debian/pool/main/y/yarn/yarn_1.22.15_all.deb
sudo dpkg -i "$HOME/yarn.deb"
- run:
name: Version information
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
- run:
name: Install libusb
# In the current image, `sudo apt install libusb-1.0-0-dev` requires `sudo apt update` which is too slow
command: |
wget -O "$HOME/libusb.deb" http://de.archive.ubuntu.com/ubuntu/pool/main/libu/libusb-1.0/libusb-1.0-0-dev_1.0.23-2build1_amd64.deb
sudo dpkg -i "$HOME/libusb.deb"
- run:
name: Install libudev-dev
# See https://packages.ubuntu.com/focal/libudev-dev (Ubuntu 20.04)
command: |
wget -O "$HOME/libudev1.deb" http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_245.4-4ubuntu3.20_amd64.deb
wget -O "$HOME/libudev-dev.deb" http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev-dev_245.4-4ubuntu3.20_amd64.deb
sudo dpkg -i "$HOME/libudev1.deb"
sudo dpkg -i "$HOME/libudev-dev.deb"
- run:
name: Install Dependencies
command: yarn install --immutable --immutable-cache --check-cache
- run:
name: Initialize wasmd (deploy contracts and friends)
command: ./scripts/wasmd/init.sh
- run:
name: Start socket server
command: ./scripts/socketserver/start.sh
- run:
name: Start http server
command: ./scripts/httpserver/start.sh
- run:
name: Run tests
environment:
HTTPSERVER_ENABLED: 1
TENDERMINT_ENABLED: 1
SOCKETSERVER_ENABLED: 1
SKIP_BUILD: 1
WASMD_ENABLED: 1
command: |
[ "<< parameters.simapp >>" = "simapp44" ] && export SIMAPP44_ENABLED=1 SLOW_SIMAPP44_ENABLED=1
[ "<< parameters.simapp >>" = "simapp46" ] && export SIMAPP46_ENABLED=1 SLOW_SIMAPP46_ENABLED=1
[ "<< parameters.simapp >>" = "simapp47" ] && export SIMAPP47_ENABLED=1 SLOW_SIMAPP47_ENABLED=1
[ "<< parameters.simapp >>" = "simapp50" ] && export SIMAPP50_ENABLED=1 SLOW_SIMAPP50_ENABLED=1
yarn test --stream
- run:
name: Run CLI selftest
working_directory: packages/cli
environment:
SKIP_BUILD: 1
command: yarn selftest
- run:
name: Run CLI examples
working_directory: packages/cli
environment:
HTTPSERVER_ENABLED: 1
TENDERMINT_ENABLED: 1
SOCKETSERVER_ENABLED: 1
SKIP_BUILD: 1
WASMD_ENABLED: 1
command: |
[ "<< parameters.simapp >>" = "simapp44" ] && export SIMAPP44_ENABLED=1 SLOW_SIMAPP44_ENABLED=1
[ "<< parameters.simapp >>" = "simapp46" ] && export SIMAPP46_ENABLED=1 SLOW_SIMAPP46_ENABLED=1
[ "<< parameters.simapp >>" = "simapp47" ] && export SIMAPP47_ENABLED=1 SLOW_SIMAPP47_ENABLED=1
[ "<< parameters.simapp >>" = "simapp50" ] && export SIMAPP50_ENABLED=1 SLOW_SIMAPP50_ENABLED=1
./run_examples.sh
- run:
name: Stop chains
command: |
./scripts/httpserver/stop.sh
./scripts/socketserver/stop.sh
./scripts/tendermint/all_stop.sh
./scripts/<< parameters.simapp >>/stop.sh
./scripts/<< parameters.simapp >>/slow_stop.sh
./scripts/wasmd/stop.sh
test-node:
parameters:
node-version:
type: string
machine:
# We can't use a containerized environment since it requires remote docker to start custom containers.
# However, we can't access the remote docker's network from the primary container. This is a
# feature, as documented in https://circleci.com/docs/2.0/building-docker-images/#separation-of-environments
# As a consequence, we cannot use the circleci CLI for this job because "You cannot use the machine
# executor in local jobs." (https://circleci.com/docs/2.0/local-cli/#limitations-of-running-jobs-locally)
#
# Available images: https://circleci.com/docs/2.0/configuration-reference/#available-machine-images
image: ubuntu-2004:202107-02
resource_class: large
steps:
- run:
name: Install Git Large File Storage (LFS)
# In the current image, `sudo apt install git-lfs` requires `sudo apt update` which is too slow
command: |
wget -O "$HOME/git-lfs.deb" https://packagecloud.io/github/git-lfs/packages/ubuntu/focal/git-lfs_2.13.3_amd64.deb/download.deb
sudo dpkg -i "$HOME/git-lfs.deb"
- checkout
- run: # start early for less wait time below
name: Start wasmd
command: ./scripts/wasmd/start.sh
background: true
- run:
name: Start simapp
command: ./scripts/simapp44/start.sh
background: true
- run:
name: Start slow simapp
command: ./scripts/simapp44/slow_start.sh
background: true
- run:
name: Start Tendermint blockchains
command: ./scripts/tendermint/all_start.sh
background: true
- attach_workspace:
at: /tmp/builds
- run:
name: Merge build folders into project (merge with hardlinks)
command: cp --recursive --link /tmp/builds/* .
- run:
# The images comes with preinstalled nvm, which does not work well with non-login shells
name: Uninstall nvm
# Moving to trash is faster than deleting (gvfs-trash is not installed on this image)
command: |
nvm --version && nvm ls
mkdir -p ~/.local/share/Trash && mv "$NVM_DIR" ~/.npm ~/.local/share/Trash
- run:
name: Install nodejs
# In the current image, `sudo apt install nodejs` requires `sudo apt update` which is too slow.
# Follow instructions of https://deb.nodesource.com/ except the last step. Then run
# `apt download --print-uris nodejs` to get a download URL.
command: |
declare -A node_links=(
["16"]="https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.20.2-1nodesource1_amd64.deb"
["18"]="https://deb.nodesource.com/node_18.x/pool/main/n/nodejs/nodejs_18.17.1-1nodesource1_amd64.deb"
["20"]="https://deb.nodesource.com/node_20.x/pool/main/n/nodejs/nodejs_20.6.0-1nodesource1_amd64.deb"
)
wget -O "$HOME/nodejs.deb" "${node_links[<< parameters.node-version >>]}"
sudo dpkg -i "$HOME/nodejs.deb"
- run:
name: Install yarn
command: |
wget -O "$HOME/yarn.deb" https://dl.yarnpkg.com/debian/pool/main/y/yarn/yarn_1.22.15_all.deb
sudo dpkg -i "$HOME/yarn.deb"
- run:
name: Version information
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
- run:
name: Install libusb
# In the current image, `sudo apt install libusb-1.0-0-dev` requires `sudo apt update` which is too slow
command: |
wget -O "$HOME/libusb.deb" http://de.archive.ubuntu.com/ubuntu/pool/main/libu/libusb-1.0/libusb-1.0-0-dev_1.0.23-2build1_amd64.deb
sudo dpkg -i "$HOME/libusb.deb"
- run:
name: Install libudev-dev
# See https://packages.ubuntu.com/focal/libudev-dev (Ubuntu 20.04)
command: |
wget -O "$HOME/libudev1.deb" http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_245.4-4ubuntu3.20_amd64.deb
wget -O "$HOME/libudev-dev.deb" http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev-dev_245.4-4ubuntu3.20_amd64.deb
sudo dpkg -i "$HOME/libudev1.deb"
sudo dpkg -i "$HOME/libudev-dev.deb"
- run:
name: Install Dependencies
command: yarn install --immutable --immutable-cache --check-cache
- run:
name: Initialize wasmd (deploy contracts and friends)
command: ./scripts/wasmd/init.sh
- run:
name: Start socket server
command: ./scripts/socketserver/start.sh
- run:
name: Start http server
command: ./scripts/httpserver/start.sh
- run:
environment:
HTTPSERVER_ENABLED: 1
SIMAPP44_ENABLED: 1
SLOW_SIMAPP44_ENABLED: 1
TENDERMINT_ENABLED: 1
SOCKETSERVER_ENABLED: 1
SKIP_BUILD: 1
WASMD_ENABLED: 1
# Stopped working for Node.js 20. Maybe we need to upgrade the dependency or something.
# SES_ENABLED: 1
command: yarn test --stream
- run:
name: Run CLI selftest
working_directory: packages/cli
environment:
SKIP_BUILD: 1
command: yarn selftest
- run:
name: Run CLI examples
working_directory: packages/cli
environment:
HTTPSERVER_ENABLED: 1
SIMAPP44_ENABLED: 1
SLOW_SIMAPP44_ENABLED: 1
TENDERMINT_ENABLED: 1
SOCKETSERVER_ENABLED: 1
SKIP_BUILD: 1
WASMD_ENABLED: 1
command: ./run_examples.sh
- run:
name: Stop chains
command: |
./scripts/httpserver/stop.sh
./scripts/socketserver/stop.sh
./scripts/tendermint/all_stop.sh
./scripts/simapp44/stop.sh
./scripts/simapp44/slow_stop.sh
./scripts/wasmd/stop.sh
test-chrome:
machine:
# We can't use a containerized environment since it requires remote docker to start custom containers.
# However, we can't access the remote docker's network from the primary container. This is a
# feature, as documented in https://circleci.com/docs/2.0/building-docker-images/#separation-of-environments
# As a consequence, we cannot use the circleci CLI for this job because "You cannot use the machine
# executor in local jobs." (https://circleci.com/docs/2.0/local-cli/#limitations-of-running-jobs-locally)
#
# Available images: https://circleci.com/docs/2.0/configuration-reference/#available-machine-images
image: ubuntu-2004:202107-02
resource_class: large
steps:
- browser-tools/install-chrome # Slow because apt update but what can you do 🤷
- run:
name: Install Git Large File Storage (LFS)
# In the current image, `sudo apt install git-lfs` requires `sudo apt update` which is too slow
command: |
wget -O "$HOME/git-lfs.deb" https://packagecloud.io/github/git-lfs/packages/ubuntu/focal/git-lfs_2.13.3_amd64.deb/download.deb
sudo dpkg -i "$HOME/git-lfs.deb"
- checkout
- run: # start early for less wait time below
name: Start wasmd
command: ./scripts/wasmd/start.sh
background: true
- run:
name: Start simapp
command: ./scripts/simapp44/start.sh
background: true
- run:
name: Start slow simapp
command: ./scripts/simapp44/slow_start.sh
background: true
- run:
name: Start Tendermint blockchains
command: ./scripts/tendermint/all_start.sh
background: true
- attach_workspace:
at: /tmp/builds
- run:
name: Merge build folders into project (merge with hardlinks)
command: cp --recursive --link /tmp/builds/* .
- run:
# The images comes with preinstalled nvm, which does not work well with non-login shells
name: Uninstall nvm
# Moving to trash is faster than deleting (gvfs-trash is not installed on this image)
command: |
nvm --version && nvm ls
mkdir -p ~/.local/share/Trash && mv "$NVM_DIR" ~/.npm ~/.local/share/Trash
- run:
name: Install nodejs
# In the current image, `sudo apt install nodejs` requires `sudo apt update` which is too slow.
# Follow instructions of https://deb.nodesource.com/ except the last step. Then run
# `apt download --print-uris nodejs` to get a download URL.
command: |
wget -O "$HOME/nodejs.deb" https://deb.nodesource.com/node_18.x/pool/main/n/nodejs/nodejs_18.17.1-1nodesource1_amd64.deb
sudo dpkg -i "$HOME/nodejs.deb"
- run:
name: Install yarn
command: |
wget -O "$HOME/yarn.deb" https://dl.yarnpkg.com/debian/pool/main/y/yarn/yarn_1.22.15_all.deb
sudo dpkg -i "$HOME/yarn.deb"
- run:
name: Version information
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
- run:
name: Install libusb
# In the current image, `sudo apt install libusb-1.0-0-dev` requires `sudo apt update` which is too slow
command: |
wget -O "$HOME/libusb.deb" http://de.archive.ubuntu.com/ubuntu/pool/main/libu/libusb-1.0/libusb-1.0-0-dev_1.0.23-2build1_amd64.deb
sudo dpkg -i "$HOME/libusb.deb"
- run:
name: Install libudev-dev
# See https://packages.ubuntu.com/focal/libudev-dev (Ubuntu 20.04)
command: |
wget -O "$HOME/libudev1.deb" http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_245.4-4ubuntu3.20_amd64.deb
wget -O "$HOME/libudev-dev.deb" http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev-dev_245.4-4ubuntu3.20_amd64.deb
sudo dpkg -i "$HOME/libudev1.deb"
sudo dpkg -i "$HOME/libudev-dev.deb"
- run:
name: Install Dependencies
command: yarn install --immutable --immutable-cache --check-cache
- run:
name: Initialize wasmd (deploy contracts and friends)
command: ./scripts/wasmd/init.sh
- run:
name: Start socket server
command: ./scripts/socketserver/start.sh
- run:
name: Start http server
command: ./scripts/httpserver/start.sh
- run:
environment:
HTTPSERVER_ENABLED: 1
SIMAPP44_ENABLED: 1
SLOW_SIMAPP44_ENABLED: 1
TENDERMINT_ENABLED: 1
SOCKETSERVER_ENABLED: 1
SKIP_BUILD: 1
WASMD_ENABLED: 1
command: yarn test-chrome
- run:
name: Stop chains
command: |
./scripts/httpserver/stop.sh
./scripts/socketserver/stop.sh
./scripts/tendermint/all_stop.sh
./scripts/simapp44/stop.sh
./scripts/simapp44/slow_stop.sh
./scripts/wasmd/stop.sh
coverage:
machine:
# We can't use a containerized environment since it requires remote docker to start custom containers.
# However, we can't access the remote docker's network from the primary container. This is a
# feature, as documented in https://circleci.com/docs/2.0/building-docker-images/#separation-of-environments
# As a consequence, we cannot use the circleci CLI for this job because "You cannot use the machine
# executor in local jobs." (https://circleci.com/docs/2.0/local-cli/#limitations-of-running-jobs-locally)
#
# Available images: https://circleci.com/docs/2.0/configuration-reference/#available-machine-images
image: ubuntu-2004:202107-02
resource_class: large
steps:
- run:
name: Install Git Large File Storage (LFS)
# In the current image, `sudo apt install git-lfs` requires `sudo apt update` which is too slow
command: |
wget -O "$HOME/git-lfs.deb" https://packagecloud.io/github/git-lfs/packages/ubuntu/focal/git-lfs_2.13.3_amd64.deb/download.deb
sudo dpkg -i "$HOME/git-lfs.deb"
- checkout
- run: # start early for less wait time below
name: Start wasmd
command: ./scripts/wasmd/start.sh
background: true
- run:
name: Start simapp
command: ./scripts/simapp44/start.sh
background: true
- run:
name: Start slow simapp
command: ./scripts/simapp44/slow_start.sh
background: true
- run:
name: Start Tendermint blockchains
command: ./scripts/tendermint/all_start.sh
background: true
- attach_workspace:
at: /tmp/builds
- run:
name: Merge build folders into project (merge with hardlinks)
command: cp --recursive --link /tmp/builds/* .
- run:
# The images comes with preinstalled nvm, which does not work well with non-login shells
name: Uninstall nvm
# Moving to trash is faster than deleting (gvfs-trash is not installed on this image)
command: |
nvm --version && nvm ls
mkdir -p ~/.local/share/Trash && mv "$NVM_DIR" ~/.npm ~/.local/share/Trash
- run:
name: Install nodejs
# In the current image, `sudo apt install nodejs` requires `sudo apt update` which is too slow.
# Follow instructions of https://deb.nodesource.com/ except the last step. Then run
# `apt download --print-uris nodejs` to get a download URL.
command: |
wget -O "$HOME/nodejs.deb" https://deb.nodesource.com/node_18.x/pool/main/n/nodejs/nodejs_18.17.1-1nodesource1_amd64.deb
sudo dpkg -i "$HOME/nodejs.deb"
- run:
name: Install yarn
command: |
wget -O "$HOME/yarn.deb" https://dl.yarnpkg.com/debian/pool/main/y/yarn/yarn_1.22.15_all.deb
sudo dpkg -i "$HOME/yarn.deb"
- run:
name: Version information
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
- run:
name: Install libusb
# In the current image, `sudo apt install libusb-1.0-0-dev` requires `sudo apt update` which is too slow
command: |
wget -O "$HOME/libusb.deb" http://de.archive.ubuntu.com/ubuntu/pool/main/libu/libusb-1.0/libusb-1.0-0-dev_1.0.23-2build1_amd64.deb
sudo dpkg -i "$HOME/libusb.deb"
- run:
name: Install libudev-dev
# See https://packages.ubuntu.com/focal/libudev-dev (Ubuntu 20.04)
command: |
wget -O "$HOME/libudev1.deb" http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_245.4-4ubuntu3.20_amd64.deb
wget -O "$HOME/libudev-dev.deb" http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev-dev_245.4-4ubuntu3.20_amd64.deb
sudo dpkg -i "$HOME/libudev1.deb"
sudo dpkg -i "$HOME/libudev-dev.deb"
- run:
name: Install Dependencies
command: yarn install --immutable --immutable-cache --check-cache
- run:
name: Initialize wasmd (deploy contracts and friends)
command: ./scripts/wasmd/init.sh
- run:
name: Start socket server
command: ./scripts/socketserver/start.sh
- run:
name: Start http server
command: ./scripts/httpserver/start.sh
- run:
environment:
HTTPSERVER_ENABLED: 1
SIMAPP44_ENABLED: 1
SLOW_SIMAPP44_ENABLED: 1
TENDERMINT_ENABLED: 1
SOCKETSERVER_ENABLED: 1
SKIP_BUILD: 1
WASMD_ENABLED: 1
command: yarn coverage
- run:
name: Upload coverage report
command: npx codecov
- run:
name: Stop chains
command: |
./scripts/httpserver/stop.sh
./scripts/socketserver/stop.sh
./scripts/tendermint/all_stop.sh
./scripts/simapp44/stop.sh
./scripts/simapp44/slow_stop.sh
./scripts/wasmd/stop.sh
docs-build:
docker:
- image: circleci/node:16.13-bullseye
steps:
- run:
name: Install Git Large File Storage (LFS)
command: sudo apt-get install git-lfs
- checkout
- attach_workspace:
at: /tmp/builds
- run:
name: Merge build folders into project (merge with hardlinks)
command: cp --recursive --link /tmp/builds/* .
- run:
name: Version information
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
- run:
name: Install libusb
command: sudo apt-get install libusb-1.0-0-dev
- run:
name: Install Dependencies
command: yarn install --immutable --immutable-cache --check-cache
- run:
name: Build package docs
command: yarn docs
- run:
name: Copy docs into deployment folder
command: ./scripts/docs/copy_docs.sh
- persist_to_workspace:
root: .
paths: docs_deployment
docs-deploy:
docker:
- image: circleci/node:16.13-bullseye
steps:
- attach_workspace:
at: .
- add_ssh_keys:
fingerprints:
- "a7:b3:94:4a:9e:e1:30:fa:ca:22:d1:db:a1:78:d6:e4"
- run:
name: Add GitHub to known hosts
command: |
mkdir -p ~/.ssh
echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==' >> ~/.ssh/known_hosts
- run:
name: Deploy to GitHub pages
# Version pinned to 3.0.0 because of https://github.com/tschaub/gh-pages/issues/354
command: npx [email protected] --message "Update docs [skip ci]" --dist docs_deployment --user "CI deployment <[email protected]>" --repo "[email protected]:cosmos/cosmjs.git"
lint:
docker:
- image: circleci/node:16.13-bullseye
steps:
- run:
name: Install Git Large File Storage (LFS)
command: sudo apt-get install git-lfs
- checkout
- attach_workspace:
at: /tmp/builds
- run:
name: Merge build folders into project (merge with hardlinks)
command: cp --recursive --link /tmp/builds/* .
- run:
name: Install shfmt
command: |
sudo wget https://github.com/mvdan/sh/releases/download/v3.2.1/shfmt_v3.2.1_linux_amd64 -O /usr/local/bin/shfmt
sudo chmod +x /usr/local/bin/shfmt
shfmt --version
- run:
name: Version information
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
- run:
name: Install libusb
command: sudo apt-get install libusb-1.0-0-dev
- run:
name: Install Dependencies
command: yarn install --immutable --immutable-cache --check-cache
- run:
name: Lint
command: yarn lint
- run:
name: Format text
command: yarn format-text
- run:
name: Format shell scripts
command: yarn format-shell
faucet-docker:
docker:
- image: cimg/go:1.17.8
steps:
- run:
name: Install Git Large File Storage (LFS)
command: |
sudo apt update
sudo apt install git-lfs
- checkout
- setup_remote_docker:
# >= v20.10 https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0#faccessat2
version: 20.10.11
- run:
name: Build faucet Docker image
# Use ${CIRCLE_TAG}
command: |
docker build --pull -t "confio/faucet:$CIRCLE_SHA1" -f packages/faucet/Dockerfile .
- run:
name: Check docker image can be executed
command: |
docker run --rm "confio/faucet:$CIRCLE_SHA1" version
docker run --rm "confio/faucet:$CIRCLE_SHA1" generate
# - run:
# name: Push image to Docker Hub
# command: |
# docker login --password-stdin -u "$DOCKER_USER" \<<<"$DOCKER_PASS"
# docker push "confio/faucet:$CIRCLE_SHA1"
# docker logout