From 3ec05d02b5abeac390bc074b523f2c77c3aafa81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Thu, 9 Dec 2021 15:35:16 +0100 Subject: [PATCH] externalTests: Add extra viaIR runs --- .circleci/config.yml | 5 +++-- test/externalTests/colony.sh | 3 +++ test/externalTests/common.sh | 10 +++++++--- test/externalTests/ens.sh | 3 +++ test/externalTests/gnosis-v2.sh | 3 +++ test/externalTests/gnosis.sh | 3 +++ test/externalTests/zeppelin.sh | 3 +++ 7 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cda6e5890..20d06662d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1037,8 +1037,9 @@ jobs: docker: - image: circleci/node:<> resource_class: <> - # NOTE: Each external test does 3 separate compile&test runs - parallelism: 3 + # NOTE: Each external test runs up to 6 independent settings presets. If parallelism is higher than + # actual preset count, some runs will exit immediately. If it's lower, some runs will get more than one preset. + parallelism: 6 environment: TERM: xterm COMPILE_ONLY: <> diff --git a/test/externalTests/colony.sh b/test/externalTests/colony.sh index 7326f90bc..d5b57f024 100755 --- a/test/externalTests/colony.sh +++ b/test/externalTests/colony.sh @@ -37,6 +37,9 @@ function colony_test local branch=develop_080 local config_file="truffle.js" local settings_presets=( + #ir-no-optimize # Compiles but tests run out of gas + #ir-optimize-evm-only # Compiles but tests run out of gas + ir-optimize-evm+yul #legacy-no-optimize # Compiles but tests run out of gas #legacy-optimize-evm-only # Compiles but tests run out of gas legacy-optimize-evm+yul diff --git a/test/externalTests/common.sh b/test/externalTests/common.sh index 93484b16b..012a21b2f 100644 --- a/test/externalTests/common.sh +++ b/test/externalTests/common.sh @@ -250,9 +250,13 @@ function settings_from_preset local evm_version="$2" case "$preset" in - legacy-no-optimize) echo "{evmVersion: '${evm_version}', optimizer: {enabled: false}}" ;; - legacy-optimize-evm-only) echo "{evmVersion: '${evm_version}', optimizer: {enabled: true, details: {yul: false}}}" ;; - legacy-optimize-evm+yul) echo "{evmVersion: '${evm_version}', optimizer: {enabled: true, details: {yul: true}}}" ;; + # NOTE: Remember to update `parallelism` of `t_ems_ext` job in CI config if you add/remove presets + legacy-no-optimize) echo "{evmVersion: '${evm_version}', viaIR: false, optimizer: {enabled: false}}" ;; + ir-no-optimize) echo "{evmVersion: '${evm_version}', viaIR: true, optimizer: {enabled: false}}" ;; + legacy-optimize-evm-only) echo "{evmVersion: '${evm_version}', viaIR: false, optimizer: {enabled: true, details: {yul: false}}}" ;; + ir-optimize-evm-only) echo "{evmVersion: '${evm_version}', viaIR: true, optimizer: {enabled: true, details: {yul: false}}}" ;; + legacy-optimize-evm+yul) echo "{evmVersion: '${evm_version}', viaIR: false, optimizer: {enabled: true, details: {yul: true}}}" ;; + ir-optimize-evm+yul) echo "{evmVersion: '${evm_version}', viaIR: true, optimizer: {enabled: true, details: {yul: true}}}" ;; *) fail "Unknown settings preset: '${preset}'." ;; diff --git a/test/externalTests/ens.sh b/test/externalTests/ens.sh index de0545431..c0bc4b558 100755 --- a/test/externalTests/ens.sh +++ b/test/externalTests/ens.sh @@ -37,6 +37,9 @@ function ens_test local branch=master local config_file="truffle.js" local settings_presets=( + #ir-no-optimize # "YulException: Variable var_ttl_236 is 1 slot(s) too deep inside the stack." + #ir-optimize-evm-only # "YulException: Variable var_ttl_236 is 1 slot(s) too deep inside the stack." + ir-optimize-evm+yul legacy-no-optimize legacy-optimize-evm-only legacy-optimize-evm+yul diff --git a/test/externalTests/gnosis-v2.sh b/test/externalTests/gnosis-v2.sh index 443d5583c..bae0f0f1e 100755 --- a/test/externalTests/gnosis-v2.sh +++ b/test/externalTests/gnosis-v2.sh @@ -37,6 +37,9 @@ function gnosis_safe_test local branch=v2_080 local config_file="truffle-config.js" local settings_presets=( + #ir-no-optimize # "YulException: Variable var_call_430_mpos is 1 slot(s) too deep inside the stack." + #ir-optimize-evm-only # "YulException: Variable var_call_430_mpos is 1 slot(s) too deep inside the stack." + ir-optimize-evm+yul #legacy-no-optimize # "Error: while migrating GnosisSafe: Returned error: base fee exceeds gas limit" legacy-optimize-evm-only legacy-optimize-evm+yul diff --git a/test/externalTests/gnosis.sh b/test/externalTests/gnosis.sh index 9f0d356b6..562ab156f 100755 --- a/test/externalTests/gnosis.sh +++ b/test/externalTests/gnosis.sh @@ -37,6 +37,9 @@ function gnosis_safe_test local branch=development_080 local config_file="truffle-config.js" local settings_presets=( + #ir-no-optimize # "YulException: Variable var_call_430_mpos is 1 slot(s) too deep inside the stack." + #ir-optimize-evm-only # "YulException: Variable var_call_430_mpos is 1 slot(s) too deep inside the stack." + ir-optimize-evm+yul #legacy-no-optimize # "Stack too deep" error #legacy-optimize-evm-only # "Stack too deep" error legacy-optimize-evm+yul diff --git a/test/externalTests/zeppelin.sh b/test/externalTests/zeppelin.sh index 280c9ffeb..89f3d6b42 100755 --- a/test/externalTests/zeppelin.sh +++ b/test/externalTests/zeppelin.sh @@ -37,6 +37,9 @@ function zeppelin_test local branch=master local config_file="hardhat.config.js" local settings_presets=( + #ir-no-optimize # "YulException: Variable var_account_852 is 4 slot(s) too deep inside the stack." + #ir-optimize-evm-only # "YulException: Variable var_account_852 is 4 slot(s) too deep inside the stack." + #ir-optimize-evm+yul # Compiles but tests fail. See https://github.com/nomiclabs/hardhat/issues/2115 legacy-no-optimize legacy-optimize-evm-only legacy-optimize-evm+yul