@@ -293,6 +293,15 @@ defaults:
293
293
sudo apt install python3-pip --assume-yes --no-install-recommends
294
294
python3 -m pip install requests --user
295
295
296
+ - steps_install_foundry : &steps_install_foundry
297
+ steps :
298
+ - run :
299
+ name : Install foundry
300
+ command : |
301
+ # Note: Currently Foundry only has nightly builds and there is no release checksum
302
+ wget https://github.com/foundry-rs/foundry/releases/download/nightly/foundry_nightly_linux_amd64.tar.gz --output-document /tmp/foundry.tar.gz
303
+ sudo tar --extract --gzip --file /tmp/foundry.tar.gz --directory /usr/local/bin
304
+
296
305
# --------------------------------------------------------------------------
297
306
# Base Image Templates
298
307
@@ -1215,15 +1224,14 @@ jobs:
1215
1224
type : boolean
1216
1225
default : false
1217
1226
docker :
1218
- - image : <<parameters.image>>
1219
- resource_class : <<parameters.resource_class>>
1227
+ - image : << parameters.image >>
1228
+ resource_class : << parameters.resource_class >>
1220
1229
# NOTE: Each external test runs up to 6 independent settings presets. If parallelism is higher than
1221
1230
# actual preset count, some runs will exit immediately. If it's lower, some runs will get more than one preset.
1222
1231
parallelism : 6
1223
1232
environment :
1224
1233
TERM : xterm
1225
- COMPILE_ONLY : <<parameters.compile_only>>
1226
- << : *steps_install_python_dependencies
1234
+ COMPILE_ONLY : << parameters.compile_only >>
1227
1235
steps :
1228
1236
- checkout
1229
1237
- attach_workspace :
@@ -1234,6 +1242,15 @@ jobs:
1234
1242
# lsof is used by Colony in its stop-blockchain-client.sh script
1235
1243
sudo apt update
1236
1244
sudo apt-get --quiet --assume-yes --no-install-recommends install lsof
1245
+ - when :
1246
+ condition : true
1247
+ << : *steps_install_python_dependencies
1248
+ - when :
1249
+ condition :
1250
+ matches :
1251
+ pattern : /^.+rust.+$/
1252
+ value : << parameters.image >>
1253
+ << : *steps_install_foundry
1237
1254
- when :
1238
1255
condition : << parameters.python2 >>
1239
1256
steps :
@@ -1249,17 +1266,30 @@ jobs:
1249
1266
equal : [<< parameters.binary_type >>, "solcjs"]
1250
1267
steps :
1251
1268
- run :
1252
- name : External <<parameters.project>> tests (solcjs)
1269
+ name : External << parameters.project >> tests (solcjs)
1270
+ command : |
1271
+ test/externalTests/<< parameters.project >>.sh solcjs /tmp/workspace/soljson.js
1272
+ - when :
1273
+ condition :
1274
+ and :
1275
+ - equal : [<< parameters.binary_type >>, "native"]
1276
+ - equal : [<< parameters.project >>, "prb-math"]
1277
+ steps :
1278
+ - run :
1279
+ name : External << parameters.project >> tests (native)
1253
1280
command : |
1254
- test/externalTests/<<parameters.project>>.py solcjs /tmp/workspace/soljson.js
1281
+ test/externalTests/<< parameters.project >>.py --solc-binary-type native --solc-binary-path /tmp/workspace/solc/solc
1282
+ # TODO: remove after address comment: https://github.com/ethereum/solidity/pull/13873#discussion_r1081687334
1255
1283
- when :
1256
1284
condition :
1257
- equal : [<< parameters.binary_type >>, "native"]
1285
+ and :
1286
+ - equal : [<< parameters.binary_type >>, "native"]
1287
+ - not equal : [<< parameters.project >>, "prb-math"]
1258
1288
steps :
1259
1289
- run :
1260
- name : External <<parameters.project>> tests (native)
1290
+ name : External << parameters.project >> tests (native)
1261
1291
command : |
1262
- test/externalTests/<<parameters.project>>.py --solc-binary-type native --solc-binary-path /tmp/workspace/solc/solc
1292
+ test/externalTests/<< parameters.project >>.sh native /tmp/workspace/solc/solc
1263
1293
- store_artifacts :
1264
1294
path : reports/externalTests/
1265
1295
# persist_to_workspace fails if the directory does not exist and the test script will create
0 commit comments