From dc8754b5955c48d0434d60382823c795b14c473e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 12 Sep 2017 13:39:19 +0200 Subject: [PATCH 1/2] Travis CI: Do not cache build dir --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 315d29bf2..5d6ce442a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -174,7 +174,6 @@ cache: ccache: true directories: - boost_1_57_0 - - build - $HOME/.local install: From 622a2d8251b467ded5a3134349198005f44faf6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 12 Sep 2017 14:39:30 +0200 Subject: [PATCH 2/2] Travis CI: Fix Emscripten build --- scripts/test_emscripten.sh | 39 +++++++++++++++++++------------------- test/externalTests.sh | 5 ++--- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/scripts/test_emscripten.sh b/scripts/test_emscripten.sh index f1d44a1fa..b01b33bb7 100755 --- a/scripts/test_emscripten.sh +++ b/scripts/test_emscripten.sh @@ -29,28 +29,29 @@ set -e REPO_ROOT=$(cd $(dirname "$0")/.. && pwd) +SOLJSON="$REPO_ROOT/build/solc/soljson.js" -cd $REPO_ROOT/build +DIR=$(mktemp -d) +( + echo "Preparing solc-js..." + git clone --depth 1 https://github.com/ethereum/solc-js "$DIR" + cd "$DIR" + npm install -echo "Preparing solc-js..." -rm -rf solc-js -git clone https://github.com/ethereum/solc-js -cd solc-js -npm install + # Replace soljson with current build + echo "Replacing soljson.js" + rm -f soljson.js + cp "$SOLJSON" soljson.js -# Replace soljson with current build -echo "Replacing soljson.js" -rm -f soljson.js -# Make a copy because paths might not be absolute -cp ../solc/soljson.js soljson.js + # Update version (needed for some tests) + VERSION=$("$REPO_ROOT/scripts/get_version.sh") + echo "Updating package.json to version $VERSION" + npm version --no-git-tag-version $VERSION -# Update version (needed for some tests) -VERSION=$(../../scripts/get_version.sh) -echo "Updating package.json to version $VERSION" -npm version $VERSION - -echo "Running solc-js tests..." -npm run test + echo "Running solc-js tests..." + npm run test +) +rm -rf "$DIR" echo "Running external tests...." -"$REPO_ROOT"/test/externalTests.sh "$REPO_ROOT"/build/solc/soljson.js +"$REPO_ROOT/test/externalTests.sh" "$SOLJSON" diff --git a/test/externalTests.sh b/test/externalTests.sh index 1b74561b7..6ff2ebc5b 100755 --- a/test/externalTests.sh +++ b/test/externalTests.sh @@ -38,10 +38,9 @@ SOLJSON="$1" DIR=$(mktemp -d) ( - cd "$DIR" echo "Running Zeppelin tests..." - git clone https://github.com/OpenZeppelin/zeppelin-solidity.git - cd zeppelin-solidity + git clone --depth 1 https://github.com/OpenZeppelin/zeppelin-solidity.git "$DIR" + cd "$DIR" npm install cp "$SOLJSON" ./node_modules/solc/soljson.js npm run test