mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #2905 from ethereum/circleci
Emscripten build on Circle CI
This commit is contained in:
commit
c289fd3d9e
48
circle.yml
48
circle.yml
@ -1,10 +1,50 @@
|
|||||||
version: 2
|
version: 2
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
branches:
|
|
||||||
ignore:
|
|
||||||
- /.*/
|
|
||||||
docker:
|
docker:
|
||||||
- image: trzeci/emscripten:sdk-tag-1.37.18-64bit
|
- image: trzeci/emscripten:sdk-tag-1.37.21-64bit
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- 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
|
||||||
|
@ -30,5 +30,5 @@ set -e
|
|||||||
|
|
||||||
if [[ "$OSTYPE" != "darwin"* ]]; then
|
if [[ "$OSTYPE" != "darwin"* ]]; then
|
||||||
./scripts/travis-emscripten/install_deps.sh
|
./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
|
fi
|
||||||
|
@ -34,11 +34,13 @@
|
|||||||
|
|
||||||
set -ev
|
set -ev
|
||||||
|
|
||||||
|
if ! type git &>/dev/null; then
|
||||||
# We need git for extracting the commit hash
|
# We need git for extracting the commit hash
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get -y install git-core
|
apt-get -y install git-core
|
||||||
|
fi
|
||||||
|
|
||||||
export WORKSPACE=/src
|
WORKSPACE=/root/project
|
||||||
|
|
||||||
# Boost
|
# Boost
|
||||||
echo -en 'travis_fold:start:compiling_boost\\r'
|
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
|
# if b2 exists, it is a fresh checkout, otherwise it comes from the cache
|
||||||
# and is already compiled
|
# and is already compiled
|
||||||
test -e b2 && (
|
test -e b2 && (
|
||||||
sed -i 's|using gcc ;|using gcc : : /usr/local/bin/em++ ;|g' ./project-config.jam
|
sed -i 's|using gcc ;|using gcc : : em++ ;|g' ./project-config.jam
|
||||||
sed -i 's|$(archiver\[1\])|/usr/local/bin/emar|g' ./tools/build/src/tools/gcc.jam
|
sed -i 's|$(archiver\[1\])|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|$(ranlib\[1\])|emranlib|g' ./tools/build/src/tools/gcc.jam
|
||||||
./b2 link=static variant=release threading=single runtime-link=static \
|
./b2 link=static variant=release threading=single runtime-link=static \
|
||||||
system regex filesystem unit_test_framework program_options
|
system regex filesystem unit_test_framework program_options
|
||||||
find . -name 'libboost*.a' -exec cp {} . \;
|
find . -name 'libboost*.a' -exec cp {} . \;
|
||||||
|
@ -31,10 +31,8 @@ set -ev
|
|||||||
|
|
||||||
echo -en 'travis_fold:start:installing_dependencies\\r'
|
echo -en 'travis_fold:start:installing_dependencies\\r'
|
||||||
test -e boost_1_57_0 -a -e boost_1_57_0/boost || (
|
test -e boost_1_57_0 -a -e boost_1_57_0/boost || (
|
||||||
wget 'http://downloads.sourceforge.net/project/boost/boost/'\
|
wget 'https://sourceforge.net/projects/boost/files/boost/1.57.0/boost_1_57_0.tar.gz/download'\
|
||||||
'1.57.0/boost_1_57_0.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2F'\
|
-O - | tar xz
|
||||||
'projects%2Fboost%2Ffiles%2Fboost%2F1.57.0%2F&ts=1421887207'\
|
|
||||||
-O - | tar xj
|
|
||||||
cd boost_1_57_0
|
cd boost_1_57_0
|
||||||
./bootstrap.sh --with-toolset=gcc --with-libraries=thread,system,regex,date_time,chrono,filesystem,program_options,random
|
./bootstrap.sh --with-toolset=gcc --with-libraries=thread,system,regex,date_time,chrono,filesystem,program_options,random
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user