mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Parallelize external test runs on CircleCI
This commit is contained in:
parent
fbc48e3029
commit
834f9d3a6e
@ -943,6 +943,8 @@ jobs:
|
||||
default: 14
|
||||
docker:
|
||||
- image: circleci/node:<<parameters.nodejs_version>>
|
||||
# NOTE: Each external test does 3 separate compile&test runs
|
||||
parallelism: 3
|
||||
environment:
|
||||
TERM: xterm
|
||||
COMPILE_ONLY: <<parameters.compile_only>>
|
||||
|
@ -38,6 +38,10 @@ function colony_test
|
||||
local min_optimizer_level=3
|
||||
local max_optimizer_level=3
|
||||
|
||||
local selected_optimizer_levels
|
||||
selected_optimizer_levels=$(circleci_select_steps "$(seq "$min_optimizer_level" "$max_optimizer_level")")
|
||||
print_optimizer_levels_or_exit "$selected_optimizer_levels"
|
||||
|
||||
setup_solcjs "$DIR" "$SOLJSON"
|
||||
download_project "$repo" "$branch" "$DIR"
|
||||
|
||||
@ -54,7 +58,7 @@ function colony_test
|
||||
replace_version_pragmas
|
||||
force_solc_modules "${DIR}/solc"
|
||||
|
||||
for level in $(seq "$min_optimizer_level" "$max_optimizer_level"); do
|
||||
for level in $selected_optimizer_levels; do
|
||||
truffle_run_test "$config_file" "${DIR}/solc" "$level" compile_fn test_fn
|
||||
done
|
||||
}
|
||||
|
@ -24,6 +24,15 @@ set -e
|
||||
|
||||
CURRENT_EVM_VERSION=london
|
||||
|
||||
function print_optimizer_levels_or_exit
|
||||
{
|
||||
local selected_levels="$1"
|
||||
|
||||
[[ $selected_levels != "" ]] || { printWarning "No steps to run. Exiting."; exit 0; }
|
||||
|
||||
printLog "Selected optimizer levels: ${selected_levels}"
|
||||
}
|
||||
|
||||
function verify_input
|
||||
{
|
||||
if [ ! -f "$1" ]; then
|
||||
|
@ -38,6 +38,10 @@ function ens_test
|
||||
local min_optimizer_level=1
|
||||
local max_optimizer_level=3
|
||||
|
||||
local selected_optimizer_levels
|
||||
selected_optimizer_levels=$(circleci_select_steps "$(seq "$min_optimizer_level" "$max_optimizer_level")")
|
||||
print_optimizer_levels_or_exit "$selected_optimizer_levels"
|
||||
|
||||
setup_solcjs "$DIR" "$SOLJSON"
|
||||
download_project "$repo" "$branch" "$DIR"
|
||||
|
||||
@ -52,7 +56,7 @@ function ens_test
|
||||
replace_version_pragmas
|
||||
force_solc_modules "${DIR}/solc"
|
||||
|
||||
for level in $(seq "$min_optimizer_level" "$max_optimizer_level"); do
|
||||
for level in $selected_optimizer_levels; do
|
||||
truffle_run_test "$config_file" "${DIR}/solc" "$level" compile_fn test_fn
|
||||
done
|
||||
}
|
||||
|
@ -39,6 +39,10 @@ function gnosis_safe_test
|
||||
local min_optimizer_level=2
|
||||
local max_optimizer_level=3
|
||||
|
||||
local selected_optimizer_levels
|
||||
selected_optimizer_levels=$(circleci_select_steps "$(seq "$min_optimizer_level" "$max_optimizer_level")")
|
||||
print_optimizer_levels_or_exit "$selected_optimizer_levels"
|
||||
|
||||
setup_solcjs "$DIR" "$SOLJSON"
|
||||
download_project "$repo" "$branch" "$DIR"
|
||||
|
||||
@ -53,7 +57,7 @@ function gnosis_safe_test
|
||||
replace_version_pragmas
|
||||
force_solc_modules "${DIR}/solc"
|
||||
|
||||
for level in $(seq "$min_optimizer_level" "$max_optimizer_level"); do
|
||||
for level in $selected_optimizer_levels; do
|
||||
truffle_run_test "$config_file" "${DIR}/solc" "$level" compile_fn test_fn
|
||||
done
|
||||
}
|
||||
|
@ -38,6 +38,10 @@ function gnosis_safe_test
|
||||
local min_optimizer_level=2
|
||||
local max_optimizer_level=3
|
||||
|
||||
local selected_optimizer_levels
|
||||
selected_optimizer_levels=$(circleci_select_steps "$(seq "$min_optimizer_level" "$max_optimizer_level")")
|
||||
print_optimizer_levels_or_exit "$selected_optimizer_levels"
|
||||
|
||||
setup_solcjs "$DIR" "$SOLJSON"
|
||||
download_project "$repo" "$branch" "$DIR"
|
||||
|
||||
@ -51,7 +55,7 @@ function gnosis_safe_test
|
||||
replace_version_pragmas
|
||||
force_solc_modules "${DIR}/solc"
|
||||
|
||||
for level in $(seq "$min_optimizer_level" "$max_optimizer_level"); do
|
||||
for level in $selected_optimizer_levels; do
|
||||
truffle_run_test "$config_file" "${DIR}/solc" "$level" compile_fn test_fn
|
||||
done
|
||||
}
|
||||
|
@ -38,6 +38,10 @@ function zeppelin_test
|
||||
local min_optimizer_level=1
|
||||
local max_optimizer_level=3
|
||||
|
||||
local selected_optimizer_levels
|
||||
selected_optimizer_levels=$(circleci_select_steps "$(seq "$min_optimizer_level" "$max_optimizer_level")")
|
||||
print_optimizer_levels_or_exit "$selected_optimizer_levels"
|
||||
|
||||
setup_solcjs "$DIR" "$SOLJSON"
|
||||
download_project "$repo" "$branch" "$DIR"
|
||||
|
||||
@ -48,7 +52,7 @@ function zeppelin_test
|
||||
replace_version_pragmas
|
||||
force_solc_modules "${DIR}/solc"
|
||||
|
||||
for level in $(seq "$min_optimizer_level" "$max_optimizer_level"); do
|
||||
for level in $selected_optimizer_levels; do
|
||||
truffle_run_test "$config_file" "${DIR}/solc" "$level" compile_fn test_fn
|
||||
done
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user