blob: 13b2d0181a402ad4aedc4b9126c0fd86b0c10c44 [file] [log] [blame]
Louis Ryanc42c8c42015-03-18 16:31:38 -07001sudo: false
2
Louis Ryan540b4d32015-09-04 13:26:24 -07003language: java
Louis Ryanc42c8c42015-03-18 16:31:38 -07004
5env:
6 global:
Kun Zhangbd23a8d2015-08-28 18:47:06 -07007 - PROTOBUF_VERSION=3.0.0-beta-1
Eric Andersona99e9772015-10-01 11:38:49 -07008 - OPENSSL_VERSION=1.0.2d
Kun Zhangbd23a8d2015-08-28 18:47:06 -07009 - LDFLAGS=-L/tmp/protobuf-${PROTOBUF_VERSION}/lib
10 - CXXFLAGS=-I/tmp/protobuf-${PROTOBUF_VERSION}/include
Eric Andersona99e9772015-10-01 11:38:49 -070011 - LD_LIBRARY_PATH=/tmp/protobuf-${PROTOBUF_VERSION}/lib:/tmp/openssl-${OPENSSL_VERSION}/lib
Louis Ryanc42c8c42015-03-18 16:31:38 -070012
Eric Andersona0acb9b2015-03-20 10:26:00 -070013before_install:
Eric Anderson6dc5e802015-10-15 14:52:24 -070014 # 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
Kun Zhangbd23a8d2015-08-28 18:47:06 -070017 - buildscripts/make_dependencies.sh # build protoc into /tmp/protobuf-${PROTOBUF_VERSION}
Eric Anderson26141b42015-03-21 10:59:17 -070018 - mkdir -p $HOME/.gradle
19 - echo "checkstyle.ignoreFailures=false" >> $HOME/.gradle/gradle.properties
Louis Ryanc42c8c42015-03-18 16:31:38 -070020
Eric Andersoncea8e8e2015-10-27 19:53:18 -070021install:
22 - ./gradlew assemble generateTestProto
23
Eric Anderson34571992015-05-07 17:00:44 -070024before_script:
25 - test -z "$(git status --porcelain)" || (git status && echo Error Working directory is not clean. Forget to commit generated files? && false)
26
Eric Anderson522580d2015-08-07 18:02:31 -070027after_success:
Eric Anderson6dc5e802015-10-15 14:52:24 -070028 - if \[ "$TRAVIS_OS_NAME" = linux \]; then ./gradlew :grpc-all:coveralls; fi
Louis Ryanc42c8c42015-03-18 16:31:38 -070029
30os:
31 - linux
Eric Anderson6dc5e802015-10-15 14:52:24 -070032 - osx
33
34# This image comes with jdk8
35osx_image: xcode7
Louis Ryanc42c8c42015-03-18 16:31:38 -070036
Louis Ryanc42c8c42015-03-18 16:31:38 -070037notifications:
Eric Andersona0acb9b2015-03-20 10:26:00 -070038 email: false
39
Eric Anderson6dc5e802015-10-15 14:52:24 -070040# Caching does not work for public repositories with OS X:
41# https://github.com/travis-ci/travis-ci/issues/4011
Eric Andersona0acb9b2015-03-20 10:26:00 -070042cache:
43 directories:
Kun Zhangbd23a8d2015-08-28 18:47:06 -070044 - /tmp/protobuf-${PROTOBUF_VERSION}
Eric Andersona99e9772015-10-01 11:38:49 -070045 - /tmp/openssl-${OPENSSL_VERSION}
Eric Anderson16055782015-03-20 12:03:48 -070046 - $HOME/.m2/repository/io/netty
47 - $HOME/.gradle/caches/modules-2
48 - $HOME/.gradle/wrapper
49
50before_cache:
51 - rm $HOME/.gradle/caches/modules-2/modules-2.lock
Eric Anderson3b54ffa2015-04-29 07:56:04 -070052 - find $HOME/.gradle/wrapper -not -name "*-all.zip" -and -not -name "*-bin.zip" -delete