Louis Ryan | c42c8c4 | 2015-03-18 16:31:38 -0700 | [diff] [blame] | 1 | sudo: false |
| 2 | |
Louis Ryan | 540b4d3 | 2015-09-04 13:26:24 -0700 | [diff] [blame] | 3 | language: java |
Louis Ryan | c42c8c4 | 2015-03-18 16:31:38 -0700 | [diff] [blame] | 4 | |
| 5 | env: |
| 6 | global: |
Eric Anderson | 56dca03 | 2016-02-12 08:48:41 -0800 | [diff] [blame] | 7 | - GRADLE_OPTS=-Xmx512m |
Kun Zhang | e2ed2e8 | 2016-01-27 08:26:19 -0800 | [diff] [blame] | 8 | - PROTOBUF_VERSION=3.0.0-beta-2 |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 9 | - LDFLAGS=-L/tmp/protobuf-${PROTOBUF_VERSION}/lib |
| 10 | - CXXFLAGS=-I/tmp/protobuf-${PROTOBUF_VERSION}/include |
nmittler | 1dce8df | 2016-02-16 08:47:09 -0800 | [diff] [blame] | 11 | - LD_LIBRARY_PATH=/tmp/protobuf-${PROTOBUF_VERSION}/lib |
Louis Ryan | c42c8c4 | 2015-03-18 16:31:38 -0700 | [diff] [blame] | 12 | |
Eric Anderson | a0acb9b | 2015-03-20 10:26:00 -0700 | [diff] [blame] | 13 | before_install: |
Eric Anderson | 6dc5e80 | 2015-10-15 14:52:24 -0700 | [diff] [blame] | 14 | # Work around https://github.com/travis-ci/travis-ci/issues/2317 |
| 15 | - if \[ "$TRAVIS_OS_NAME" = linux \]; then jdk_switcher use oraclejdk8; fi |
Eric Anderson | 036af15 | 2015-11-25 14:18:28 -0800 | [diff] [blame] | 16 | - if \[ "$TRAVIS_OS_NAME" = osx \]; then brew update; fi |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 17 | - buildscripts/make_dependencies.sh # build protoc into /tmp/protobuf-${PROTOBUF_VERSION} |
Eric Anderson | 26141b4 | 2015-03-21 10:59:17 -0700 | [diff] [blame] | 18 | - mkdir -p $HOME/.gradle |
| 19 | - echo "checkstyle.ignoreFailures=false" >> $HOME/.gradle/gradle.properties |
Louis Ryan | c42c8c4 | 2015-03-18 16:31:38 -0700 | [diff] [blame] | 20 | |
Eric Anderson | cea8e8e | 2015-10-27 19:53:18 -0700 | [diff] [blame] | 21 | install: |
| 22 | - ./gradlew assemble generateTestProto |
| 23 | |
Eric Anderson | 3457199 | 2015-05-07 17:00:44 -0700 | [diff] [blame] | 24 | before_script: |
| 25 | - test -z "$(git status --porcelain)" || (git status && echo Error Working directory is not clean. Forget to commit generated files? && false) |
| 26 | |
Eric Anderson | 6715f12 | 2016-02-13 14:43:38 -0800 | [diff] [blame] | 27 | script: |
| 28 | - ./gradlew check :grpc-all:jacocoTestReport |
| 29 | |
Eric Anderson | 522580d | 2015-08-07 18:02:31 -0700 | [diff] [blame] | 30 | after_success: |
Eric Anderson | 6dc5e80 | 2015-10-15 14:52:24 -0700 | [diff] [blame] | 31 | - if \[ "$TRAVIS_OS_NAME" = linux \]; then ./gradlew :grpc-all:coveralls; fi |
Eric Anderson | 6715f12 | 2016-02-13 14:43:38 -0800 | [diff] [blame] | 32 | - bash <(curl -s https://codecov.io/bash) |
Louis Ryan | c42c8c4 | 2015-03-18 16:31:38 -0700 | [diff] [blame] | 33 | |
| 34 | os: |
| 35 | - linux |
Eric Anderson | 6dc5e80 | 2015-10-15 14:52:24 -0700 | [diff] [blame] | 36 | - osx |
| 37 | |
| 38 | # This image comes with jdk8 |
| 39 | osx_image: xcode7 |
Louis Ryan | c42c8c4 | 2015-03-18 16:31:38 -0700 | [diff] [blame] | 40 | |
Louis Ryan | c42c8c4 | 2015-03-18 16:31:38 -0700 | [diff] [blame] | 41 | notifications: |
Eric Anderson | a0acb9b | 2015-03-20 10:26:00 -0700 | [diff] [blame] | 42 | email: false |
| 43 | |
Eric Anderson | 6dc5e80 | 2015-10-15 14:52:24 -0700 | [diff] [blame] | 44 | # Caching does not work for public repositories with OS X: |
| 45 | # https://github.com/travis-ci/travis-ci/issues/4011 |
Eric Anderson | a0acb9b | 2015-03-20 10:26:00 -0700 | [diff] [blame] | 46 | cache: |
| 47 | directories: |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 48 | - /tmp/protobuf-${PROTOBUF_VERSION} |
Eric Anderson | 1605578 | 2015-03-20 12:03:48 -0700 | [diff] [blame] | 49 | - $HOME/.m2/repository/io/netty |
| 50 | - $HOME/.gradle/caches/modules-2 |
| 51 | - $HOME/.gradle/wrapper |
| 52 | |
| 53 | before_cache: |
| 54 | - rm $HOME/.gradle/caches/modules-2/modules-2.lock |
Eric Anderson | 3b54ffa | 2015-04-29 07:56:04 -0700 | [diff] [blame] | 55 | - find $HOME/.gradle/wrapper -not -name "*-all.zip" -and -not -name "*-bin.zip" -delete |