Skip to content

Commit

Permalink
Run tests in parallel.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseth committed Jul 15, 2020
1 parent 7b2f716 commit 4c47475
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ defaults:
- test_ubuntu2004: &test_ubuntu2004
docker:
- image: ethereum/solidity-buildpack-deps:ubuntu2004-<< pipeline.parameters.ubuntu-2004-docker-image-rev >>
parallelism: 4
resource_class: large
steps:
- checkout
- attach_workspace:
Expand Down
22 changes: 20 additions & 2 deletions .circleci/soltest_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,28 @@ set -e

REPODIR="$(realpath $(dirname $0)/..)"

EVM=istanbul OPTIMIZE=1 ABI_ENCODER_V2=1 ${REPODIR}/.circleci/soltest.sh
# This number has to equal the number of steps below.
STEPS=11

RUN_STEPS=$(seq "$STEPS" | circleci tests split)
RUN_STEPS=$(echo $RUN_STEPS)

echo "Running steps $RUN_STEPS..."

STEP=1

[[ " $RUN_STEPS " =~ " $STEP " ]] && EVM=istanbul OPTIMIZE=1 ABI_ENCODER_V2=1 ${REPODIR}/.circleci/soltest.sh
STEP=$(($STEP + 1))

for OPTIMIZE in 0 1; do
for EVM in homestead byzantium constantinople petersburg istanbul; do
EVM=$EVM OPTIMIZE=$OPTIMIZE BOOST_TEST_ARGS="-t !@nooptions" ${REPODIR}/.circleci/soltest.sh
[[ " $RUN_STEPS " =~ " $STEP " ]] && EVM=$EVM OPTIMIZE=$OPTIMIZE BOOST_TEST_ARGS="-t !@nooptions" ${REPODIR}/.circleci/soltest.sh
STEP=$(($STEP + 1))
done
done

if [ "$STEP" != "$(( $STEPS + 1))" ]
then
echo "Step counter not properly adjusted!"
exit 1
fi

0 comments on commit 4c47475

Please sign in to comment.