diff options
author | chriseth <chris@ethereum.org> | 2018-02-14 12:00:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-14 12:00:41 +0800 |
commit | 3155dd8058672ce8f04bc2c0f2536cb549067d0a (patch) | |
tree | 7ddb56e276c74db30671eb17ffdde5eda027142d /scripts | |
parent | c4cbbb054b5ed3b8ceaa21ee5b47b0704762ff40 (diff) | |
parent | ef8292c6bb337d3c4b27836da6732b85021d1c5d (diff) | |
download | dexon-solidity-3155dd8058672ce8f04bc2c0f2536cb549067d0a.tar dexon-solidity-3155dd8058672ce8f04bc2c0f2536cb549067d0a.tar.gz dexon-solidity-3155dd8058672ce8f04bc2c0f2536cb549067d0a.tar.bz2 dexon-solidity-3155dd8058672ce8f04bc2c0f2536cb549067d0a.tar.lz dexon-solidity-3155dd8058672ce8f04bc2c0f2536cb549067d0a.tar.xz dexon-solidity-3155dd8058672ce8f04bc2c0f2536cb549067d0a.tar.zst dexon-solidity-3155dd8058672ce8f04bc2c0f2536cb549067d0a.zip |
Merge pull request #3503 from ethereum/develop
Merge develop into release for v0.4.20.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build.sh | 7 | ||||
-rwxr-xr-x | scripts/bytecodecompare/storebytecode.sh | 2 | ||||
-rwxr-xr-x | scripts/docker_deploy_manual.sh | 49 | ||||
-rwxr-xr-x | scripts/install_deps.sh | 28 | ||||
-rwxr-xr-x | scripts/release_ppa.sh | 5 | ||||
-rwxr-xr-x | scripts/test_emscripten.sh | 31 | ||||
-rwxr-xr-x | scripts/travis-emscripten/build_emscripten.sh | 13 |
7 files changed, 96 insertions, 39 deletions
diff --git a/scripts/build.sh b/scripts/build.sh index 3785e1c1..bddbb97a 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -7,6 +7,11 @@ else fi cd $(dirname "$0")/.. && + +if [[ "$(git tag --points-at HEAD 2>/dev/null)" == v* ]]; then + touch prerelease.txt +fi + mkdir -p build && cd build && cmake .. -DCMAKE_BUILD_TYPE="$BUILD_TYPE" && @@ -20,4 +25,4 @@ fi if [ -z $CI ]; then echo "Installing solc and soltest" install solc/solc /usr/local/bin && install test/soltest /usr/local/bin -fi
\ No newline at end of file +fi diff --git a/scripts/bytecodecompare/storebytecode.sh b/scripts/bytecodecompare/storebytecode.sh index 8d4100bf..557e3275 100755 --- a/scripts/bytecodecompare/storebytecode.sh +++ b/scripts/bytecodecompare/storebytecode.sh @@ -40,7 +40,7 @@ TMPDIR=$(mktemp -d) if [[ "$SOLC_EMSCRIPTEN" = "On" ]] then - cp "$REPO_ROOT/build/solc/soljson.js" . + cp "$REPO_ROOT/build/libsolc/soljson.js" . npm install solc cat > solc <<EOF #!/usr/bin/env node diff --git a/scripts/docker_deploy_manual.sh b/scripts/docker_deploy_manual.sh new file mode 100755 index 00000000..c098f4ee --- /dev/null +++ b/scripts/docker_deploy_manual.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env sh + +set -e + +if [ -z "$1" ] +then + echo "Usage: $0 <tag/branch>" + exit 1 +fi +branch="$1" + +#docker login + +DIR=$(mktemp -d) +( +cd "$DIR" + +git clone --depth 2 https://github.com/ethereum/solidity.git -b "$branch" +cd solidity +commithash=$(git rev-parse --short=8 HEAD) +echo -n "$commithash" > commit_hash.txt +version=$($(dirname "$0")/get_version.sh) +if [ "$branch" = "release" -o "$branch" = v"$version" ] +then + echo -n > prerelease.txt +else + date -u +"nightly.%Y.%-m.%-d" > prerelease.txt +fi + +rm -rf .git +docker build -t ethereum/solc:build -f scripts/Dockerfile . +tmp_container=$(docker create ethereum/solc:build sh) +if [ "$branch" = "develop" ] +then + docker tag ethereum/solc:build ethereum/solc:nightly; + docker tag ethereum/solc:build ethereum/solc:nightly-"$version"-"$commithash" + docker push ethereum/solc:nightly-"$version"-"$commithash"; + docker push ethereum/solc:nightly; +elif [ "$branch" = v"$version" ] +then + docker tag ethereum/solc:build ethereum/solc:stable; + docker tag ethereum/solc:build ethereum/solc:"$version"; + docker push ethereum/solc:stable; + docker push ethereum/solc:"$version"; +else + echo "Not publishing docker image from branch or tag $branch" +fi +) +rm -rf "$DIR" diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh index 15e864b5..d62cffb7 100755 --- a/scripts/install_deps.sh +++ b/scripts/install_deps.sh @@ -84,9 +84,12 @@ case $(uname -s) in 10.12) echo "Installing solidity dependencies on macOS 10.12 Sierra." ;; + 10.13) + echo "Installing solidity dependencies on macOS 10.13 High Sierra." + ;; *) echo "Unsupported macOS version." - echo "We only support Mavericks, Yosemite and El Capitan, with work-in-progress on Sierra." + echo "We only support Mavericks, Yosemite, El Capitan, Sierra and High Sierra." exit 1 ;; esac @@ -137,7 +140,7 @@ case $(uname -s) in # All our dependencies can be found in the Arch Linux official repositories. # See https://wiki.archlinux.org/index.php/Official_repositories # Also adding ethereum-git to allow for testing with the `eth` client - sudo pacman -Sy \ + sudo pacman -Syu \ base-devel \ boost \ cmake \ @@ -253,19 +256,20 @@ case $(uname -s) in echo "See https://github.com/ethereum/webthree-umbrella/issues/552." exit 1 ;; - #------------------------------------------------------------------------------ # Ubuntu # #------------------------------------------------------------------------------ - Ubuntu) + Ubuntu|LinuxMint) + #LinuxMint is a distro on top of Ubuntu. #Ubuntu install_z3="" case $(lsb_release -cs) in - trusty) + trusty|qiana|rebecca|rafaela|rosa) #trusty echo "Installing solidity dependencies on Ubuntu Trusty Tahr (14.04)." + echo "Or, you may also be running Linux Mint Qiana / Rebecca / Rafaela / Rosa (base: Ubuntu Trusty Tahr (14.04).)" ;; utopic) #utopic @@ -279,9 +283,10 @@ case $(uname -s) in #wily echo "Installing solidity dependencies on Ubuntu Wily Werewolf (15.10)." ;; - xenial) + xenial|sarah|serena|sonya|sylvia) #xenial echo "Installing solidity dependencies on Ubuntu Xenial Xerus (16.04)." + echo "Or, you may also be running Linux Mint Sarah / Serena / Sonya / Sylvia (base: Ubuntu Xenial Xerus (16.04).)" install_z3="libz3-dev" ;; yakkety) @@ -299,6 +304,15 @@ case $(uname -s) in echo "Installing solidity dependencies on Ubuntu Artful (17.10)." install_z3="libz3-dev" ;; + betsy) + #do not try anything for betsy. + echo "Linux Mint Betsy is not supported at the moment as it runs off of Debian." + echo "We only support Sylvia, Sonya, Serena, Sarah, Rosa, Rafaela, Rebecca, and Qiana." + echo "See http://solidity.readthedocs.io/en/latest/installing-solidity.html for manual instructions." + echo "If you would like to get your distro working, that would be fantastic." + echo "Drop us a message at https://gitter.im/ethereum/solidity-dev." + exit 1 + ;; *) #other Ubuntu echo "ERROR - Unknown or unsupported Ubuntu version (" $(lsb_release -cs) ")" @@ -345,7 +359,7 @@ case $(uname -s) in # Make Sure we have the EPEL repos sudo yum -y install epel-release # Get g++ 4.8 - sudo rpm --import http://ftp.scientificlinux.org/linux/scientific/5x/x86_64/RPM-GPG-KEYs/RPM-GPG-KEY-cern + sudo rpm --import http://linuxsoft.cern.ch/cern/slc6X/i386/RPM-GPG-KEY-cern wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo sudo yum -y install devtoolset-2-gcc devtoolset-2-gcc-c++ devtoolset-2-binutils diff --git a/scripts/release_ppa.sh b/scripts/release_ppa.sh index cb3519b0..b314d00d 100755 --- a/scripts/release_ppa.sh +++ b/scripts/release_ppa.sh @@ -54,7 +54,7 @@ keyid=703F83D0 email=builds@ethereum.org packagename=solc -for distribution in trusty vivid xenial zesty +for distribution in trusty vivid xenial zesty artful do cd /tmp/ rm -rf $distribution @@ -166,6 +166,9 @@ override_dh_auto_test: override_dh_shlibdeps: dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info + +override_dh_auto_configure: + dh_auto_configure -- -DINSTALL_LLLC=Off EOF cat <<EOF > debian/copyright Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ diff --git a/scripts/test_emscripten.sh b/scripts/test_emscripten.sh index 4996e957..1804f23a 100755 --- a/scripts/test_emscripten.sh +++ b/scripts/test_emscripten.sh @@ -29,33 +29,10 @@ set -e REPO_ROOT=$(cd $(dirname "$0")/.. && pwd) -SOLJSON="$REPO_ROOT/build/solc/soljson.js" - -DIR=$(mktemp -d) -( - echo "Preparing solc-js..." - git clone --depth 1 https://github.com/ethereum/solc-js "$DIR" - cd "$DIR" - # disable "prepublish" script which downloads the latest version - # (we will replace it anyway and it is often incorrectly cached - # on travis) - npm config set script.prepublish '' - npm install - - # Replace soljson with current build - echo "Replacing soljson.js" - rm -f soljson.js - cp "$SOLJSON" 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 - - echo "Running solc-js tests..." - npm run test -) -rm -rf "$DIR" +SOLJSON="$REPO_ROOT/build/libsolc/soljson.js" +VERSION=$("$REPO_ROOT"/scripts/get_version.sh) +echo "Running solcjs tests...." +"$REPO_ROOT/test/solcjsTests.sh" "$SOLJSON" "$VERSION" echo "Running external tests...." "$REPO_ROOT/test/externalTests.sh" "$SOLJSON" diff --git a/scripts/travis-emscripten/build_emscripten.sh b/scripts/travis-emscripten/build_emscripten.sh index bf460e8e..fd643429 100755 --- a/scripts/travis-emscripten/build_emscripten.sh +++ b/scripts/travis-emscripten/build_emscripten.sh @@ -42,6 +42,15 @@ fi WORKSPACE=/root/project +# Increase nodejs stack size +if [ -e ~/.emscripten ] +then + sed -i -e 's/NODE_JS="nodejs"/NODE_JS=["nodejs", "--stack_size=8192"]/' ~/.emscripten +else + echo 'NODE_JS=["nodejs", "--stack_size=8192"]' > ~/.emscripten +fi + + # Boost echo -en 'travis_fold:start:compiling_boost\\r' cd "$WORKSPACE"/boost_1_57_0 @@ -87,8 +96,8 @@ make -j 4 cd .. mkdir -p upload -cp build/solc/soljson.js upload/ -cp build/solc/soljson.js ./ +cp build/libsolc/soljson.js upload/ +cp build/libsolc/soljson.js ./ OUTPUT_SIZE=`ls -la soljson.js` |