@@ -186,6 +186,52 @@ commands:
186
186
# --------------------------------------------------------------------------
187
187
# Build Commands
188
188
189
+ setup_ccache :
190
+ parameters :
191
+ os :
192
+ type : string
193
+ default : " undefined"
194
+ steps :
195
+ - run :
196
+ name : Create CMake files checksum
197
+ command : |
198
+ find . -name "CMakeLists.txt" -exec cat {} \; > /tmp/all-cmake-files.txt
199
+ - restore_cache :
200
+ keys :
201
+ - ccache-v1-<<parameters.os>>-{{ arch }}-{{ .Branch }}-{{ checksum "/tmp/all-cmake-files.txt" }}
202
+ - ccache-v1-<<parameters.os>>-{{ arch }}-{{ .Branch }}-
203
+ - ccache-v1-<<parameters.os>>-{{ arch }}-
204
+ - run :
205
+ name : Install and configure ccache
206
+ command : |
207
+ # Install ccache if not present (cmake will use it, via EthCcache)
208
+ if ! command -v ccache &> /dev/null; then
209
+ if command -v brew &> /dev/null; then
210
+ brew install ccache
211
+ elif command -v apt &> /dev/null; then
212
+ sudo apt update
213
+ sudo apt install -y ccache
214
+ elif command -v pacman &> /dev/null; then
215
+ # ArchLinux
216
+ sudo pacman --noconfirm -S ccache
217
+ else
218
+ echo "Warning: Unknown package manager, ccache may not be available"
219
+ fi
220
+ fi
221
+
222
+ # Configure ccache settings (only if ccache is available)
223
+ if command -v ccache &> /dev/null; then
224
+ ccache --set-config max_size=2G
225
+ ccache --set-config cache_dir=$HOME/.ccache
226
+ ccache --zero-stats
227
+
228
+ # Show initial stats
229
+ echo "ccache initial stats:"
230
+ ccache --show-stats
231
+ else
232
+ echo "ccache not available, skipping configuration"
233
+ fi
234
+
189
235
setup_prerelease_commit_hash :
190
236
steps :
191
237
- run :
@@ -199,10 +245,25 @@ commands:
199
245
echo -n "$CIRCLE_SHA1" > commit_hash.txt
200
246
201
247
run_build :
248
+ parameters :
249
+ os :
250
+ type : string
251
+ default : " undefined"
202
252
steps :
253
+ - setup_ccache :
254
+ os : <<parameters.os>>
203
255
- run :
204
256
name : Build
205
257
command : scripts/ci/build.sh
258
+ - run :
259
+ name : Show ccache stats
260
+ command : |
261
+ echo "ccache final stats:"
262
+ ccache --show-stats
263
+ - save_cache :
264
+ key : ccache-v1-<<parameters.os>>-{{ arch }}-{{ .Branch }}-{{ checksum "/tmp/all-cmake-files.txt" }}
265
+ paths :
266
+ - ~/.ccache
206
267
207
268
run_build_ossfuzz :
208
269
steps :
@@ -341,9 +402,14 @@ commands:
341
402
- matrix_notify_failure_unless_pr
342
403
343
404
build :
405
+ parameters :
406
+ os :
407
+ type : string
408
+ default : " undefined"
344
409
steps :
345
410
- checkout
346
- - run_build
411
+ - run_build :
412
+ os : << parameters.os >>
347
413
- store_artifacts_solc
348
414
- store_artifacts_yul_phaser
349
415
- persist_executables_to_workspace
@@ -1034,7 +1100,8 @@ jobs:
1034
1100
# Enough other jobs depend on it that it's worth it though.
1035
1101
<< : *base_ubuntu2404_xlarge
1036
1102
steps :
1037
- - build
1103
+ - build :
1104
+ os : ubu
1038
1105
1039
1106
# x64 ASAN build, for testing for memory related bugs
1040
1107
b_ubu_asan : &b_ubu_asan
@@ -1051,15 +1118,17 @@ jobs:
1051
1118
# Set the number of jobs to two instead of the default three, so that we do not run out of memory
1052
1119
MAKEFLAGS : -j 2
1053
1120
steps :
1054
- - build
1121
+ - build :
1122
+ os : ubu_asan
1055
1123
1056
1124
b_ubu_clang : &b_ubu_clang
1057
1125
<< : *base_ubuntu2404_clang_large
1058
1126
environment :
1059
1127
<< : *base_ubuntu2404_clang_large_env
1060
1128
MAKEFLAGS : -j 10
1061
1129
steps :
1062
- - build
1130
+ - build :
1131
+ os : ubu_clang
1063
1132
1064
1133
b_ubu_san_clang :
1065
1134
# This runs a bit faster on large and xlarge but on nightly efficiency matters more.
@@ -1072,7 +1141,8 @@ jobs:
1072
1141
# NOTE: Disabled pedantic builds to avoid false positives, see b_ubu_asan for a more detailed explanation.
1073
1142
CMAKE_OPTIONS : -DPEDANTIC=OFF << parameters.cmake_options >>
1074
1143
steps :
1075
- - build
1144
+ - build :
1145
+ os : ubu_san_clang
1076
1146
1077
1147
b_ubu_force_release : &b_ubu_force_release
1078
1148
<< : *b_ubu
@@ -1091,7 +1161,8 @@ jobs:
1091
1161
CMAKE_OPTIONS : -DCMAKE_BUILD_TYPE=Release -DSOLC_LINK_STATIC=ON
1092
1162
steps :
1093
1163
- checkout
1094
- - run_build
1164
+ - run_build :
1165
+ os : ubu
1095
1166
- run :
1096
1167
name : strip binary
1097
1168
command : strip build/solc/solc
@@ -1109,7 +1180,8 @@ jobs:
1109
1180
<< : *base_ubuntu2204_large
1110
1181
steps :
1111
1182
- checkout
1112
- - run_build
1183
+ - run_build :
1184
+ os : ubu_2204
1113
1185
- matrix_notify_failure_unless_pr
1114
1186
1115
1187
b_ubu_2204_clang :
@@ -1119,7 +1191,8 @@ jobs:
1119
1191
MAKEFLAGS : -j 10
1120
1192
steps :
1121
1193
- checkout
1122
- - run_build
1194
+ - run_build :
1195
+ os : ubu_2204_clang
1123
1196
- matrix_notify_failure_unless_pr
1124
1197
1125
1198
b_ubu_ossfuzz : &b_ubu_ossfuzz
@@ -1157,7 +1230,8 @@ jobs:
1157
1230
command : |
1158
1231
pacman --noconfirm -Syu --noprogressbar --needed base-devel boost cmake git openssh tar
1159
1232
- checkout
1160
- - run_build
1233
+ - run_build :
1234
+ os : archlinux
1161
1235
- store_artifacts_solc
1162
1236
- persist_executables_to_workspace
1163
1237
- matrix_notify_failure_unless_pr
@@ -1172,7 +1246,8 @@ jobs:
1172
1246
steps :
1173
1247
- checkout
1174
1248
- install_dependencies_osx
1175
- - run_build
1249
+ - run_build :
1250
+ os : mac
1176
1251
- store_artifacts_solc
1177
1252
- store_artifacts_yul_phaser
1178
1253
- persist_executables_to_workspace_osx
0 commit comments