Travis CI: Fix Emscripten build

This commit is contained in:
Paweł Bylica 2017-09-12 14:39:30 +02:00
parent dc8754b595
commit 622a2d8251
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
2 changed files with 22 additions and 22 deletions

View File

@ -29,28 +29,29 @@
set -e set -e
REPO_ROOT=$(cd $(dirname "$0")/.. && pwd) REPO_ROOT=$(cd $(dirname "$0")/.. && pwd)
SOLJSON="$REPO_ROOT/build/solc/soljson.js"
cd $REPO_ROOT/build DIR=$(mktemp -d)
(
echo "Preparing solc-js..." echo "Preparing solc-js..."
rm -rf solc-js git clone --depth 1 https://github.com/ethereum/solc-js "$DIR"
git clone https://github.com/ethereum/solc-js cd "$DIR"
cd solc-js
npm install npm install
# Replace soljson with current build # Replace soljson with current build
echo "Replacing soljson.js" echo "Replacing soljson.js"
rm -f soljson.js rm -f soljson.js
# Make a copy because paths might not be absolute cp "$SOLJSON" soljson.js
cp ../solc/soljson.js soljson.js
# Update version (needed for some tests) # Update version (needed for some tests)
VERSION=$(../../scripts/get_version.sh) VERSION=$("$REPO_ROOT/scripts/get_version.sh")
echo "Updating package.json to version $VERSION" echo "Updating package.json to version $VERSION"
npm version $VERSION npm version --no-git-tag-version $VERSION
echo "Running solc-js tests..." echo "Running solc-js tests..."
npm run test npm run test
)
rm -rf "$DIR"
echo "Running external tests...." echo "Running external tests...."
"$REPO_ROOT"/test/externalTests.sh "$REPO_ROOT"/build/solc/soljson.js "$REPO_ROOT/test/externalTests.sh" "$SOLJSON"

View File

@ -38,10 +38,9 @@ SOLJSON="$1"
DIR=$(mktemp -d) DIR=$(mktemp -d)
( (
cd "$DIR"
echo "Running Zeppelin tests..." echo "Running Zeppelin tests..."
git clone https://github.com/OpenZeppelin/zeppelin-solidity.git git clone --depth 1 https://github.com/OpenZeppelin/zeppelin-solidity.git "$DIR"
cd zeppelin-solidity cd "$DIR"
npm install npm install
cp "$SOLJSON" ./node_modules/solc/soljson.js cp "$SOLJSON" ./node_modules/solc/soljson.js
npm run test npm run test