Merge pull request #793 from chriseth/parbuild

Parallel builds for emscripten and docs.
This commit is contained in:
chriseth 2016-08-02 12:55:28 +02:00 committed by GitHub
commit 2e174e1d19
4 changed files with 31 additions and 21 deletions

View File

@ -34,6 +34,19 @@ branches:
- /develop-v[0-9]/ - /develop-v[0-9]/
matrix: matrix:
include: 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
- os: linux - os: linux
dist: trusty dist: trusty
sudo: required sudo: required
@ -43,8 +56,7 @@ matrix:
before_install: before_install:
- docker pull trzeci/emscripten:sdk-tag-1.35.4-64bit - docker pull trzeci/emscripten:sdk-tag-1.35.4-64bit
env: env:
- TRAVIS_BUILD_TYPE=RelWithDebInfo - JOB=emscripten
- ZIP_SUFFIX=ubuntu-trusty
- os: osx - os: osx
osx_image: beta-xcode6.2 osx_image: beta-xcode6.2
env: env:
@ -71,19 +83,18 @@ cache:
- cryptopp - cryptopp
- boost_1_57_0 - boost_1_57_0
- build - build
- build-emscripten
- jsoncpp - jsoncpp
install: install:
- ./scripts/install_deps.sh - test $JOB != default || ./scripts/install_deps.sh
before_script: before_script:
- ./scripts/build_emscripten.sh - test $JOB != emscripten || ./scripts/build_emscripten.sh
- mkdir -p build - test $JOB != default || (mkdir -p build
&& cd build && cd build
&& cmake .. -DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE && cmake .. -DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE
&& make -j2 && make -j2
&& cd .. && cd ..
&& ./scripts/release.sh $ZIP_SUFFIX && ./scripts/release.sh $ZIP_SUFFIX )
script: script:
# There are a variety of reliability issues with the Solidity unit-tests at the time of # 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 # writing (especially on macOS), so within TravisCI we will try to run the unit-tests
@ -95,10 +106,12 @@ script:
# itself is broken from the failure messages which we are seeing. # itself is broken from the failure messages which we are seeing.
# #
# More details on known issues at https://github.com/ethereum/solidity/issues/769 # 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: env:
global: global:
- ENCRYPTION_LABEL="296c219a3f41" - ENCRYPTION_LABEL="296c219a3f41"
- JOB=default
# This is the deploy target for the Emscripten build. # 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' # It publishes the JS file which was compiled as part of the earlier 'build_emscripten.sh'
@ -109,7 +122,7 @@ env:
deploy: deploy:
provider: script provider: script
script: scripts/release_emscripten.sh script: test $JOB != emscripten || scripts/release_emscripten.sh
skip_cleanup: true skip_cleanup: true
on: on:
branch: develop branch: develop

9
scripts/docs.sh Normal file → Executable file
View File

@ -26,8 +26,7 @@
# (c) 2016 solidity contributors. # (c) 2016 solidity contributors.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
if [[ "$OSTYPE" == "darwin"* ]]; then set -e
# We aren't building docs locally for macOS at the moment cd docs
else sphinx-build -nW -b html -d _build/doctrees . _build/html
cd docs && sphinx-build -nW -b html -d _build/doctrees . _build/html && cd .. cd ..
fi

View File

@ -298,7 +298,7 @@ case $(uname -s) in
;; ;;
*) *)
#other Ubuntu #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." echo "We only support Trusty, Utopic, Vivid, Wily and Xenial, with work-in-progress on Yakkety."
exit 1 exit 1
;; ;;

View File

@ -85,13 +85,11 @@ echo -en 'travis_fold:end:compiling_boost\\r'
# Build dependent components and solidity itself # Build dependent components and solidity itself
echo -en 'travis_fold:start:compiling_solidity\\r' echo -en 'travis_fold:start:compiling_solidity\\r'
cd $WORKSPACE cd $WORKSPACE
mkdir -p build-emscripten mkdir -p build
cd build-emscripten cd build
emcmake cmake \ emcmake cmake \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DEMSCRIPTEN=1 \ -DEMSCRIPTEN=1 \
-DCMAKE_CXX_COMPILER=em++ \
-DCMAKE_C_COMPILER=emcc \
-DBoost_FOUND=1 \ -DBoost_FOUND=1 \
-DBoost_USE_STATIC_LIBS=1 \ -DBoost_USE_STATIC_LIBS=1 \
-DBoost_USE_STATIC_RUNTIME=1 \ -DBoost_USE_STATIC_RUNTIME=1 \
@ -120,11 +118,11 @@ emcmake cmake \
-DCRYPTOPP_INCLUDE_DIR="$WORKSPACE"/cryptopp/src/ \ -DCRYPTOPP_INCLUDE_DIR="$WORKSPACE"/cryptopp/src/ \
-DDev_DEVCORE_LIBRARY="$WORKSPACE"/solidity/build/libdevcore/libdevcore.a \ -DDev_DEVCORE_LIBRARY="$WORKSPACE"/solidity/build/libdevcore/libdevcore.a \
-DEth_EVMASM_LIBRARY="$WORKSPACE"/solidity/build/libevmasm/libevmasm.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 emmake make -j 4
cd .. cd ..
cp build-emscripten/solc/soljson.js ./ cp build/solc/soljson.js ./
echo -en 'travis_fold:end:compiling_solidity\\r' echo -en 'travis_fold:end:compiling_solidity\\r'