File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 - LD_LIBRARY_PATH=/tmp/protobuf-${PROTOBUF_VERSION}/lib:/tmp/openssl-${OPENSSL_VERSION}/lib
1212
1313before_install :
14+ # Work around https://github.com/travis-ci/travis-ci/issues/2317
15+ - if \[ "$TRAVIS_OS_NAME" = linux \]; then jdk_switcher use oraclejdk8; fi
16+ - if \[ "$TRAVIS_OS_NAME" = osx \]; then brew update; fi
1417 - buildscripts/make_dependencies.sh # build protoc into /tmp/protobuf-${PROTOBUF_VERSION}
1518 - mkdir -p $HOME/.gradle
1619 - echo "checkstyle.ignoreFailures=false" >> $HOME/.gradle/gradle.properties
@@ -19,17 +22,20 @@ before_script:
1922 - test -z "$(git status --porcelain)" || (git status && echo Error Working directory is not clean. Forget to commit generated files? && false)
2023
2124after_success :
22- - ./gradlew :grpc-all:coveralls
23-
24- jdk :
25- - oraclejdk8
25+ - if \[ "$TRAVIS_OS_NAME" = linux \]; then ./gradlew :grpc-all:coveralls; fi
2626
2727os :
2828 - linux
29+ - osx
30+
31+ # This image comes with jdk8
32+ osx_image : xcode7
2933
3034notifications :
3135 email : false
3236
37+ # Caching does not work for public repositories with OS X:
38+ # https://github.com/travis-ci/travis-ci/issues/4011
3339cache :
3440 directories :
3541 - /tmp/protobuf-${PROTOBUF_VERSION}
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ mkdir -p $DOWNLOAD_DIR
1111# Can't check for presence of directory as cache auto-creates it.
1212if [ -f ${INSTALL_DIR} /bin/protoc ]; then
1313 echo " Not building protobuf. Already built"
14+ # TODO(ejona): swap to `brew install --devel protobuf` once it is up-to-date
1415else
1516 wget -O - https://github.com/google/protobuf/archive/v${PROTOBUF_VERSION} .tar.gz | tar xz -C $DOWNLOAD_DIR
1617 pushd $DOWNLOAD_DIR /protobuf-${PROTOBUF_VERSION}
@@ -26,6 +27,8 @@ INSTALL_DIR=/tmp/openssl-${OPENSSL_VERSION}
2627
2728if [ -f ${INSTALL_DIR} /lib/libssl.so ]; then
2829 echo " Not building openssl. Already built"
30+ elif [ " $( uname) " = Darwin ]; then
31+ brew install openssl
2932else
3033 wget -O - https://www.openssl.org/source/openssl-${OPENSSL_VERSION} .tar.gz | tar xz -C $DOWNLOAD_DIR
3134 pushd $DOWNLOAD_DIR /openssl-${OPENSSL_VERSION}
You can’t perform that action at this time.
0 commit comments