forked from ethereum/solidity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
2044 lines (1856 loc) · 65.7 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-26
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:1f387a77be889f65a2a25986a5c5eccc88cec23fabe6aeaf351790751145c81e"
ubuntu-2204-docker-image:
type: string
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2204-2
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:877fcc2589779f8245770711d10db92eda97d338dae76b6a9f27dde1a41b3aa0"
ubuntu-2404-docker-image:
type: string
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2404-3
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:ef6a91d7f1434c67fb9e05c6136d80f71c0ad9198479e1a88e3437680993cda4"
ubuntu-2404-clang-docker-image:
type: string
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2404.clang-4
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:97fb2d1bc002b3624161f539a1d29543c0e6c6f4d9a61f611b9b60e99e18f377"
ubuntu-clang-ossfuzz-docker-image:
type: string
# solbuildpackpusher/solidity-buildpack-deps:ubuntu.clang.ossfuzz-10
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:bd55d9a3b13c88608709ec442188c414d30f4c49f23dc2ce8b76bf8c90603fc7"
emscripten-docker-image:
type: string
# NOTE: Please remember to update the `scripts/build_emscripten.sh` whenever the hash of this image changes.
# solbuildpackpusher/solidity-buildpack-deps:emscripten-20
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:98f963ed799a0d206ef8e7b5475f847e0dea53b7fdea9618bbc6106a62730bd2"
evm-version:
type: string
default: cancun
orbs:
win: circleci/windows@2.2.0
commands:
matrix_notify_unless_pr:
description: "Posts a notification to the solidity-dev room on Matrix (if not running on a PR)."
parameters:
event:
type: enum
enum: ["failure", "success", "release"]
condition:
type: string
steps:
- run:
name: "Matrix notification"
when: << parameters.condition >>
command: scripts/ci/notification/matrix_notification.sh << parameters.event >>
matrix_notify_failure_unless_pr:
description: "Posts a failure notification to the main room on Matrix (if not running on a PR)."
steps:
- matrix_notify_unless_pr:
event: failure
condition: on_fail
matrix_notify_success_unless_pr:
description: "Posts a success notification to the main room on Matrix (if not running on a PR)."
steps:
- matrix_notify_unless_pr:
event: success
condition: on_success
matrix_notify_release_unless_pr:
description: "Posts a release notification to the main room on Matrix (if not running on a PR)."
steps:
- matrix_notify_unless_pr:
event: release
condition: on_success
prepare_bytecode_report:
description: "Generate bytecode report and upload it as an artifact."
parameters:
label:
type: string
binary_type:
type: enum
enum:
- solcjs
- native
- osx_intel
binary_path:
type: string
preset:
type: string
steps:
- run:
name: Generate bytecode reports for the selected preset
command: |
.circleci/parallel_bytecode_report.sh \
"<< parameters.label >>" \
"<< parameters.binary_type >>" \
"${PWD}/<< parameters.binary_path >>" \
"<< parameters.preset >>"
- store_artifacts:
path: bytecode-report-<< parameters.label >>-standard-json-<< parameters.preset >>.txt
- store_artifacts:
path: bytecode-report-<< parameters.label >>-cli-<< parameters.preset >>.txt
- store_artifacts:
path: bytecode-report-<< parameters.label >>-<< parameters.preset >>.txt
- persist_to_workspace:
root: .
paths:
- bytecode-report-<< parameters.label >>*.txt
- matrix_notify_failure_unless_pr
install_python3:
description: "Install python3 and given packages."
parameters:
packages:
description: "List of extra Python packages to be installed (separated by space)."
type: string
default: ""
steps:
- run:
name: Install python and dependencies
command: |
sudo apt update
sudo apt install python3 python3-pip --assume-yes --no-install-recommends
if [[ "<< parameters.packages >>" != "" ]]
then
echo "Installing additional packages..."
python3 -m pip install --user << parameters.packages >>
fi
install_foundry:
description: "Install Foundry."
parameters:
version:
type: string
default: "nightly"
install_path:
type: string
default: /home/circleci/bin
steps:
- run:
name: Setup Foundry environment variables
command: |
FOUNDRY_REPO="foundry-rs/foundry"
FOUNDRY_VERSION="<< parameters.version >>"
# Make authenticated requests when the Github token is available
if [[ -n "$GITHUB_ACCESS_TOKEN" ]]; then
EXTRA_HEADERS=(--header 'Authorization: Bearer '"${GITHUB_ACCESS_TOKEN}")
fi
FOUNDRY_RELEASE_SHA=$(curl \
--silent \
--fail \
--show-error \
"${EXTRA_HEADERS[@]}" \
"https://api.github.com/repos/${FOUNDRY_REPO}/git/refs/tags/${FOUNDRY_VERSION}" \
| jq --raw-output .object.sha \
)
echo "export FOUNDRY_REPO=$FOUNDRY_REPO" >> "$BASH_ENV"
echo "export FOUNDRY_VERSION=$FOUNDRY_VERSION" >> "$BASH_ENV"
echo "export FOUNDRY_RELEASE_TAG='${FOUNDRY_VERSION}'" >> "$BASH_ENV"
# Save commit sha for caching
echo "$FOUNDRY_RELEASE_SHA" > /tmp/workspace/foundry-release-sha
- restore_cache:
keys:
- foundry-<< parameters.version >>-{{ arch }}-{{ checksum "/tmp/workspace/foundry-release-sha" }}
# WARNING! If you edit anything between here and save_cache, remember to invalidate the cache manually.
- run:
name: Install foundry
command: |
! forge --version 2> /dev/null
curl \
--fail \
--location \
--output /tmp/foundry.tar.gz \
"https://github.com/${FOUNDRY_REPO}/releases/download/${FOUNDRY_RELEASE_TAG}/foundry_${FOUNDRY_VERSION}_linux_amd64.tar.gz"
cd "<< parameters.install_path >>"
tar --extract --gzip --file /tmp/foundry.tar.gz --one-top-level
ln --symbolic --force foundry/{forge,anvil,cast,chisel} .
- save_cache:
key: foundry-<< parameters.version >>-{{ arch }}-{{ checksum "/tmp/workspace/foundry-release-sha" }}
paths:
- << parameters.install_path >>
# --------------------------------------------------------------------------
# Build Commands
setup_prerelease_commit_hash:
steps:
- run:
name: Store commit hash and prerelease
command: |
if [[ $CIRCLE_BRANCH == release || -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:
steps:
- run:
name: Build
command: scripts/ci/build.sh
run_build_ossfuzz:
steps:
- run:
name: Build_ossfuzz
command: scripts/ci/build_ossfuzz.sh
run_proofs:
steps:
- run:
name: Correctness proofs for optimization rules
command: scripts/run_proofs.sh
run_soltest:
steps:
- run:
name: soltest
no_output_timeout: 30m
command: .circleci/soltest.sh
run_soltest_all:
parameters:
# NOTE: If not specified, soltest_all.sh will use the default values as specified in the script.
# In other words, it will execute for all EVM versions that are not marked as deprecated.
evm_versions:
description: "List of EVM versions (separated by space)."
type: string
default: ""
steps:
- run:
name: soltest_all
no_output_timeout: 30m
command: .circleci/soltest_all.sh "<< parameters.evm_versions >>"
run_cmdline_tests:
steps:
- run:
name: command line tests
no_output_timeout: 30m
command: .circleci/parallel_cli_tests.py
run_docs_pragma_min_version:
steps:
- run:
name: docs pragma version check
command: scripts/docs_version_pragma_check.sh
# --------------------------------------------------------------------------
# Artifact Commands
store_artifacts_solc:
description: Store compiled solc executable as artifact
steps:
- store_artifacts:
path: build/solc/solc
destination: solc
store_artifacts_yul_phaser:
steps:
- store_artifacts:
path: build/tools/yul-phaser
destination: yul-phaser
persist_executables_to_workspace:
description: Persist compiled target executables to workspace
steps:
- persist_to_workspace:
root: build
paths:
- solc/solc
- test/soltest
- test/tools/solfuzzer
persist_executables_to_workspace_osx:
description: Persist compiled target executables to workspace on macOS
steps:
- persist_to_workspace:
root: .
paths:
- build/solc/solc
- build/test/soltest
- build/test/tools/solfuzzer
persist_ossfuzz_executables_to_workspace:
description: Persist compiled OSSFUZZ executables to workspace
steps:
- persist_to_workspace:
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
store_artifacts_test_results:
description: Store test output dir as artifact
steps:
- store_artifacts:
path: test_results/
destination: test_results/
# --------------------------------------------------------------------------
# Complex Build Commands
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_soltest
- store_test_results:
path: test_results/
- store_artifacts_test_results
- matrix_notify_failure_unless_pr
test_lsp:
steps:
- checkout
- attach_workspace:
at: build
- run:
name: Executing solc LSP test suite
command: test/lsp.py build/solc/solc --non-interactive
- matrix_notify_failure_unless_pr
build:
steps:
- checkout
- run_build
- store_artifacts_solc
- store_artifacts_yul_phaser
- persist_executables_to_workspace
- matrix_notify_failure_unless_pr
soltest_all:
steps:
- checkout
- attach_workspace:
at: build
- run_soltest_all
- store_test_results:
path: test_results/
- store_artifacts_test_results
- matrix_notify_failure_unless_pr
cmdline_tests:
steps:
- checkout
- attach_workspace:
at: build
- run_cmdline_tests
- store_test_results:
path: test_results/
- store_artifacts_test_results
- matrix_notify_failure_unless_pr
install_dependencies_osx:
# An extra cache key is used to only save the flag that communicates whether the cache exists.
# if this flag was set (the cache exist) we remove all files located in /usr/local & /opt/homebrew.
# With this simple trick restoring the cache is much faster. Otherwise CircleCI is generating
# warning messages if a file from the cache is overwriting an already existing file on disk.
# Restoring the cache is much faster if we remove all potentially conflicting files beforehand.
steps:
- restore_cache:
keys:
- osx-dependencies-cached-{{ arch }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
- run:
name: Installing dependencies / Restoring dependency cache
command: |
if [[ -f ~/osx-dependencies-cached ]]; then
echo "Dependency flag exists. Removing /usr/local/, /opt/homebrew/, and /opt/boost. These directories will be restored from cache."
# CircleCI is providing the circleci cli tools via some kind of symlink magic.
# So we just save the original symlinks and restore them later.
circleci_binary_path=$(command -v circleci)
circleci_agent_binary_path=$(command -v circleci-agent)
cp "${circleci_binary_path}" /tmp/circleci
cp "${circleci_agent_binary_path}" /tmp/circleci-agent
# Homebrew is installed in /usr/local on intel macs, but in /opt/homebrew on apple silicon.
if [[ -d /opt/homebrew ]]; then
sudo rm -rf /opt/homebrew
sudo mkdir -p /opt/homebrew/bin
sudo chmod 777 /opt/{homebrew,homebrew/bin}
fi
# under macos /usr/local itself is read-only, so we just remove its sub-directories.
sudo rm -rf /usr/local/*
sudo mkdir -p /usr/local/bin
sudo chmod 777 /usr/{local,local/bin}
sudo rm -rf /opt/boost
sudo mkdir -p /opt/boost
sudo chmod 777 /opt/boost
mv /tmp/circleci "${circleci_binary_path}"
mv /tmp/circleci-agent "${circleci_agent_binary_path}"
fi
- restore_cache:
keys:
- osx-dependencies-{{ 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
- run:
name: Mark dependencies as cached
command: touch ~/osx-dependencies-cached
- save_cache:
key: osx-dependencies-{{ arch }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
paths:
# Homebrew is installed in /usr/local on intel macs, but in /opt/homebrew on apple silicon.
- /usr/local
- /opt/homebrew
- /opt/boost
- save_cache:
key: osx-dependencies-cached-{{ arch }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
paths:
- ~/osx-dependencies-cached
defaults:
# --------------------------------------------------------------------------
# Matrix templates
- bytecode_compare_env_presets: &bytecode_compare_env_presets
PRESETS:
legacy-optimize
legacy-no-optimize
via-ir-optimize
via-ir-no-optimize
- bytecode_compare_preset_matrix: &bytecode_compare_preset_matrix
parameters:
preset:
# NOTE: Keep in sync with preset list in bytecode_compare_env_presets
- legacy-optimize
- legacy-no-optimize
- via-ir-optimize
- via-ir-no-optimize
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
# Base Image Templates
- base_archlinux: &base_archlinux
docker:
- image: archlinux:base
environment: &base_archlinux_env
TERM: xterm
MAKEFLAGS: -j 3
CPUs: 3
- base_archlinux_large: &base_archlinux_large
<<: *base_archlinux
resource_class: large
environment: &base_archlinux_large_env
<<: *base_archlinux_env
MAKEFLAGS: -j 5
CPUs: 5
- base_cimg_small: &base_cimg_small
docker:
- image: cimg/base:current
resource_class: small
environment: &base_cimg_small_env
TERM: xterm
MAKEFLAGS: -j 2
CPUs: 2
- base_ems_large: &base_ems_large
docker:
- image: << pipeline.parameters.emscripten-docker-image >>
resource_class: large
environment: &base_ems_large_env
TERM: xterm
MAKEFLAGS: -j 5
CPUs: 5
- base_node_small: &base_node_small
docker:
- image: cimg/node:current
resource_class: small
environment: &base_node_small_env
TERM: xterm
MAKEFLAGS: -j 2
CPUs: 2
- base_osx: &base_osx
macos:
xcode: "15.0.0"
resource_class: macos.m1.medium.gen1
environment: &base_osx_env
TERM: xterm
MAKEFLAGS: -j5
CPUs: 5
- base_ubuntu_clang: &base_ubuntu_clang
docker:
- image: << pipeline.parameters.ubuntu-clang-ossfuzz-docker-image >>
environment: &base_ubuntu_clang_env
TERM: xterm
MAKEFLAGS: -j 3
CPUs: 3
- base_ubuntu_clang_small: &base_ubuntu_clang_small
<<: *base_ubuntu_clang
resource_class: small
environment: &base_ubuntu_clang_small_env
<<: *base_ubuntu_clang_env
MAKEFLAGS: -j 2
CPUs: 2
- base_ubuntu_clang_large: &base_ubuntu_clang_large
<<: *base_ubuntu_clang
resource_class: large
environment: &base_ubuntu_clang_small_env
<<: *base_ubuntu_clang_env
MAKEFLAGS: -j 5
CPUs: 5
- base_ubuntu2004: &base_ubuntu2004
docker:
- image: << pipeline.parameters.ubuntu-2004-docker-image >>
environment: &base_ubuntu2004_env
TERM: xterm
MAKEFLAGS: -j 3
CPUs: 3
- base_ubuntu2004_small: &base_ubuntu2004_small
<<: *base_ubuntu2004
resource_class: small
environment: &base_ubuntu2004_small_env
<<: *base_ubuntu2004_env
MAKEFLAGS: -j 2
CPUs: 2
- base_ubuntu2004_xlarge: &base_ubuntu2004_xlarge
<<: *base_ubuntu2004
resource_class: xlarge
environment: &base_ubuntu2004_xlarge_env
<<: *base_ubuntu2004_env
MAKEFLAGS: -j 10
CPUs: 10
- base_ubuntu2204: &base_ubuntu2204
docker:
- image: << pipeline.parameters.ubuntu-2204-docker-image >>
environment: &base_ubuntu2204_env
TERM: xterm
CC: gcc
CXX: g++
MAKEFLAGS: -j 3
CPUs: 3
- base_ubuntu2204_large: &base_ubuntu2204_large
<<: *base_ubuntu2204
resource_class: large
environment: &base_ubuntu2204_large_env
<<: *base_ubuntu2204_env
MAKEFLAGS: -j 5
CPUs: 5
- base_ubuntu2204_clang: &base_ubuntu2204_clang
docker:
- image: << pipeline.parameters.ubuntu-2204-docker-image >>
environment: &base_ubuntu2204_clang_env
TERM: xterm
CC: clang
CXX: clang++
MAKEFLAGS: -j 3
CPUs: 3
- base_ubuntu2204_clang_large: &base_ubuntu2204_clang_large
<<: *base_ubuntu2204_clang
resource_class: large
environment: &base_ubuntu2204_clang_large_env
<<: *base_ubuntu2204_clang_env
MAKEFLAGS: -j 5
CPUs: 5
- base_ubuntu2404: &base_ubuntu2404
docker:
- image: << pipeline.parameters.ubuntu-2404-docker-image >>
environment: &base_ubuntu2404_env
TERM: xterm
MAKEFLAGS: -j 3
CPUs: 3
- base_ubuntu2404_clang: &base_ubuntu2404_clang
docker:
- image: << pipeline.parameters.ubuntu-2404-clang-docker-image >>
environment: &base_ubuntu2404_clang_env
TERM: xterm
CC: clang
CXX: clang++
MAKEFLAGS: -j 3
CPUs: 3
- base_ubuntu2404_clang_large: &base_ubuntu2404_clang_large
<<: *base_ubuntu2404_clang
resource_class: large
environment: &base_ubuntu2404_clang_large_env
<<: *base_ubuntu2404_clang_env
MAKEFLAGS: -j 5
CPUs: 5
- base_ubuntu2404_small: &base_ubuntu2404_small
<<: *base_ubuntu2404
resource_class: small
environment: &base_ubuntu2404_small_env
<<: *base_ubuntu2404_env
MAKEFLAGS: -j 2
CPUs: 2
- base_ubuntu2404_large: &base_ubuntu2404_large
<<: *base_ubuntu2404
resource_class: large
environment: &base_ubuntu2404_large_env
<<: *base_ubuntu2404_env
MAKEFLAGS: -j 5
CPUs: 5
- base_ubuntu2404_xlarge: &base_ubuntu2404_xlarge
<<: *base_ubuntu2404
resource_class: xlarge
environment: &base_ubuntu2404_xlarge_env
<<: *base_ubuntu2404_env
MAKEFLAGS: -j 10
CPUs: 10
- base_win: &base_win
executor:
name: win/default
shell: bash.exe
- base_win_large: &base_win_large
executor:
name: win/default
size: large
shell: bash.exe
# --------------------------------------------------------------------------
# Workflow Templates
- on_all_tags_and_branches: &on_all_tags_and_branches
filters:
tags:
only: /.*/
- on_version_tags: &on_version_tags
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- on_develop: &on_develop
filters:
branches:
only:
- develop
- requires_nothing: &requires_nothing
<<: *on_all_tags_and_branches
- requires_b_ubu: &requires_b_ubu
<<: *on_all_tags_and_branches
requires:
- b_ubu
- requires_b_ubu_clang: &requires_b_ubu_clang
<<: *on_all_tags_and_branches
requires:
- b_ubu_clang
- requires_b_ubu_force_release: &requires_b_ubu_force_release
<<: *on_all_tags_and_branches
requires:
- b_ubu_force_release
- requires_b_ubu_static: &requires_b_ubu_static
<<: *on_all_tags_and_branches
requires:
- b_ubu_static
- requires_b_archlinux: &requires_b_archlinux
<<: *on_all_tags_and_branches
requires:
- b_archlinux
- requires_b_osx: &requires_b_osx
<<: *on_all_tags_and_branches
requires:
- b_osx
- requires_b_ubu_asan: &requires_b_ubu_asan
<<: *on_all_tags_and_branches
requires:
- b_ubu_asan
- requires_b_ubu_asan_clang: &requires_b_ubu_asan_clang
<<: *on_all_tags_and_branches
requires:
- b_ubu_asan_clang
- requires_b_ubu_ubsan_clang: &requires_b_ubu_ubsan_clang
<<: *on_all_tags_and_branches
requires:
- b_ubu_ubsan_clang
- requires_b_ems: &requires_b_ems
<<: *on_all_tags_and_branches
requires:
- b_ems
- requires_b_ubu_ossfuzz: &requires_b_ubu_ossfuzz
<<: *on_all_tags_and_branches
requires:
- b_ubu_ossfuzz
- requires_b_win: &requires_b_win
<<: *on_all_tags_and_branches
requires:
- b_win
# --------------------------------------------------------------------------
# Parameterized Job Templates
# Separate compile-only runs of those external tests where a full run takes much longer.
# Also see https://github.com/ethereum/solidity/pull/14234 for why we excluded those
# external tests from the nightly jobs.
- job_ems_compile_ext_colony: &job_ems_compile_ext_colony
<<: *requires_b_ems
name: t_ems_compile_ext_colony
project: colony
binary_type: solcjs
compile_only: 1
image: cimg/node:14.20
python2: true
- job_native_compile_ext_gnosis: &job_native_compile_ext_gnosis
<<: *requires_b_ubu_static
name: t_native_compile_ext_gnosis
project: gnosis
binary_type: native
# NOTE: We are disabling the gnosis test suite due to version discrepancies that are difficult to fix.
# Check again after (and if) https://github.com/safe-global/safe-contracts/pull/644 is merged.
compile_only: 1
image: cimg/node:18.16
- job_native_test_ext_zeppelin: &job_native_test_ext_zeppelin
<<: *requires_b_ubu_static
name: t_native_test_ext_zeppelin
project: zeppelin
binary_type: native
image: cimg/node:18.16
resource_class: large
- job_native_test_ext_ens: &job_native_test_ext_ens
<<: *requires_b_ubu_static
name: t_native_test_ext_ens
project: ens
binary_type: native
image: cimg/node:18.16
- job_native_compile_ext_trident: &job_native_compile_ext_trident
<<: *requires_b_ubu_static
name: t_native_compile_ext_trident
project: trident
binary_type: native
# NOTE: test suite disabled due to dependence on a specific version of Hardhat
# which does not support shanghai EVM.
compile_only: 1
image: cimg/node:18.16
- job_native_compile_ext_euler: &job_native_compile_ext_euler
<<: *requires_b_ubu_static
name: t_native_compile_ext_euler
project: euler
binary_type: native
resource_class: medium
- job_native_test_ext_yield_liquidator: &job_native_test_ext_yield_liquidator
<<: *requires_b_ubu_static
name: t_native_test_ext_yield_liquidator
project: yield-liquidator
binary_type: native
image: cimg/node:18.16
- job_native_compile_ext_bleeps: &job_native_compile_ext_bleeps
<<: *requires_b_ubu_static
name: t_native_compile_ext_bleeps
project: bleeps
binary_type: native
# NOTE: test suite disabled due to dependence on a specific version of Hardhat
# which does not support shanghai EVM.
compile_only: 1
resource_class: medium
- job_native_compile_ext_pool_together: &job_native_compile_ext_pool_together
<<: *requires_b_ubu_static
name: t_native_compile_ext_pool_together
project: pool-together
binary_type: native
# NOTE: test suite disabled due to dependence on a specific version of Hardhat
# which does not support shanghai EVM.
compile_only: 1
image: cimg/node:18.16
- job_native_test_ext_uniswap: &job_native_test_ext_uniswap
<<: *requires_b_ubu_static
name: t_native_test_ext_uniswap
project: uniswap
binary_type: native
image: cimg/node:18.16
- job_native_test_ext_prb_math: &job_native_test_ext_prb_math
<<: *requires_b_ubu_static
name: t_native_test_ext_prb_math
project: prb-math
binary_type: native
image: cimg/rust:1.74.0-node
resource_class: medium
# TODO: Use nightly Foundry builds after https://github.com/PaulRBerg/prb-math/issues/248 is fixed
foundry_version: "v0.3.0"
- job_native_test_ext_elementfi: &job_native_test_ext_elementfi
<<: *requires_b_ubu_static
name: t_native_test_ext_elementfi
project: elementfi
binary_type: native
image: cimg/node:18.16
resource_class: medium
- job_native_test_ext_brink: &job_native_test_ext_brink
<<: *requires_b_ubu_static
name: t_native_test_ext_brink
project: brink
binary_type: native
image: cimg/node:18.16
- job_native_compile_ext_chainlink: &job_native_compile_ext_chainlink
<<: *requires_b_ubu_static
name: t_native_compile_ext_chainlink
project: chainlink
binary_type: native
# NOTE: test suite disabled due to dependence on a specific version of Hardhat
# which does not support shanghai EVM.
compile_only: 1
image: cimg/node:16.20
resource_class: large # Tests run out of memory on a smaller machine
- job_native_compile_ext_gp2: &job_native_compile_ext_gp2
<<: *requires_b_ubu_static
name: t_native_compile_ext_gp2
project: gp2
binary_type: native
# NOTE: test suite disabled due to constant failures.
compile_only: 1
image: cimg/node:18.16
- job_b_ubu_asan_clang: &job_b_ubu_asan_clang
<<: *on_all_tags_and_branches
name: b_ubu_asan_clang
cmake_options: -DSANITIZE=address
- job_b_ubu_ubsan_clang: &job_b_ubu_ubsan_clang
<<: *on_all_tags_and_branches
name: b_ubu_ubsan_clang
cmake_options: -DSANITIZE=undefined
# -----------------------------------------------------------------------------------------------
jobs:
chk_spelling:
<<: *base_ubuntu2404_small
steps:
- checkout
- attach_workspace:
at: build
- run:
name: Install dependencies
command: |
pip install --user codespell
- run:
name: Check spelling
command: ~/.local/bin/codespell
- matrix_notify_failure_unless_pr
chk_docs_examples:
<<: *base_node_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
- matrix_notify_failure_unless_pr
chk_coding_style:
<<: *base_cimg_small
steps:
- checkout
- run:
name: Install shellcheck
command: |
sudo apt -q update
sudo 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
- matrix_notify_failure_unless_pr
chk_errorcodes:
<<: *base_ubuntu2404_small
steps:
- checkout
- run:
name: Check for error codes
command: scripts/error_codes.py --check
- matrix_notify_failure_unless_pr
chk_pylint:
<<: *base_ubuntu2404_small
steps:
- checkout
- run: pylint --version
- run:
name: Linting Python Scripts
command: scripts/pylint_all.py
- matrix_notify_failure_unless_pr
chk_antlr_grammar:
<<: *base_cimg_small
steps:
- checkout
- run:
name: Install Java
command: |
sudo apt -q update
sudo apt install -y openjdk-17-jdk
- run:
name: Run tests
command: scripts/test_antlr_grammar.sh
- matrix_notify_failure_unless_pr
chk_buglist:
<<: *base_node_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
- matrix_notify_failure_unless_pr
chk_proofs:
<<: *base_ubuntu2404_small
steps:
- checkout
- run_proofs
- matrix_notify_failure_unless_pr
chk_docs_pragma_min_version:
<<: *base_ubuntu2404_small
steps:
- checkout