diff --git a/.circleci/config.yml b/.circleci/config.yml index f6346c2d1..952cc87d1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -96,22 +96,35 @@ defaults: name: soltest command: ./.circleci/soltest.sh + - run_soltest_all: &run_soltest_all + name: soltest_all + command: ./.circleci/soltest_all.sh + - run_cmdline_tests: &run_cmdline_tests name: command line tests command: ./test/cmdlineTests.sh - - test_steps: &test_steps - - checkout - - attach_workspace: - at: build - - run: *run_soltest - - store_test_results: *store_test_results - - store_artifacts: *artifacts_test_results - - test_ubuntu1904: &test_ubuntu1904 docker: - image: ethereum/solidity-buildpack-deps:ubuntu1904 - steps: *test_steps + steps: + - checkout + - attach_workspace: + at: build + - run: *run_soltest + - store_test_results: *store_test_results + - store_artifacts: *artifacts_test_results + + - test_ubuntu1904_all: &test_ubuntu1904 + docker: + - image: ethereum/solidity-buildpack-deps:ubuntu1904 + steps: + - checkout + - attach_workspace: + at: build + - run: *run_soltest_all + - store_test_results: *store_test_results + - store_artifacts: *artifacts_test_results - test_asan: &test_asan <<: *test_ubuntu1904 @@ -445,6 +458,9 @@ jobs: path: docs/_build/html/ destination: docs-html + t_ubu_soltest: &t_ubu_soltest + <<: *test_ubuntu1904 + t_ubu_cli: &t_ubu_cli docker: - image: ethereum/solidity-buildpack-deps:ubuntu1904 @@ -480,61 +496,6 @@ jobs: OPTIMIZE: 0 ASAN_OPTIONS: check_initialization_order=true:detect_stack_use_after_return=true:strict_init_order=true:strict_string_checks=true:detect_invalid_pointer_pairs=2 - t_ubu_homestead: - <<: *test_ubuntu1904 - environment: - EVM: homestead - OPTIMIZE: 0 - - t_ubu_homestead_opt: - <<: *test_ubuntu1904 - environment: - EVM: homestead - OPTIMIZE: 1 - - t_ubu_byzantium: - <<: *test_ubuntu1904 - environment: - EVM: byzantium - OPTIMIZE: 0 - - t_ubu_byzantium_opt: - <<: *test_ubuntu1904 - environment: - EVM: byzantium - OPTIMIZE: 1 - - t_ubu_constantinople: - <<: *test_ubuntu1904 - environment: - EVM: constantinople - OPTIMIZE: 0 - - t_ubu_constantinople_opt: - <<: *test_ubuntu1904 - environment: - EVM: constantinople - OPTIMIZE: 1 - - t_ubu_constantinople_opt_abiv2: - <<: *test_ubuntu1904 - environment: - EVM: constantinople - OPTIMIZE: 1 - ABI_ENCODER_V2: 1 - - t_ubu_petersburg: - <<: *test_ubuntu1904 - environment: - EVM: petersburg - OPTIMIZE: 0 - - t_ubu_petersburg_opt: - <<: *test_ubuntu1904 - environment: - EVM: petersburg - OPTIMIZE: 1 - t_ems_solcjs: docker: - image: circleci/node:10 @@ -619,19 +580,11 @@ workflows: - b_osx: *workflow_trigger_on_tags - t_osx_cli: *workflow_osx - # Ubuntu 18.10 build and tests + # Ubuntu build and tests - b_ubu: *workflow_trigger_on_tags - b_ubu18: *workflow_trigger_on_tags - t_ubu_cli: *workflow_ubuntu1904 - - t_ubu_homestead: *workflow_ubuntu1904 - - t_ubu_homestead_opt: *workflow_ubuntu1904 - - t_ubu_byzantium: *workflow_ubuntu1904 - - t_ubu_byzantium_opt: *workflow_ubuntu1904 - - t_ubu_constantinople: *workflow_ubuntu1904 - - t_ubu_constantinople_opt: *workflow_ubuntu1904 - - t_ubu_constantinople_opt_abiv2: *workflow_ubuntu1904 - - t_ubu_petersburg: *workflow_ubuntu1904 - - t_ubu_petersburg_opt: *workflow_ubuntu1904 + - t_ubu_soltest: *workflow_ubuntu1904 # ASan build and tests - b_ubu_asan: *workflow_trigger_on_tags diff --git a/.circleci/soltest.sh b/.circleci/soltest.sh index dda335102..41f08db77 100755 --- a/.circleci/soltest.sh +++ b/.circleci/soltest.sh @@ -45,7 +45,15 @@ mkdir -p test_results # in case we run with ASAN enabled, we must increase stck size. ulimit -s 16384 -BOOST_TEST_ARGS="--color_output=no --show_progress=yes --logger=JUNIT,error,test_results/$EVM.xml" +get_logfile_basename() { + local filename="${EVM}" + test "${OPTIMIZE}" = "1" && filename="${filename}_opt" + test "${ABI_ENCODER_V2}" = "1" && filename="${filename}_abiv2" + + echo -ne "${filename}" +} + +BOOST_TEST_ARGS="--color_output=no --show_progress=yes --logger=JUNIT,error,test_results/`get_logfile_basename`.xml" SOLTEST_ARGS="--evm-version=$EVM --evmonepath /usr/lib/libevmone.so $flags" test "${OPTIMIZE}" = "1" && SOLTEST_ARGS="${SOLTEST_ARGS} --optimize" test "${ABI_ENCODER_V2}" = "1" && SOLTEST_ARGS="${SOLTEST_ARGS} --abiencoderv2 --optimize-yul" diff --git a/.circleci/soltest_all.sh b/.circleci/soltest_all.sh new file mode 100755 index 000000000..7b4564ee7 --- /dev/null +++ b/.circleci/soltest_all.sh @@ -0,0 +1,37 @@ +#! /bin/bash +#------------------------------------------------------------------------------ +# Bash script to execute the Solidity tests by CircleCI. +# +# The documentation for solidity is hosted at: +# +# https://solidity.readthedocs.org +# +# ------------------------------------------------------------------------------ +# This file is part of solidity. +# +# solidity is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# solidity is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with solidity. If not, see +# +# (c) 2016-2019 solidity contributors. +# ------------------------------------------------------------------------------ +set -e + +REPODIR="$(realpath $(dirname $0)/..)" + +for OPTIMIZE in 0 1; do + for EVM in homestead byzantium constantinople petersburg; do + EVM=$EVM OPTIMIZE=$OPTIMIZE ${REPODIR}/.circleci/soltest.sh + done +done + +EVM=constantinople OPTIMIZE=1 ABI_ENCODER_V2=1 ${REPODIR}/.circleci/soltest.sh \ No newline at end of file