forked from ethereum/solidity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
1434 lines (1288 loc) · 45.1 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
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# vim:ts=2:sw=2:et
# --------------------------------------------------------------------------
# Prefixes used in order to keep CircleCI workflow overview more readable:
# - b: build
# - t: test
# - ubu: ubuntu
# - ems: Emscripten
version: 2.1
parameters:
ubuntu-2004-docker-image:
type: string
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2004-9
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:3d8a912e8e78e98cd217955d06d98608ad60adc67728d4c3a569991235fa1abb"
ubuntu-2004-clang-docker-image:
type: string
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2004.clang-9
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:a1ba002cae17279d1396a898b04e4e9c45602ad881295db3e2f484a7e24f6f43"
ubuntu-1604-clang-ossfuzz-docker-image:
type: string
# solbuildpackpusher/solidity-buildpack-deps:ubuntu1604.clang.ossfuzz-14
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:f353823cce2f6cd2f9f1459d86cd76fdfc551a0261d87626615ea6c1d8f90587"
emscripten-docker-image:
type: string
# solbuildpackpusher/solidity-buildpack-deps:emscripten-8
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:842d6074e0e7e5355c89122c1cafc1fdb59696596750e7d56e5f35c0d883ad59"
evm-version:
type: string
default: london
orbs:
win: circleci/windows@2.2.0
commands:
gitter_notify_unless_pr:
description: "Posts a notification to the main room on Gitter (if not running on a PR)."
parameters:
event:
type: enum
enum: ["failure", "success"]
condition:
type: string
steps:
- run:
name: "Gitter notification"
when: << parameters.condition >>
command: |
# FIXME: Checking $CIRCLE_PULL_REQUEST would be better than hard-coding branch names
# but it's broken. CircleCI associates runs on develop/breaking with random old PRs.
[[ $CIRCLE_BRANCH == develop || $CIRCLE_BRANCH == breaking ]] || { echo "Running on a PR or a feature branch - notification skipped."; exit 0; }
# Workflow name is not exposed as an env variable. Has to be queried from the API.
# The name is not critical so if anything fails, use the raw workflow ID as a fallback.
workflow_info=$(curl --silent "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}") || true
workflow_name=$(echo "$workflow_info" | grep -E '"\s*name"\s*:\s*".*"' | cut -d \" -f 4 || echo "$CIRCLE_WORKFLOW_ID")
[[ "<< parameters.event >>" == "failure" ]] && message=" ❌ [${workflow_name}] Job **${CIRCLE_JOB}** failed on **${CIRCLE_BRANCH}**. Please see [build ${CIRCLE_BUILD_NUM}](${CIRCLE_BUILD_URL}) for details."
[[ "<< parameters.event >>" == "success" ]] && message=" ✅ [${workflow_name}] Job **${CIRCLE_JOB}** succeeded on **${CIRCLE_BRANCH}**. Please see [build ${CIRCLE_BUILD_NUM}](${CIRCLE_BUILD_URL}) for details."
curl "https://api.gitter.im/v1/rooms/${GITTER_NOTIFY_ROOM_ID}/chatMessages" \
--request POST \
--include \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer ${GITTER_API_TOKEN}" \
--data "{\"text\":\"${message}\"}"
gitter_notify_failure_unless_pr:
description: "Posts a failure notification to the main room on Gitter (if not running on a PR)."
steps:
- gitter_notify_unless_pr:
event: failure
condition: on_fail
gitter_notify_success_unless_pr:
description: "Posts a success notification to the main room on Gitter (if not running on a PR)."
steps:
- gitter_notify_unless_pr:
event: success
condition: on_success
defaults:
# --------------------------------------------------------------------------
# Build Templates
- setup_prerelease_commit_hash: &setup_prerelease_commit_hash
name: Store commit hash and prerelease
command: |
if [ "$CIRCLE_BRANCH" = release -o -n "$CIRCLE_TAG" ]; then echo -n > prerelease.txt; else date -u +"nightly.%Y.%-m.%-d" > prerelease.txt; fi
echo -n "$CIRCLE_SHA1" > commit_hash.txt
- run_build: &run_build
name: Build
command: scripts/ci/build.sh
- run_build_ossfuzz: &run_build_ossfuzz
name: Build_ossfuzz
command: scripts/ci/build_ossfuzz.sh
- run_proofs: &run_proofs
name: Correctness proofs for optimization rules
command: scripts/run_proofs.sh
- run_soltest: &run_soltest
name: soltest
no_output_timeout: 30m
command: ./.circleci/soltest.sh
- run_soltest_all: &run_soltest_all
name: soltest_all
no_output_timeout: 30m
command: ./.circleci/soltest_all.sh
- run_cmdline_tests: &run_cmdline_tests
name: command line tests
no_output_timeout: 30m
command: ./test/cmdlineTests.sh
- run_docs_pragma_min_version: &run_docs_pragma_min_version
name: docs pragma version check
command: ./scripts/docs_version_pragma_check.sh
# --------------------------------------------------------------------------
# Artifacts Templates
# the whole build directory
- artifacts_build_dir: &artifacts_build_dir
root: build
paths:
- "*"
# compiled solc executable target
- artifacts_solc: &artifacts_solc
path: build/solc/solc
destination: solc
# windows artifacts
- artifact_solc_windows: &artifact_solc_windows
path: upload/
# compiled tool executable target
- artifact_solidity_upgrade: &artifact_solidity_upgrade
path: build/tools/solidity-upgrade
destination: solidity-upgrade
- artifact_yul_phaser: &artifact_yul_phaser
path: build/tools/yul-phaser
destination: yul-phaser
# compiled executable targets
- artifacts_executables: &artifacts_executables
root: build
paths:
- solc/solc
- test/soltest
- test/tools/solfuzzer
# compiled OSSFUZZ targets
- artifacts_executables_ossfuzz: &artifacts_executables_ossfuzz
root: build
paths:
- test/tools/ossfuzz/abiv2_proto_ossfuzz
- test/tools/ossfuzz/abiv2_isabelle_ossfuzz
- test/tools/ossfuzz/const_opt_ossfuzz
- test/tools/ossfuzz/solc_mutator_ossfuzz
- test/tools/ossfuzz/solc_ossfuzz
- test/tools/ossfuzz/stack_reuse_codegen_ossfuzz
- test/tools/ossfuzz/strictasm_assembly_ossfuzz
- test/tools/ossfuzz/strictasm_diff_ossfuzz
- test/tools/ossfuzz/strictasm_opt_ossfuzz
- test/tools/ossfuzz/yul_proto_diff_ossfuzz
- test/tools/ossfuzz/yul_proto_diff_custom_mutate_ossfuzz
- test/tools/ossfuzz/yul_proto_ossfuzz
- test/tools/ossfuzz/sol_proto_ossfuzz
# test result output directory
- artifacts_test_results: &artifacts_test_results
path: test_results/
destination: test_results/
# --------------------------------------------------------------------------
# Step Templates
# store_test_results helper
- store_test_results: &store_test_results
path: test_results/
- steps_soltest: &steps_soltest
steps:
- checkout
- attach_workspace:
at: build
# NOTE: Different build jobs produce different soltest executables (release/debug,
# clang/gcc, windows/linux/macos, etc.). The executable used by these steps comes from the
# attached workspace and we only see the items added to the workspace by jobs we depend on.
- run: *run_soltest
- store_test_results: *store_test_results
- store_artifacts: *artifacts_test_results
- gitter_notify_failure_unless_pr
- steps_test_lsp: &steps_test_lsp
steps:
- checkout
- attach_workspace:
at: build
- run:
name: Install dependencies
command: pip install --user deepdiff colorama
- run:
name: Executing solc LSP test suite
command: ./test/lsp.py ./build/solc/solc
- gitter_notify_failure_unless_pr
- steps_soltest_all: &steps_soltest_all
steps:
- checkout
- attach_workspace:
at: build
- run: *run_soltest_all
- store_test_results: *store_test_results
- store_artifacts: *artifacts_test_results
- gitter_notify_failure_unless_pr
- steps_cmdline_tests: &steps_cmdline_tests
steps:
- checkout
- attach_workspace:
at: build
- run: *run_cmdline_tests
- store_test_results: *store_test_results
- store_artifacts: *artifacts_test_results
- gitter_notify_failure_unless_pr
# --------------------------------------------------------------------------
# Base Image Templates
- base_ubuntu1604_clang: &base_ubuntu1604_clang
docker:
- image: << pipeline.parameters.ubuntu-1604-clang-ossfuzz-docker-image >>
environment:
TERM: xterm
MAKEFLAGS: -j 3
- base_ubuntu1604_clang_small: &base_ubuntu1604_clang_small
<<: *base_ubuntu1604_clang
resource_class: small
environment:
TERM: xterm
MAKEFLAGS: -j 2
- base_ubuntu2004_clang: &base_ubuntu2004_clang
docker:
- image: << pipeline.parameters.ubuntu-2004-clang-docker-image >>
environment:
TERM: xterm
CC: clang
CXX: clang++
MAKEFLAGS: -j 3
- base_ubuntu2004_clang_small: &base_ubuntu2004_clang_small
<<: *base_ubuntu2004_clang
resource_class: small
environment:
TERM: xterm
CC: clang
CXX: clang++
MAKEFLAGS: -j 2
- base_ubuntu2004_clang_large: &base_ubuntu2004_clang_large
<<: *base_ubuntu2004_clang
resource_class: large
environment:
TERM: xterm
CC: clang
CXX: clang++
MAKEFLAGS: -j 5
- base_ubuntu2004: &base_ubuntu2004
docker:
- image: << pipeline.parameters.ubuntu-2004-docker-image >>
environment:
TERM: xterm
MAKEFLAGS: -j 3
- base_ubuntu2004_small: &base_ubuntu2004_small
<<: *base_ubuntu2004
resource_class: small
environment:
TERM: xterm
MAKEFLAGS: -j 2
- base_ubuntu2004_large: &base_ubuntu2004_large
<<: *base_ubuntu2004
resource_class: large
environment:
TERM: xterm
MAKEFLAGS: -j 5
- base_ubuntu2004_xlarge: &base_ubuntu2004_xlarge
<<: *base_ubuntu2004
resource_class: xlarge
environment:
TERM: xterm
MAKEFLAGS: -j 10
- base_buildpack_focal_small: &base_buildpack_focal_small
docker:
- image: buildpack-deps:focal
resource_class: small
environment:
TERM: xterm
MAKEFLAGS: -j 2
- base_buildpack_latest_small: &base_buildpack_latest_small
docker:
- image: buildpack-deps:latest
resource_class: small
environment:
TERM: xterm
MAKEFLAGS: -j 2
- base_archlinux: &base_archlinux
docker:
- image: archlinux:base
environment:
TERM: xterm
MAKEFLAGS: -j 3
- base_archlinux_large: &base_archlinux_large
docker:
- image: archlinux:base
resource_class: large
environment:
TERM: xterm
MAKEFLAGS: -j 5
- base_win_powershell: &base_win_powershell
executor:
name: win/default
shell: powershell.exe
- base_win_powershell_large: &base_win_powershell_large
executor:
name: win/default
shell: powershell.exe
size: large
- base_win_cmd: &base_win_cmd
executor:
name: win/default
shell: cmd.exe
- base_osx: &base_osx
macos:
xcode: "13.2.0"
environment:
TERM: xterm
MAKEFLAGS: -j 5
- base_ems_large: &base_ems_large
docker:
- image: << pipeline.parameters.emscripten-docker-image >>
resource_class: large
environment:
TERM: xterm
MAKEFLAGS: -j 5
- base_python_small: &base_python_small
docker:
- image: circleci/python:3.6
resource_class: small
environment:
TERM: xterm
MAKEFLAGS: -j 2
- base_node_latest_small: &base_node_latest_small
docker:
- image: circleci/node
resource_class: small
environment:
TERM: xterm
MAKEFLAGS: -j 2
# --------------------------------------------------------------------------
# Workflow Templates
- workflow_trigger_on_tags: &workflow_trigger_on_tags
filters:
tags:
only: /.*/
- workflow_ubuntu2004: &workflow_ubuntu2004
<<: *workflow_trigger_on_tags
requires:
- b_ubu
- workflow_ubuntu1604_clang: &workflow_ubuntu1604_clang
<<: *workflow_trigger_on_tags
requires:
- b_ubu_ossfuzz
- workflow_ubuntu2004_clang: &workflow_ubuntu2004_clang
<<: *workflow_trigger_on_tags
requires:
- b_ubu_clang
- workflow_ubuntu2004_release: &workflow_ubuntu2004_release
<<: *workflow_trigger_on_tags
requires:
- b_ubu_release
- workflow_ubuntu2004_static: &workflow_ubuntu2004_static
<<: *workflow_trigger_on_tags
requires:
- b_ubu_static
- workflow_archlinux: &workflow_archlinux
<<: *workflow_trigger_on_tags
requires:
- b_archlinux
- workflow_ubuntu2004_codecov: &workflow_ubuntu2004_codecov
<<: *workflow_trigger_on_tags
requires:
- b_ubu_codecov
- workflow_osx: &workflow_osx
<<: *workflow_trigger_on_tags
requires:
- b_osx
- workflow_ubuntu2004_asan: &workflow_ubuntu2004_asan
<<: *workflow_trigger_on_tags
requires:
- b_ubu_asan
- workflow_ubuntu2004_asan_clang: &workflow_ubuntu2004_asan_clang
<<: *workflow_trigger_on_tags
requires:
- b_ubu_asan_clang
- workflow_ubuntu2004_ubsan_clang: &workflow_ubuntu2004_ubsan_clang
<<: *workflow_trigger_on_tags
requires:
- b_ubu_ubsan_clang
- workflow_emscripten: &workflow_emscripten
<<: *workflow_trigger_on_tags
requires:
- b_ems
- workflow_ubuntu1604_ossfuzz: &workflow_ubuntu1604_ossfuzz
<<: *workflow_trigger_on_tags
requires:
- b_ubu_ossfuzz
- workflow_win: &workflow_win
<<: *workflow_trigger_on_tags
requires:
- b_win
- workflow_win_release: &workflow_win_release
<<: *workflow_trigger_on_tags
requires:
- b_win_release
# -----------------------------------------------------------------------------------------------
jobs:
chk_spelling:
<<: *base_python_small
steps:
- checkout
- attach_workspace:
at: build
- run:
name: Install dependencies
command: |
pip install --user codespell
- run:
name: Check spelling
command: ~/.local/bin/codespell -S "*.enc,.git,Dockerfile*" -I ./scripts/codespell_whitelist.txt
- gitter_notify_failure_unless_pr
chk_docs_examples:
<<: *base_node_latest_small
steps:
- checkout
- attach_workspace:
at: build
- run:
name: JS deps
command: sudo npm install -g solhint
- run:
name: Test Docs examples
command: ./test/docsCodeStyle.sh
- gitter_notify_failure_unless_pr
chk_coding_style:
<<: *base_buildpack_focal_small
steps:
- checkout
- run:
name: Install shellcheck
command: apt -q update && apt install -y shellcheck
- run:
name: Check for C++ coding style
command: ./scripts/check_style.sh
- run:
name: checking shell scripts
command: ./scripts/chk_shellscripts/chk_shellscripts.sh
- run:
name: Check for broken symlinks
command: ./scripts/check_symlinks.sh
- gitter_notify_failure_unless_pr
chk_errorcodes:
<<: *base_python_small
steps:
- checkout
- run:
name: Check for error codes
command: ./scripts/error_codes.py --check
- gitter_notify_failure_unless_pr
chk_pylint:
<<: *base_buildpack_focal_small
steps:
- checkout
- run:
name: Install pip
command: apt -q update && apt install -y python3-pip
- run:
name: Install pylint
command: python3 -m pip install pylint z3-solver pygments-lexer-solidity parsec tabulate deepdiff colorama
# also z3-solver, parsec and tabulate to make sure pylint knows about this module, pygments-lexer-solidity for docs
- run:
name: Linting Python Scripts
command: ./scripts/pylint_all.py
- gitter_notify_failure_unless_pr
chk_antlr_grammar:
<<: *base_buildpack_focal_small
steps:
- checkout
- run:
name: Install Java
command: apt -q update && apt install -y openjdk-16-jdk
- run:
name: Run tests
command: ./scripts/test_antlr_grammar.sh
- gitter_notify_failure_unless_pr
chk_buglist:
<<: *base_node_latest_small
steps:
- checkout
- run:
name: JS deps
command: |
npm install download
npm install JSONPath
npm install mktemp
- run:
name: Test buglist
command: ./test/buglistTests.js
- gitter_notify_failure_unless_pr
chk_proofs:
<<: *base_buildpack_latest_small
steps:
- checkout
- run:
name: Z3 python deps
command: |
apt-get -qq update
apt-get -qy install python3-pip
pip3 install --user z3-solver
- run: *run_proofs
- gitter_notify_failure_unless_pr
chk_docs_pragma_min_version:
<<: *base_ubuntu2004_small
steps:
- checkout
- run: *run_docs_pragma_min_version
- gitter_notify_failure_unless_pr
t_ubu_pyscripts:
<<: *base_ubuntu2004_small
steps:
- checkout
- run:
name: Python unit tests
command: python3 test/pyscriptTests.py
- gitter_notify_failure_unless_pr
t_win_pyscripts:
<<: *base_win_powershell
steps:
- run: git config --global core.autocrlf false
- checkout
- run:
name: Python unit tests
command: python.exe test/pyscriptTests.py
- gitter_notify_failure_unless_pr
b_ubu: &b_ubu
# this runs 2x faster on xlarge but takes 4x more resources (compared to medium).
# Enough other jobs depend on it that it's worth it though.
<<: *base_ubuntu2004_xlarge
steps:
- checkout
- run: *run_build
- store_artifacts: *artifacts_solc
- store_artifacts: *artifact_solidity_upgrade
- store_artifacts: *artifact_yul_phaser
- persist_to_workspace: *artifacts_executables
- gitter_notify_failure_unless_pr
# x64 ASAN build, for testing for memory related bugs
b_ubu_asan: &b_ubu_asan
# Runs slightly faster on large and xlarge but we only run it nightly so efficiency matters more.
<<: *base_ubuntu2004
environment:
CMAKE_OPTIONS: -DSANITIZE=address
MAKEFLAGS: -j 3
CMAKE_BUILD_TYPE: Release
steps:
- checkout
- run: *run_build
- store_artifacts: *artifacts_solc
- persist_to_workspace: *artifacts_executables
- gitter_notify_failure_unless_pr
b_ubu_clang: &b_ubu_clang
<<: *base_ubuntu2004_clang_large
environment:
TERM: xterm
CC: clang
CXX: clang++
MAKEFLAGS: -j 10
steps:
- checkout
- run: *run_build
- store_artifacts: *artifacts_solc
- persist_to_workspace: *artifacts_executables
- gitter_notify_failure_unless_pr
b_ubu_asan_clang: &b_ubu_asan_clang
# This runs a bit faster on large and xlarge but on nightly efficiency matters more.
<<: *base_ubuntu2004_clang
environment:
CC: clang
CXX: clang++
CMAKE_OPTIONS: -DSANITIZE=address
MAKEFLAGS: -j 3
steps:
- checkout
- run: *run_build
- store_artifacts: *artifacts_solc
- persist_to_workspace: *artifacts_executables
- gitter_notify_failure_unless_pr
b_ubu_ubsan_clang: &b_ubu_ubsan_clang
# This runs a bit faster on large and xlarge but on nightly efficiency matters more.
<<: *base_ubuntu2004_clang
environment:
CC: clang
CXX: clang++
CMAKE_OPTIONS: -DSANITIZE=undefined
MAKEFLAGS: -j 3
steps:
- checkout
- run: *run_build
- store_artifacts: *artifacts_solc
- persist_to_workspace: *artifacts_executables
- gitter_notify_failure_unless_pr
b_ubu_release: &b_ubu_release
<<: *b_ubu
environment:
FORCE_RELEASE: ON
MAKEFLAGS: -j 10
b_ubu_static:
# On large runs 2x faster than on medium. 3x on xlarge.
<<: *base_ubuntu2004_xlarge
environment:
TERM: xterm
MAKEFLAGS: -j 10
CMAKE_OPTIONS: -DCMAKE_BUILD_TYPE=Release -DUSE_Z3_DLOPEN=ON -DUSE_CVC4=OFF -DSOLC_STATIC_STDLIBS=ON
steps:
- checkout
- run: *run_build
- run:
name: strip binary
command: strip build/solc/solc
- store_artifacts: *artifacts_solc
- persist_to_workspace: *artifacts_executables
- gitter_notify_failure_unless_pr
b_ubu_codecov:
# Runs ~30% faster on large but we only run it nightly so efficiency matters more.
<<: *base_ubuntu2004
environment:
COVERAGE: ON
CMAKE_BUILD_TYPE: Debug
MAKEFLAGS: -j 3
steps:
- checkout
- run: *run_build
- persist_to_workspace: *artifacts_executables
- gitter_notify_failure_unless_pr
t_ubu_codecov:
<<: *base_ubuntu2004
environment:
EVM: << pipeline.parameters.evm-version >>
OPTIMIZE: 1
steps:
- checkout
- attach_workspace:
at: build
- run:
name: "soltest: Syntax Tests"
command: build/test/soltest -t 'syntaxTest*' -- --testpath test
- run:
name: "Code Coverage: Syntax Tests"
command: codecov --flags syntax --gcov-root build
- run: *run_soltest
- run:
name: "Coverage: All"
command: codecov --flags all --gcov-root build
- store_artifacts: *artifacts_test_results
- gitter_notify_failure_unless_pr
# Builds in C++20 mode and uses debug build in order to speed up.
# Do *NOT* store any artifacts or workspace as we don't run tests on this build.
b_ubu_cxx20:
<<: *base_ubuntu2004_large
environment:
CMAKE_BUILD_TYPE: Debug
CMAKE_OPTIONS: -DCMAKE_CXX_STANDARD=20 -DUSE_CVC4=OFF
MAKEFLAGS: -j 10
steps:
- checkout
- run: *run_build
- gitter_notify_failure_unless_pr
b_ubu_ossfuzz: &b_ubu_ossfuzz
<<: *base_ubuntu1604_clang
steps:
- checkout
- run: *setup_prerelease_commit_hash
- run: *run_build_ossfuzz
- persist_to_workspace: *artifacts_executables_ossfuzz
- gitter_notify_failure_unless_pr
t_ubu_ossfuzz: &t_ubu_ossfuzz
<<: *base_ubuntu1604_clang_small
steps:
- checkout
- attach_workspace:
at: build
- run:
name: Regression tests
command: |
git clone https://github.com/ethereum/solidity-fuzzing-corpus /tmp/solidity-fuzzing-corpus
mkdir -p test_results
scripts/regressions.py -o test_results
- store_test_results: *store_test_results
- store_artifacts: *artifacts_test_results
- gitter_notify_failure_unless_pr
- gitter_notify_success_unless_pr
b_archlinux:
<<: *base_archlinux_large
environment:
TERM: xterm
MAKEFLAGS: -j 5
steps:
- run:
name: Install build dependencies
command: |
pacman --noconfirm -Syu --noprogressbar --needed base-devel boost cmake z3 cvc4 git openssh tar
- checkout
- run: *run_build
- store_artifacts: *artifacts_solc
- persist_to_workspace: *artifacts_executables
- gitter_notify_failure_unless_pr
b_osx:
<<: *base_osx
environment:
TERM: xterm
CMAKE_BUILD_TYPE: Release
MAKEFLAGS: -j 5
steps:
- checkout
- restore_cache:
keys:
- dependencies-osx-{{ arch }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
# DO NOT EDIT between here and save_cache, but rather edit ./circleci/osx_install_dependencies.sh
# WARNING! If you do edit anything here instead, remember to invalidate the cache manually.
- run:
name: Install build dependencies
command: ./.circleci/osx_install_dependencies.sh
- save_cache:
key: dependencies-osx-{{ arch }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
paths:
- /usr/local/bin
- /usr/local/sbin
- /usr/local/lib
- /usr/local/include
- /usr/local/Cellar
- /usr/local/Homebrew
- run: *run_build
- store_artifacts: *artifacts_solc
- store_artifacts: *artifact_solidity_upgrade
- store_artifacts: *artifact_yul_phaser
- persist_to_workspace:
root: .
paths:
- build/solc/solc
- build/test/soltest
- build/test/tools/solfuzzer
- gitter_notify_failure_unless_pr
t_osx_soltest:
<<: *base_osx
environment:
EVM: << pipeline.parameters.evm-version >>
OPTIMIZE: 0
TERM: xterm
steps:
- checkout
- restore_cache:
keys:
- dependencies-osx-{{ arch }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
- attach_workspace:
at: .
- run: *run_soltest
- store_test_results: *store_test_results
- store_artifacts: *artifacts_test_results
- gitter_notify_failure_unless_pr
t_osx_cli:
<<: *base_osx
steps:
- checkout
- restore_cache:
keys:
- dependencies-osx-{{ arch }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
- attach_workspace:
at: .
- run: *run_cmdline_tests
- store_artifacts: *artifacts_test_results
- gitter_notify_failure_unless_pr
b_ems:
<<: *base_ems_large
environment:
TERM: xterm
MAKEFLAGS: -j 10
steps:
- checkout
- run:
name: Build
command: |
scripts/ci/build_emscripten.sh
- store_artifacts:
path: emscripten_build/libsolc/soljson.js
destination: soljson.js
- run: mkdir -p workspace
- run: cp emscripten_build/libsolc/soljson.js workspace/soljson.js
- run: scripts/get_version.sh > workspace/version.txt
- persist_to_workspace:
root: workspace
paths:
- soljson.js
- version.txt
- gitter_notify_failure_unless_pr
b_docs:
<<: *base_ubuntu2004_small
steps:
- checkout
- run: *setup_prerelease_commit_hash
- run:
name: Build documentation
command: ./scripts/docs.sh
- store_artifacts:
path: docs/_build/html/
destination: docs-html
- gitter_notify_failure_unless_pr
t_ubu_soltest_all: &t_ubu_soltest_all
<<: *base_ubuntu2004
parallelism: 15 # 7 EVM versions, each with/without optimization + 1 ABIv1/@nooptions run
<<: *steps_soltest_all
t_ubu_lsp: &t_ubu_lsp
<<: *base_ubuntu2004_small
<<: *steps_test_lsp
t_archlinux_soltest: &t_archlinux_soltest
<<: *base_archlinux
environment:
EVM: << pipeline.parameters.evm-version >>
OPTIMIZE: 0
TERM: xterm
# For Archlinux we do not have prebuilt docker images and we would need to build evmone from source,
# thus we forgo semantics tests to speed things up.
SOLTEST_FLAGS: --no-semantic-tests
steps:
- run:
name: Install runtime dependencies
command: |
pacman --noconfirm -Syu --noprogressbar --needed base-devel boost cmake z3 cvc4 git openssh tar
- when:
condition: true
<<: *steps_soltest
t_ubu_soltest_enforce_yul: &t_ubu_soltest_enforce_yul
<<: *base_ubuntu2004
environment:
EVM: << pipeline.parameters.evm-version >>
SOLTEST_FLAGS: --enforce-via-yul
OPTIMIZE: 0
TERM: xterm
<<: *steps_soltest
t_ubu_clang_soltest: &t_ubu_clang_soltest
<<: *base_ubuntu2004_clang
environment:
EVM: << pipeline.parameters.evm-version >>
OPTIMIZE: 0
<<: *steps_soltest
t_ubu_release_soltest_all: &t_ubu_release_soltest_all
# NOTE: This definition is identical to t_ubu_soltest_all but in the workflow we make it depend on
# a different job (b_ubu_release) so the workspace it attaches contains a different executable.
<<: *t_ubu_soltest_all
t_ubu_cli: &t_ubu_cli
<<: *base_ubuntu2004_small
<<: *steps_cmdline_tests
t_ubu_release_cli: &t_ubu_release_cli
<<: *t_ubu_cli
t_ubu_asan_cli:
# Runs slightly faster on medium but we only run it nightly so efficiency matters more.
<<: *base_ubuntu2004_small
environment:
TERM: xterm
ASAN_OPTIONS: check_initialization_order=true:detect_stack_use_after_return=true:strict_init_order=true:strict_string_checks=true:detect_invalid_pointer_pairs=2
<<: *steps_cmdline_tests
t_ubu_asan_soltest:
<<: *base_ubuntu2004
environment:
EVM: << pipeline.parameters.evm-version >>
OPTIMIZE: 0
SOLTEST_FLAGS: --no-smt
ASAN_OPTIONS: check_initialization_order=true:detect_stack_use_after_return=true:strict_init_order=true:strict_string_checks=true:detect_invalid_pointer_pairs=2
<<: *steps_soltest
t_ubu_asan_clang_soltest:
<<: *base_ubuntu2004_clang
environment:
EVM: << pipeline.parameters.evm-version >>
OPTIMIZE: 0
SOLTEST_FLAGS: --no-smt
ASAN_OPTIONS: check_initialization_order=true:detect_stack_use_after_return=true:strict_init_order=true:strict_string_checks=true:detect_invalid_pointer_pairs=2
<<: *steps_soltest
t_ubu_ubsan_clang_soltest:
<<: *base_ubuntu2004_clang
environment:
EVM: << pipeline.parameters.evm-version >>
<<: *steps_soltest
t_ubu_ubsan_clang_cli:
<<: *base_ubuntu2004_clang_small
<<: *steps_cmdline_tests
t_ems_solcjs:
# Unlike other t_ems jobs this one actually runs 2x faster on medium (compared to small).
<<: *base_ubuntu2004
steps:
- checkout
- attach_workspace:
at: /tmp/workspace
- run:
name: Install test dependencies
command: |
apt-get update
apt-get install -qqy --no-install-recommends nodejs npm