aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml26
-rwxr-xr-xfetch_umbrella_build_and_test.sh30
-rwxr-xr-xinstall_dependencies.sh106
3 files changed, 151 insertions, 11 deletions
diff --git a/.travis.yml b/.travis.yml
index 07458841..3a4115f2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,11 +1,15 @@
-# This is used to verify that the documentation compiles.
-language: python
-python:
- - "2.7"
-# command to install dependencies
-install: "pip install -q Sphinx==1.1.3 --use-mirrors"
-# command to run tests
-script: cd docs && sphinx-build -nW -b html -d _build/doctrees . _build/html
-# Flags used here, not in `make html`:
-# -n Run in nit-picky mode. Currently, this generates warnings for all missing references.
-# -W Turn warnings into errors. This means that the build stops at the first warning and sphinx-build exits with exit status 1.
+language: cpp
+cache: ccache
+matrix:
+ include:
+ - os: linux
+ dist: trusty
+ sudo: required
+ env: TRAVIS_BUILD_TYPE=Debug
+ - os: osx
+ osx_image: xcode7.3
+ env: TRAVIS_BUILD_TYPE=Debug
+git:
+ depth: 2
+before_install: ./install_dependencies.sh
+script: ./fetch_umbrella_build_and_test.sh \ No newline at end of file
diff --git a/fetch_umbrella_build_and_test.sh b/fetch_umbrella_build_and_test.sh
new file mode 100755
index 00000000..5164bcf6
--- /dev/null
+++ b/fetch_umbrella_build_and_test.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+
+set -ev
+
+if [[ "$OSTYPE" != "darwin"* ]]
+then
+ cd docs && sphinx-build -nW -b html -d _build/doctrees . _build/html && cd ..
+fi
+
+SUBREPO=solidity
+
+cd ..
+git clone --depth 3 -b develop https://github.com/ethereum/tests.git
+export ETHEREUM_TEST_PATH=$(pwd)/tests/
+git clone --recursive -b develop https://github.com/ethereum/webthree-umbrella.git
+cd webthree-umbrella
+rm -rf $SUBREPO
+mv ../$SUBREPO .
+mkdir build
+cd build
+OPTIONS=""
+if [[ "$OSTYPE" != "darwin"* ]]
+then
+ OPTIONS="-DCMAKE_C_COMPILER=/usr/lib/ccache/$CC -DCMAKE_CXX_COMPILER=/usr/lib/ccache/$CXX"
+fi
+cmake .. -DGUI=0 -DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE $OPTIONS
+make lllc solc soljson soltest
+
+
+./solidity/test/soltest
diff --git a/install_dependencies.sh b/install_dependencies.sh
new file mode 100755
index 00000000..8f0332e0
--- /dev/null
+++ b/install_dependencies.sh
@@ -0,0 +1,106 @@
+#!/usr/bin/env bash
+
+#------------------------------------------------------------------------------
+# Bash script for installing pre-requisite packages for cpp-ethereum.
+#
+# The documentation for cpp-ethereum is hosted at:
+#
+# http://www.ethdocs.org/en/latest/ethereum-clients/cpp-ethereum/
+#
+# (c) 2016 cpp-ethereum contributors.
+#------------------------------------------------------------------------------
+
+if [[ "$OSTYPE" == "darwin"* ]]; then
+
+ if echo `sw_vers` | grep "10.11"; then
+ echo OS X El Capitan detected
+ elif echo `sw_vers` | grep "10.10"; then
+ echo OS X Yosemite detected
+ else
+ echo Unsupported OS X version. We only support Yosemite and El Capitan.
+ exit 1
+ fi
+
+ brew update
+ brew upgrade
+
+ brew install boost
+ brew install cmake
+ brew install cryptopp
+ brew install miniupnpc
+ brew install leveldb
+ brew install gmp
+ brew install jsoncpp
+ brew install libmicrohttpd
+ brew install libjson-rpc-cpp
+ brew install homebrew/versions/llvm37
+
+elif [[ "$OSTYPE" == "linux-gnu" ]]; then
+
+ # NOTE - These steps are ONLY correct for Ubuntu Trusty. We need to add
+ # further conditionals in here for the other Ubuntu versions, and carry on
+ # from there if we then want to get this pattern working for Debian,
+ # OpenSUSE, Fedora, Arch Linux, Raspian, FreeBSD, etc.
+
+ # Add additional PPAs which we need to be able to build cpp-ethereum on
+ # Ubuntu Trusty. That includes our own PPAs and a PPA for getting CMake 3.x
+ # on Trusty.
+ sudo add-apt-repository -y ppa:ethereum/ethereum
+ sudo add-apt-repository -y ppa:ethereum/ethereum-dev
+ sudo apt-add-repository -y ppa:george-edison55/cmake-3.x
+ sudo apt-get -y update
+
+ # Install binaries for nearly all of our dependencies
+ sudo apt-get -y install \
+ python-sphinx \
+ build-essential \
+ cmake \
+ git \
+ libboost-all-dev \
+ libcurl4-openssl-dev \
+ libcryptopp-dev \
+ libgmp-dev \
+ libjsoncpp-dev \
+ libleveldb-dev \
+ libmicrohttpd-dev \
+ libminiupnpc-dev \
+ libz-dev \
+ opencl-headers
+
+ # The exception is libjson-rpc-cpp, which we have to build from source for
+ # reliable results. The only binaries available for this package are those
+ # we made ourselves against the (now very old) v0.4.2 release, which are unreliable,
+ # so instead we build the latest release label (v0.6.0) from source, which works just
+ # fine. We should update our PPA.
+ #
+ # See https://github.com/ethereum/webthree-umbrella/issues/513
+ #
+ # Hmm. Arachnid is still getting this issue on OS X, which already has v0.6.0, so
+ # it isn't as simple as just updating all our builds to that version, though that is
+ # sufficient for us to get CircleCI and TravisCI working. We still haven't got to
+ # the bottom of this issue, and are going to need to debug it in some scenario where
+ # we can reproduce it 100%, which MIGHT end up being within our automation here, but
+ # against a build-from-source-with-extra-printfs() of v0.4.2.
+ sudo apt-get -y install libargtable2-dev libedit-dev
+ git clone git://github.com/cinemast/libjson-rpc-cpp.git
+ cd libjson-rpc-cpp
+ git checkout v0.6.0
+ mkdir build
+ cd build
+ cmake .. -DCOMPILE_TESTS=NO
+ make
+ sudo make install
+ sudo ldconfig
+ cd ../..
+
+ # And install the English language package and reconfigure the locales.
+ # We really shouldn't need to do this, and should instead force our locales to "C"
+ # within our application runtimes, because this issue shows up on multiple Linux distros,
+ # and each will need fixing in the install steps, where we should really just fix it once
+ # in the code.
+ #
+ # See https://github.com/ethereum/webthree-umbrella/issues/169
+ sudo apt-get -y install language-pack-en-base
+ sudo dpkg-reconfigure locales
+
+fi