diff options
-rw-r--r-- | circle.yml | 48 | ||||
-rwxr-xr-x | scripts/build_emscripten.sh | 2 | ||||
-rwxr-xr-x | scripts/travis-emscripten/build_emscripten.sh | 16 | ||||
-rwxr-xr-x | scripts/travis-emscripten/install_deps.sh | 6 |
4 files changed, 56 insertions, 16 deletions
@@ -1,10 +1,50 @@ version: 2 jobs: build: - branches: - ignore: - - /.*/ docker: - - image: trzeci/emscripten:sdk-tag-1.37.18-64bit + - image: trzeci/emscripten:sdk-tag-1.37.21-64bit steps: - checkout + - run: + name: Install external tests deps + command: | + apt-get -qq update + apt-get -qy install netcat curl + curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.4/install.sh | NVM_DIR=/usr/local/nvm bash + - run: + name: Test external tests deps + command: | + export NVM_DIR="/usr/local/nvm" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm + nvm --version + nvm install 6 + node --version + npm --version + - run: + name: Init submodules + command: | + git submodule update --init + - restore_cache: + name: Restore Boost build + key: &boost-cache-key emscripten-boost-{{ checksum "scripts/travis-emscripten/install_deps.sh" }}{{ checksum "scripts/travis-emscripten/build_emscripten.sh" }} + - run: + name: Bootstrap Boost + command: | + scripts/travis-emscripten/install_deps.sh + - run: + name: Build + command: | + scripts/travis-emscripten/build_emscripten.sh + - save_cache: + name: Save Boost build + key: *boost-cache-key + paths: + - boost_1_57_0 + - run: + name: Test + command: | + . /usr/local/nvm/nvm.sh + scripts/test_emscripten.sh + - store_artifacts: + path: build/solc/soljson.js + destination: soljson.js diff --git a/scripts/build_emscripten.sh b/scripts/build_emscripten.sh index 6046978e..cddcd4f8 100755 --- a/scripts/build_emscripten.sh +++ b/scripts/build_emscripten.sh @@ -30,5 +30,5 @@ set -e if [[ "$OSTYPE" != "darwin"* ]]; then ./scripts/travis-emscripten/install_deps.sh - docker run -v $(pwd):/src trzeci/emscripten:sdk-tag-1.35.4-64bit ./scripts/travis-emscripten/build_emscripten.sh + docker run -v $(pwd):/root/project -w /root/project trzeci/emscripten:sdk-tag-1.35.4-64bit ./scripts/travis-emscripten/build_emscripten.sh fi diff --git a/scripts/travis-emscripten/build_emscripten.sh b/scripts/travis-emscripten/build_emscripten.sh index 5259dc7f..bf460e8e 100755 --- a/scripts/travis-emscripten/build_emscripten.sh +++ b/scripts/travis-emscripten/build_emscripten.sh @@ -34,11 +34,13 @@ set -ev -# We need git for extracting the commit hash -apt-get update -apt-get -y install git-core +if ! type git &>/dev/null; then + # We need git for extracting the commit hash + apt-get update + apt-get -y install git-core +fi -export WORKSPACE=/src +WORKSPACE=/root/project # Boost echo -en 'travis_fold:start:compiling_boost\\r' @@ -46,9 +48,9 @@ cd "$WORKSPACE"/boost_1_57_0 # if b2 exists, it is a fresh checkout, otherwise it comes from the cache # and is already compiled test -e b2 && ( -sed -i 's|using gcc ;|using gcc : : /usr/local/bin/em++ ;|g' ./project-config.jam -sed -i 's|$(archiver\[1\])|/usr/local/bin/emar|g' ./tools/build/src/tools/gcc.jam -sed -i 's|$(ranlib\[1\])|/usr/local/bin/emranlib|g' ./tools/build/src/tools/gcc.jam +sed -i 's|using gcc ;|using gcc : : em++ ;|g' ./project-config.jam +sed -i 's|$(archiver\[1\])|emar|g' ./tools/build/src/tools/gcc.jam +sed -i 's|$(ranlib\[1\])|emranlib|g' ./tools/build/src/tools/gcc.jam ./b2 link=static variant=release threading=single runtime-link=static \ system regex filesystem unit_test_framework program_options find . -name 'libboost*.a' -exec cp {} . \; diff --git a/scripts/travis-emscripten/install_deps.sh b/scripts/travis-emscripten/install_deps.sh index 252c74b0..45c16a9f 100755 --- a/scripts/travis-emscripten/install_deps.sh +++ b/scripts/travis-emscripten/install_deps.sh @@ -31,10 +31,8 @@ set -ev echo -en 'travis_fold:start:installing_dependencies\\r' test -e boost_1_57_0 -a -e boost_1_57_0/boost || ( -wget 'http://downloads.sourceforge.net/project/boost/boost/'\ -'1.57.0/boost_1_57_0.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2F'\ -'projects%2Fboost%2Ffiles%2Fboost%2F1.57.0%2F&ts=1421887207'\ - -O - | tar xj +wget 'https://sourceforge.net/projects/boost/files/boost/1.57.0/boost_1_57_0.tar.gz/download'\ + -O - | tar xz cd boost_1_57_0 ./bootstrap.sh --with-toolset=gcc --with-libraries=thread,system,regex,date_time,chrono,filesystem,program_options,random ) |