Merge pull request #1683 from ethereum/travis-fix

Run every travis script in a subshell
This commit is contained in:
Alex Beregszaszi 2017-02-11 19:36:47 +00:00 committed by GitHub
commit 529224dd0e

View File

@ -25,6 +25,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
language: cpp language: cpp
branches: branches:
# We need to whitelist the branches which we want to have "push" automation, # We need to whitelist the branches which we want to have "push" automation,
# this includes tags (which are treated as branches by travis). # this includes tags (which are treated as branches by travis).
@ -79,6 +80,7 @@ matrix:
- SOLC_DOCS=On - SOLC_DOCS=On
- SOLC_RELEASE=Off - SOLC_RELEASE=Off
- SOLC_TESTS=Off - SOLC_TESTS=Off
# Docker target, which generates a statically linked alpine image # Docker target, which generates a statically linked alpine image
- os: linux - os: linux
dist: trusty dist: trusty
@ -126,7 +128,7 @@ matrix:
# env: # env:
# # Workaround for "macOS - Yosemite, El Capitan and Sierra hanging?" # # Workaround for "macOS - Yosemite, El Capitan and Sierra hanging?"
# # https://github.com/ethereum/solidity/issues/894 # # https://github.com/ethereum/solidity/issues/894
# - TRAVIS_TESTS=Off # - SOLC_TESTS=Off
# - ZIP_SUFFIX=osx-yosemite # - ZIP_SUFFIX=osx-yosemite
# OS X El Capitan (10.11) # OS X El Capitan (10.11)
@ -137,10 +139,10 @@ matrix:
# env: # env:
# # The use of Debug config here ONLY for El Capitan is a workaround for "The Heisenbug" # # The use of Debug config here ONLY for El Capitan is a workaround for "The Heisenbug"
# # See https://github.com/ethereum/webthree-umbrella/issues/565 # # See https://github.com/ethereum/webthree-umbrella/issues/565
# - TRAVIS_BUILD_TYPE=Debug # - SOLC_BUILD_TYPE=Debug
# # Workaround for "macOS - Yosemite, El Capitan and Sierra hanging?" # # Workaround for "macOS - Yosemite, El Capitan and Sierra hanging?"
# # https://github.com/ethereum/solidity/issues/894 # # https://github.com/ethereum/solidity/issues/894
# - TRAVIS_TESTS=Off # - SOLC_TESTS=Off
# - ZIP_SUFFIX=osx-elcapitan # - ZIP_SUFFIX=osx-elcapitan
# macOS Sierra (10.12) # macOS Sierra (10.12)
@ -151,10 +153,10 @@ matrix:
# env: # env:
# # Look like "The Heisenbug" is occurring here too, so we'll do the same workaround. # # Look like "The Heisenbug" is occurring here too, so we'll do the same workaround.
# # See https://travis-ci.org/ethereum/solidity/jobs/150240930 # # See https://travis-ci.org/ethereum/solidity/jobs/150240930
# - TRAVIS_BUILD_TYPE=Debug # - SOLC_BUILD_TYPE=Debug
# # Workaround for "macOS - Yosemite, El Capitan and Sierra hanging?" # # Workaround for "macOS - Yosemite, El Capitan and Sierra hanging?"
# # https://github.com/ethereum/solidity/issues/894 # # https://github.com/ethereum/solidity/issues/894
# - TRAVIS_TESTS=Off # - SOLC_TESTS=Off
# - ZIP_SUFFIX=macos-sierra # - ZIP_SUFFIX=macos-sierra
git: git:
@ -168,18 +170,20 @@ cache:
- $HOME/.local - $HOME/.local
install: install:
- test $SOLC_INSTALL_DEPS_TRAVIS != On || ./scripts/install_deps.sh - test $SOLC_INSTALL_DEPS_TRAVIS != On || (scripts/install_deps.sh)
- test "$TRAVIS_OS_NAME" != "linux" || ./scripts/install_cmake.sh - test "$TRAVIS_OS_NAME" != "linux" || (scripts/install_cmake.sh)
- echo -n "$TRAVIS_COMMIT" > commit_hash.txt - echo -n "$TRAVIS_COMMIT" > commit_hash.txt
- test $SOLC_DOCKER != On || docker build -t ethereum/solc:build -f ./scripts/Dockerfile . - test $SOLC_DOCKER != On || (docker build -t ethereum/solc:build -f scripts/Dockerfile .)
before_script: before_script:
- test $SOLC_EMSCRIPTEN != On || ./scripts/build_emscripten.sh - test $SOLC_EMSCRIPTEN != On || (scripts/build_emscripten.sh)
- test $SOLC_RELEASE != On || (./scripts/build.sh $SOLC_BUILD_TYPE - test $SOLC_RELEASE != On || (scripts/build.sh $SOLC_BUILD_TYPE
&& ./scripts/release.sh $ZIP_SUFFIX && scripts/release.sh $ZIP_SUFFIX
&& ./scripts/create_source_tarball.sh ) && scripts/create_source_tarball.sh)
script: script:
- test $SOLC_DOCS != On || ./scripts/docs.sh - test $SOLC_DOCS != On || (scripts/docs.sh)
- test $SOLC_TESTS != On || (cd $TRAVIS_BUILD_DIR && ./scripts/tests.sh ) - test $SOLC_TESTS != On || (cd $TRAVIS_BUILD_DIR && scripts/tests.sh)
deploy: deploy:
# This is the deploy target for the Emscripten build. # This is the deploy target for the Emscripten build.
@ -190,7 +194,7 @@ deploy:
# scripts because TravisCI doesn't provide much in the way of conditional logic. # scripts because TravisCI doesn't provide much in the way of conditional logic.
- provider: script - provider: script
script: test $SOLC_EMSCRIPTEN == On || scripts/release_emscripten.sh script: test $SOLC_EMSCRIPTEN == On || (scripts/release_emscripten.sh)
skip_cleanup: true skip_cleanup: true
on: on:
branch: branch:
@ -200,7 +204,7 @@ deploy:
# as a nightly and appended the commit of the branch it was pushed in. If we are pushing to master it will # as a nightly and appended the commit of the branch it was pushed in. If we are pushing to master it will
# be tagged as "stable" and given the version tag as well. # be tagged as "stable" and given the version tag as well.
- provider: script - provider: script
script: test $SOLC_DOCKER != On || ./scripts/docker_deploy.sh script: test $SOLC_DOCKER != On || (scripts/docker_deploy.sh)
skip_cleanup: true skip_cleanup: true
on: on:
branch: branch:
@ -223,4 +227,4 @@ deploy:
on: on:
all_branches: true all_branches: true
tags: true tags: true
condition: $SOLC_RELEASE == On condition: $SOLC_RELEASE == On