From 8a801879d13060432ad44822ebc0b3ca9ae722a6 Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 2 Aug 2016 00:31:08 +0200 Subject: [PATCH 1/6] Parallel builds for emscripten and docs. --- .travis.yml | 27 +++++++++++++------ scripts/travis-emscripten/build_emscripten.sh | 6 ++--- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1ee16333b..b581f520d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,17 @@ branches: - /develop-v[0-9]/ matrix: include: + - os: linux + dist: trusty + compiler: gcc + env: + - TRAVIS_BUILD_TYPE=RelWithDebInfo + - ZIP_SUFFIX=ubuntu-trusty + - os: linux + dist: trusty + compiler: gcc + env: + - JOB=docs - os: linux dist: trusty sudo: required @@ -43,8 +54,7 @@ matrix: before_install: - docker pull trzeci/emscripten:sdk-tag-1.35.4-64bit env: - - TRAVIS_BUILD_TYPE=RelWithDebInfo - - ZIP_SUFFIX=ubuntu-trusty + - JOB=emscripten - os: osx osx_image: beta-xcode6.2 env: @@ -71,19 +81,18 @@ cache: - cryptopp - boost_1_57_0 - build - - build-emscripten - jsoncpp install: - ./scripts/install_deps.sh before_script: - - ./scripts/build_emscripten.sh - - mkdir -p build + - test $JOB != emscripten || ./scripts/build_emscripten.sh + - test $JOB != default || (mkdir -p build && cd build && cmake .. -DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE && make -j2 && cd .. - && ./scripts/release.sh $ZIP_SUFFIX + && ./scripts/release.sh $ZIP_SUFFIX ) script: # There are a variety of reliability issues with the Solidity unit-tests at the time of # writing (especially on macOS), so within TravisCI we will try to run the unit-tests @@ -95,10 +104,12 @@ script: # itself is broken from the failure messages which we are seeing. # # More details on known issues at https://github.com/ethereum/solidity/issues/769 - - cd $TRAVIS_BUILD_DIR && (./scripts/tests.sh || ./scripts/tests.sh || ./scripts/tests.sh) + - test $JOB != default || (cd $TRAVIS_BUILD_DIR && (./scripts/tests.sh || ./scripts/tests.sh || ./scripts/tests.sh) ) + - test $JOB != docs || ./scripts/docs.sh env: global: - ENCRYPTION_LABEL="296c219a3f41" + - JOB=default # This is the deploy target for the Emscripten build. # It publishes the JS file which was compiled as part of the earlier 'build_emscripten.sh' @@ -109,7 +120,7 @@ env: deploy: provider: script - script: scripts/release_emscripten.sh + script: test $JOB != emscripten || scripts/release_emscripten.sh skip_cleanup: true on: branch: develop diff --git a/scripts/travis-emscripten/build_emscripten.sh b/scripts/travis-emscripten/build_emscripten.sh index abdf401fe..6d244a0f0 100755 --- a/scripts/travis-emscripten/build_emscripten.sh +++ b/scripts/travis-emscripten/build_emscripten.sh @@ -85,8 +85,8 @@ echo -en 'travis_fold:end:compiling_boost\\r' # Build dependent components and solidity itself echo -en 'travis_fold:start:compiling_solidity\\r' cd $WORKSPACE -mkdir -p build-emscripten -cd build-emscripten +mkdir -p build +cd build emcmake cmake \ -DCMAKE_BUILD_TYPE=Release \ -DEMSCRIPTEN=1 \ @@ -125,6 +125,6 @@ emcmake cmake \ emmake make -j 4 cd .. -cp build-emscripten/solc/soljson.js ./ +cp build/solc/soljson.js ./ echo -en 'travis_fold:end:compiling_solidity\\r' From 7ae2cb872a2ba840271d9d8be714338faefc12a0 Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 2 Aug 2016 00:37:34 +0200 Subject: [PATCH 2/6] Show ubuntu version in error. --- scripts/install_deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh index f15851789..865242c66 100755 --- a/scripts/install_deps.sh +++ b/scripts/install_deps.sh @@ -298,7 +298,7 @@ case $(uname -s) in ;; *) #other Ubuntu - echo "ERROR - Unknown or unsupported Ubuntu version." + echo "ERROR - Unknown or unsupported Ubuntu version (" $(lsb_release -cs) ")" echo "We only support Trusty, Utopic, Vivid, Wily and Xenial, with work-in-progress on Yakkety." exit 1 ;; From e715251cb274146dfe3790e865ef116ad495b47d Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 2 Aug 2016 00:40:26 +0200 Subject: [PATCH 3/6] Only install deps for default job. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b581f520d..ad1c3f779 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,12 +36,14 @@ matrix: include: - os: linux dist: trusty + sudo: required compiler: gcc env: - TRAVIS_BUILD_TYPE=RelWithDebInfo - ZIP_SUFFIX=ubuntu-trusty - os: linux dist: trusty + sudo: required compiler: gcc env: - JOB=docs @@ -84,7 +86,7 @@ cache: - jsoncpp install: - - ./scripts/install_deps.sh + - test $JOB != default || ./scripts/install_deps.sh before_script: - test $JOB != emscripten || ./scripts/build_emscripten.sh - test $JOB != default || (mkdir -p build From 5a4d57a28f5f7bbc049afdd6259da896252c2053 Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 2 Aug 2016 11:17:11 +0200 Subject: [PATCH 4/6] Make docs script executable. --- scripts/docs.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/docs.sh diff --git a/scripts/docs.sh b/scripts/docs.sh old mode 100644 new mode 100755 From 7da7c3208f2a718e090851dc89d5b27d29ac0078 Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 2 Aug 2016 11:35:08 +0200 Subject: [PATCH 5/6] Do not explicitly specify emscripten compiler. --- scripts/travis-emscripten/build_emscripten.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/travis-emscripten/build_emscripten.sh b/scripts/travis-emscripten/build_emscripten.sh index 6d244a0f0..2b5e409fc 100755 --- a/scripts/travis-emscripten/build_emscripten.sh +++ b/scripts/travis-emscripten/build_emscripten.sh @@ -90,8 +90,6 @@ cd build emcmake cmake \ -DCMAKE_BUILD_TYPE=Release \ -DEMSCRIPTEN=1 \ - -DCMAKE_CXX_COMPILER=em++ \ - -DCMAKE_C_COMPILER=emcc \ -DBoost_FOUND=1 \ -DBoost_USE_STATIC_LIBS=1 \ -DBoost_USE_STATIC_RUNTIME=1 \ @@ -120,7 +118,7 @@ emcmake cmake \ -DCRYPTOPP_INCLUDE_DIR="$WORKSPACE"/cryptopp/src/ \ -DDev_DEVCORE_LIBRARY="$WORKSPACE"/solidity/build/libdevcore/libdevcore.a \ -DEth_EVMASM_LIBRARY="$WORKSPACE"/solidity/build/libevmasm/libevmasm.a \ - -DETHASHCL=0 -DEVMJIT=0 -DETH_STATIC=1 -DSOLIDITY=1 -DFATDB=0 -DTESTS=0 -DTOOLS=0 \ + -DETH_STATIC=1 -DTESTS=0 \ .. emmake make -j 4 From 7120c6ba602f34400bfd3a67153b6d927ac7af9b Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 2 Aug 2016 12:03:06 +0200 Subject: [PATCH 6/6] Fix docs script. --- scripts/docs.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/docs.sh b/scripts/docs.sh index a674373a2..42400bc77 100755 --- a/scripts/docs.sh +++ b/scripts/docs.sh @@ -26,8 +26,7 @@ # (c) 2016 solidity contributors. #------------------------------------------------------------------------------ -if [[ "$OSTYPE" == "darwin"* ]]; then - # We aren't building docs locally for macOS at the moment -else - cd docs && sphinx-build -nW -b html -d _build/doctrees . _build/html && cd .. -fi +set -e +cd docs +sphinx-build -nW -b html -d _build/doctrees . _build/html +cd ..