diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..74fb495f94 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,27 @@ +sudo: false + +language: java + +env: + global: + - CXXFLAGS="--std=c++0x" + +install: + - buildscripts/make_dependencies.sh # build protoc into /tmp/grpc-deps + +before_script: + - export PATH=/tmp/grpc-deps/bin:$PATH + - export LD_LIBRARY_PATH=/tmp/grpc-deps/lib:$LD_LIBRARY_PATH + +jdk: + - oraclejdk8 + +os: + - linux + +branches: + only: + - master + +notifications: + email: false \ No newline at end of file diff --git a/buildscripts/make_dependencies.sh b/buildscripts/make_dependencies.sh new file mode 100755 index 0000000000..cf98fb7957 --- /dev/null +++ b/buildscripts/make_dependencies.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Build protoc & netty +set -ev + +# If we need GCC 4.8 for C++11 support which is not available by default with travis +# and we don't want to use sudo on travis to install it as we couldn't use dockerized travis so... +#pushd . +#cd /tmp +#mkdir gcc +#cd gcc +#apt-get download -qq gcc-4.8 g++-4.8 cpp-4.8 libgcc-4.8-dev libstdc++-4.8-dev g++-4.8-multilib gcc-4.8-multilib +#find . -name '*.deb' -exec dpkg --extract {} . \; +#export CXX="/tmp/gcc/usr/bin/g++-4.8" +#export CC="/tmp/gcc/usr/bin/gcc-4.8" +#popd + +export CXXFLAGS="--std=c++0x" +# Make protoc +pushd . +cd /tmp +wget -O - https://github.com/google/protobuf/archive/v3.0.0-alpha-2.tar.gz | tar xz +cd protobuf-3.0.0-alpha-2 +./autogen.sh +# install here so we don't need sudo +./configure --prefix=/tmp/grpc-deps +make -j2 +# make check -j2 +make install +cd java +mvn install +cd ../javanano +mvn install +popd + +# Make and install netty +git submodule update --init +pushd . +cd lib/netty +mvn install -pl codec-http2 -am -DskipTests=true +popd \ No newline at end of file diff --git a/compiler/build.gradle b/compiler/build.gradle index 1efbe83568..744cc3503e 100644 --- a/compiler/build.gradle +++ b/compiler/build.gradle @@ -25,7 +25,7 @@ dependencies { binaries.all { if (toolChain in Gcc || toolChain in Clang) { - cppCompiler.args "-std=c++11" + cppCompiler.args "--std=c++0x" if (System.env.CXXFLAGS) { cppCompiler.args System.env.CXXFLAGS }