diff --git a/.travis.yml b/.travis.yml index b8b2d34a263..4334f24e24b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,11 @@ env: - LD_LIBRARY_PATH=/tmp/protobuf-${PROTOBUF_VERSION}/lib:/tmp/openssl-${OPENSSL_VERSION}/lib before_install: - - buildscripts/make_dependencies.sh # build protoc into /tmp/protobuf-${PROTOBUF_VERSION} + # Work around https://github.com/travis-ci/travis-ci/issues/2317 + - if \[ "$TRAVIS_OS_NAME" = linux \]; then jdk_switcher use oraclejdk8; fi + - if \[ "$TRAVIS_OS_NAME" = osx \]; then brew update; fi + # build protoc into /tmp/protobuf-${PROTOBUF_VERSION} + - buildscripts/make_dependencies.sh - mkdir -p $HOME/.gradle - echo "checkstyle.ignoreFailures=false" >> $HOME/.gradle/gradle.properties @@ -21,11 +25,12 @@ before_script: after_success: - ./gradlew :grpc-all:coveralls -jdk: - - oraclejdk8 - os: - linux + - osx + +# This image comes with jdk8 +osx_image: xcode7 notifications: email: false diff --git a/buildscripts/make_dependencies.sh b/buildscripts/make_dependencies.sh index 90cc64e0f1e..52ce8a58ea2 100755 --- a/buildscripts/make_dependencies.sh +++ b/buildscripts/make_dependencies.sh @@ -26,6 +26,8 @@ INSTALL_DIR=/tmp/openssl-${OPENSSL_VERSION} if [ -f ${INSTALL_DIR}/lib/libssl.so ]; then echo "Not building openssl. Already built" +elif [ "$(uname)" = Darwin ]; then + brew install openssl else wget -O - https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz | tar xz -C $DOWNLOAD_DIR pushd $DOWNLOAD_DIR/openssl-${OPENSSL_VERSION}