@@ -293,6 +293,15 @@ defaults:
293293 sudo apt install python3-pip --assume-yes --no-install-recommends
294294 python3 -m pip install requests --user
295295
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+
296305 # --------------------------------------------------------------------------
297306 # Base Image Templates
298307
@@ -1215,15 +1224,14 @@ jobs:
12151224 type : boolean
12161225 default : false
12171226 docker :
1218- - image : <<parameters.image>>
1219- resource_class : <<parameters.resource_class>>
1227+ - image : << parameters.image >>
1228+ resource_class : << parameters.resource_class >>
12201229 # NOTE: Each external test runs up to 6 independent settings presets. If parallelism is higher than
12211230 # actual preset count, some runs will exit immediately. If it's lower, some runs will get more than one preset.
12221231 parallelism : 6
12231232 environment :
12241233 TERM : xterm
1225- COMPILE_ONLY : <<parameters.compile_only>>
1226- << : *steps_install_python_dependencies
1234+ COMPILE_ONLY : << parameters.compile_only >>
12271235 steps :
12281236 - checkout
12291237 - attach_workspace :
@@ -1234,6 +1242,15 @@ jobs:
12341242 # lsof is used by Colony in its stop-blockchain-client.sh script
12351243 sudo apt update
12361244 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
12371254 - when :
12381255 condition : << parameters.python2 >>
12391256 steps :
@@ -1249,17 +1266,30 @@ jobs:
12491266 equal : [<< parameters.binary_type >>, "solcjs"]
12501267 steps :
12511268 - 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)
12531280 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
12551283 - when :
12561284 condition :
1257- equal : [<< parameters.binary_type >>, "native"]
1285+ and :
1286+ - equal : [<< parameters.binary_type >>, "native"]
1287+ - not equal : [<< parameters.project >>, "prb-math"]
12581288 steps :
12591289 - run :
1260- name : External <<parameters.project>> tests (native)
1290+ name : External << parameters.project >> tests (native)
12611291 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
12631293 - store_artifacts :
12641294 path : reports/externalTests/
12651295 # persist_to_workspace fails if the directory does not exist and the test script will create
0 commit comments