From 82d113680c47b7916d2d8fb7c9b94d0370777c85 Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 1 Aug 2016 15:33:01 +0200 Subject: Run the tests only three times. --- .travis.yml | 10 ++-------- scripts/tests.sh | 8 ++++++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 87932e8d..b723f81c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -82,15 +82,9 @@ before_script: && ./scripts/release.sh $ZIP_SUFFIX script: # There are a variety of reliability issues with the Solidity unit-tests at the time of - # writing, so we're actually running them 5 times in a row, to try to flush all of these + # writing, so we're actually running them 3 times in a row, to try to flush all of these # issues out as quickly as possible. See https://github.com/ethereum/solidity/issues/769 - - cd $TRAVIS_BUILD_DIR && ./scripts/tests.sh - - cd $TRAVIS_BUILD_DIR && ./scripts/tests.sh - - cd $TRAVIS_BUILD_DIR && ./scripts/tests.sh - - cd $TRAVIS_BUILD_DIR && ./scripts/tests.sh - - cd $TRAVIS_BUILD_DIR && ./scripts/tests.sh -after_success: - - cd $TRAVIS_BUILD_DIR && ./scripts/docs.sh + - cd $TRAVIS_BUILD_DIR && (./scripts/tests.sh || ./scripts/tests.sh || ./scripts/tests.sh) env: global: - ENCRYPTION_LABEL="296c219a3f41" diff --git a/scripts/tests.sh b/scripts/tests.sh index c342c65f..6ee816b0 100755 --- a/scripts/tests.sh +++ b/scripts/tests.sh @@ -26,6 +26,8 @@ # (c) 2016 solidity contributors. #------------------------------------------------------------------------------ +set -e + # There is an implicit assumption here that we HAVE to run from root directory. REPO_ROOT=$(pwd) @@ -59,7 +61,9 @@ while [ ! -S /tmp/test/geth.ipc ]; do sleep 2; done # need to check if this command-line support works for Windows too, when we # have implemented IPC Sockets support at all for Windows. export ETH_TEST_IPC=/tmp/test/geth.ipc -$REPO_ROOT/build/test/soltest +"$REPO_ROOT"/build/test/soltest ERROR_CODE=$? -pkill eth +pkill eth || true +sleep 4 +pgrep eth && pkill -9 eth || true exit $ERROR_CODE -- cgit v1.2.3 From 168261254bef13ed7fc06814bee933c43c3a82ee Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 1 Aug 2016 16:49:05 +0200 Subject: Fix emscripten build. --- scripts/build_emscripten.sh | 6 ++++-- scripts/travis-emscripten/build_emscripten.sh | 5 +---- scripts/travis-emscripten/publish_binary.sh | 7 ++----- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/scripts/build_emscripten.sh b/scripts/build_emscripten.sh index 53171599..6046978e 100755 --- a/scripts/build_emscripten.sh +++ b/scripts/build_emscripten.sh @@ -26,7 +26,9 @@ # (c) 2016 solidity contributors. #------------------------------------------------------------------------------ +set -e + if [[ "$OSTYPE" != "darwin"* ]]; then - ./scripts/travis-emscripten/install_deps.sh \ - && docker run -v $(pwd):/src trzeci/emscripten:sdk-tag-1.35.4-64bit ./scripts/travis-emscripten/build_emscripten.sh + ./scripts/travis-emscripten/install_deps.sh + docker run -v $(pwd):/src trzeci/emscripten:sdk-tag-1.35.4-64bit ./scripts/travis-emscripten/build_emscripten.sh fi diff --git a/scripts/travis-emscripten/build_emscripten.sh b/scripts/travis-emscripten/build_emscripten.sh index db409455..5726b840 100755 --- a/scripts/travis-emscripten/build_emscripten.sh +++ b/scripts/travis-emscripten/build_emscripten.sh @@ -124,11 +124,8 @@ emcmake cmake \ .. emmake make -j 4 -# TODO - This is a temporary solution to the permissions issue which we are seeing in TravisCI, -# where this Emscripten build generates files which the main build then cannot delete. -# Presumably different accounts being used? This needs wrapping in some conditional, so we -# can choose to build, or build-and-clean. cd .. +cp build/solc/soljson.js ./ rm -rf build echo -en 'travis_fold:end:compiling_solidity\\r' diff --git a/scripts/travis-emscripten/publish_binary.sh b/scripts/travis-emscripten/publish_binary.sh index f4139539..a62d4b47 100755 --- a/scripts/travis-emscripten/publish_binary.sh +++ b/scripts/travis-emscripten/publish_binary.sh @@ -30,15 +30,11 @@ set -e -cd solidity VER=$(cat CMakeLists.txt | grep 'set(PROJECT_VERSION' | sed -e 's/.*set(PROJECT_VERSION "\(.*\)".*/\1/') test -n "$VER" VER="v$VER" COMMIT=$(git rev-parse --short HEAD) DATE=$(date --date="$(git log -1 --date=iso --format=%ad HEAD)" --utc +%F) -cp build/solc/soljson.js "../soljson-$VER-$DATE-$COMMIT.js" -cd .. - ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key" ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv" @@ -60,7 +56,8 @@ if ls ./bin/soljson-"$VER-$DATE"-*.js ./bin/soljson-*-"$COMMIT.js" > /dev/null then true else - cp ../soljson-*.js ./bin/ + # This file is assumed to be the product of the build_emscripten.sh script. + cp ../soljson.js ./bin/"soljson-$VER-$DATE-$COMMIT.js" ./update-index.sh cd bin LATEST=$(ls -r soljson-v* | head -n 1) -- cgit v1.2.3 From 3bbd5f5af2f1314d506aa32b34e4984751160305 Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 1 Aug 2016 16:51:23 +0200 Subject: Cache. --- .travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.travis.yml b/.travis.yml index b723f81c..18730138 100644 --- a/.travis.yml +++ b/.travis.yml @@ -70,6 +70,15 @@ matrix: - ZIP_SUFFIX=osx-elcapitan git: depth: 2 + +cache: + ccache: true + directories: + - boost_1_57_0 + - jsoncpp + - cryptopp + + install: - ./scripts/install_deps.sh before_script: -- cgit v1.2.3