diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build.sh | 28 | ||||
-rwxr-xr-x | scripts/docker_deploy_manual.sh | 6 | ||||
-rw-r--r-- | scripts/release.bat | 10 | ||||
-rwxr-xr-x | scripts/release_ppa.sh | 43 | ||||
-rwxr-xr-x | scripts/tests.sh | 23 |
5 files changed, 58 insertions, 52 deletions
diff --git a/scripts/build.sh b/scripts/build.sh index bddbb97a..6edd60bd 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,28 +1,26 @@ #!/usr/bin/env bash +set -e -if [ -z "$1" ]; then +ROOTDIR="$(dirname "$0")/.." +BUILDDIR="${ROOTDIR}/build" + +if [[ $# -eq 0 ]]; then BUILD_TYPE=Release else BUILD_TYPE="$1" fi -cd $(dirname "$0")/.. && - if [[ "$(git tag --points-at HEAD 2>/dev/null)" == v* ]]; then - touch prerelease.txt + touch "${ROOTDIR}/prerelease.txt" fi -mkdir -p build && -cd build && -cmake .. -DCMAKE_BUILD_TYPE="$BUILD_TYPE" && -make -j2 +mkdir -p "${BUILDDIR}" +cd "${BUILDDIR}" -if [ $? -ne 0 ]; then - echo "Failed to build" - exit 1 -fi +cmake .. -DCMAKE_BUILD_TYPE="$BUILD_TYPE" "${@:2}" +make -j2 -if [ -z $CI ]; then - echo "Installing solc and soltest" - install solc/solc /usr/local/bin && install test/soltest /usr/local/bin +if [[ "${CI}" == "" ]]; then + echo "Installing ..." + sudo make install fi diff --git a/scripts/docker_deploy_manual.sh b/scripts/docker_deploy_manual.sh index 0393d22d..30dd267c 100755 --- a/scripts/docker_deploy_manual.sh +++ b/scripts/docker_deploy_manual.sh @@ -37,6 +37,12 @@ tag_and_push() rm -rf .git docker build -t "$image":build -f scripts/Dockerfile . tmp_container=$(docker create "$image":build sh) + +# Alpine image +mkdir -p upload +docker cp ${tmp_container}:/usr/bin/solc upload/solc-static-linux +docker build -t "$image":build-alpine -f scripts/Dockerfile_alpine . + if [ "$branch" = "develop" ] then tag_and_push build nightly diff --git a/scripts/release.bat b/scripts/release.bat index b15b49b7..cfd0c838 100644 --- a/scripts/release.bat +++ b/scripts/release.bat @@ -29,13 +29,9 @@ REM --------------------------------------------------------------------------- set CONFIGURATION=%1 set VERSION=%2 -IF "%VERSION%"=="2015" ( - set "DLLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT\msvc*.dll" -) ELSE ( - set "DLLS=MSVC_DLLS_NOT_FOUND" - FOR /d %%d IN ("C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Redist\MSVC\*" - "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\*") DO set "DLLS=%%d\x86\Microsoft.VC141.CRT\msvc*.dll" -) +set "DLLS=MSVC_DLLS_NOT_FOUND" +FOR /d %%d IN ("C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Redist\MSVC\*" + "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\*") DO set "DLLS=%%d\x86\Microsoft.VC141.CRT\msvc*.dll" 7z a solidity-windows.zip ^ .\build\solc\%CONFIGURATION%\solc.exe .\build\test\%CONFIGURATION%\soltest.exe ^ diff --git a/scripts/release_ppa.sh b/scripts/release_ppa.sh index 36a8ef7f..4ba0e644 100755 --- a/scripts/release_ppa.sh +++ b/scripts/release_ppa.sh @@ -28,6 +28,12 @@ ## method = ftp ## incoming = ~ethereum/ethereum ## login = anonymous +## +## [ethereum-static] +## fqdn = ppa.launchpad.net +## method = ftp +## incoming = ~ethereum/ethereum-static +## login = anonymous ## ############################################################################## @@ -41,34 +47,36 @@ else branch=$1 fi -if [ "$branch" = develop ] -then - pparepo=ethereum-dev - ppafilesurl=https://launchpad.net/~ethereum/+archive/ubuntu/ethereum-dev/+files -else - pparepo=ethereum - ppafilesurl=https://launchpad.net/~ethereum/+archive/ubuntu/ethereum/+files -fi - keyid=70D110489D66E2F6 email=builds@ethereum.org packagename=solc -for distribution in trusty xenial bionic cosmic +static_build_distribution=cosmic + +for distribution in xenial bionic cosmic STATIC do cd /tmp/ rm -rf $distribution mkdir $distribution cd $distribution -# Dependency -if [ $distribution = trusty -o $distribution = vivid ] +if [ $distribution = STATIC ] then + pparepo=ethereum-static Z3DEPENDENCY="" + CMAKE_OPTIONS="-DSOLC_LINK_STATIC=On" else + if [ "$branch" = develop ] + then + pparepo=ethereum-dev + else + pparepo=ethereum + fi Z3DEPENDENCY="libz3-dev, " + CMAKE_OPTIONS="" fi +ppafilesurl=https://launchpad.net/~ethereum/+archive/ubuntu/${pparepo}/+files # Fetch source git clone --depth 2 --recursive https://github.com/ethereum/solidity.git -b "$branch" @@ -114,7 +122,7 @@ Priority: extra Maintainer: Christian (Buildserver key) <builds@ethereum.org> Build-Depends: ${Z3DEPENDENCY}debhelper (>= 9.0.0), cmake, - g++-4.8, + g++, git, libgmp-dev, libboost-all-dev, @@ -168,7 +176,7 @@ override_dh_shlibdeps: dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info override_dh_auto_configure: - dh_auto_configure -- -DINSTALL_LLLC=Off + dh_auto_configure -- -DINSTALL_LLLC=Off -DTESTS=OFF ${CMAKE_OPTIONS} EOF cat <<EOF > debian/copyright Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ @@ -224,7 +232,12 @@ EMAIL="$email" dch -v 1:${debversion}-${versionsuffix} "git build of ${commithas debuild -S -d -sa -us -uc # prepare .changes file for Launchpad -sed -i -e s/UNRELEASED/${distribution}/ -e s/urgency=medium/urgency=low/ ../*.changes +if [ $distribution = STATIC ] +then + sed -i -e s/UNRELEASED/${static_build_distribution}/ -e s/urgency=medium/urgency=low/ ../*.changes +else + sed -i -e s/UNRELEASED/${distribution}/ -e s/urgency=medium/urgency=low/ ../*.changes +fi # check if ubuntu already has the source tarball ( diff --git a/scripts/tests.sh b/scripts/tests.sh index c284c05c..8a7a2fdc 100755 --- a/scripts/tests.sh +++ b/scripts/tests.sh @@ -130,21 +130,14 @@ function download_aleth() elif [ -z $CI ]; then ALETH_PATH="aleth" else - # Any time the hash is updated here, the "Running compiler tests" section should also be updated. mkdir -p /tmp/test - if grep -i trusty /etc/lsb-release >/dev/null 2>&1 - then - # built from d661ac4fec0aeffbedcdc195f67f5ded0c798278 at 2018-06-20 - ALETH_BINARY=aleth_2018-06-20_trusty - ALETH_HASH="54b8a5455e45b295e3a962f353ff8f1580ed106c" - else - # built from d661ac4fec0aeffbedcdc195f67f5ded0c798278 at 2018-06-20 - ALETH_BINARY=aleth_2018-06-20_artful - ALETH_HASH="02e6c4b3d98299885e73f7db6c9e3fbe3d66d444" - fi - ALETH_PATH="/tmp/test/aleth" - wget -q -O $ALETH_PATH https://github.com/ethereum/cpp-ethereum/releases/download/solidityTester/$ALETH_BINARY - test "$(shasum $ALETH_PATH)" = "$ALETH_HASH $ALETH_PATH" + # Any time the hash is updated here, the "Running compiler tests" section should also be updated. + ALETH_HASH="8ce2f00539d2fd8b5f093d854c6999424f7494ff" + ALETH_VERSION=1.5.0-alpha.7 + wget -q -O /tmp/test/aleth.tar.gz https://github.com/ethereum/aleth/releases/download/v${ALETH_VERSION}/aleth-${ALETH_VERSION}-linux-x86_64.tar.gz + test "$(shasum /tmp/test/aleth.tar.gz)" = "$ALETH_HASH /tmp/test/aleth.tar.gz" + tar -xf /tmp/test/aleth.tar.gz -C /tmp/test + ALETH_PATH="/tmp/test/bin/aleth" sync chmod +x $ALETH_PATH sync # Otherwise we might get a "text file busy" error @@ -156,7 +149,7 @@ function download_aleth() # echos the PID function run_aleth() { - $ALETH_PATH --test -d "${WORKDIR}" >/dev/null 2>&1 & + $ALETH_PATH --db memorydb --test -d "${WORKDIR}" >/dev/null 2>&1 & echo $! # Wait until the IPC endpoint is available. while [ ! -S "${WORKDIR}/geth.ipc" ] ; do sleep 1; done |