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 | 86d6412 | 2018-01-05 16:40:20 -0800 | [diff] [blame] | 8 | - PROTOBUF_VERSION=3.5.1 |
Eric Anderson | 80f73a4 | 2016-04-27 15:23:35 -0700 | [diff] [blame] | 9 | - LDFLAGS=-L/tmp/protobuf/lib |
| 10 | - CXXFLAGS=-I/tmp/protobuf/include |
| 11 | - LD_LIBRARY_PATH=/tmp/protobuf/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 | 1d7a11c | 2016-04-29 15:07:22 -0700 | [diff] [blame] | 14 | - mkdir -p $HOME/.gradle/caches && |
| 15 | ln -s /tmp/gradle-caches-modules-2 $HOME/.gradle/caches/modules-2 |
| 16 | - mkdir -p $HOME/.gradle && |
| 17 | ln -s /tmp/gradle-wrapper $HOME/.gradle/wrapper |
Eric Anderson | 6dc5e80 | 2015-10-15 14:52:24 -0700 | [diff] [blame] | 18 | # Work around https://github.com/travis-ci/travis-ci/issues/2317 |
| 19 | - if \[ "$TRAVIS_OS_NAME" = linux \]; then jdk_switcher use oraclejdk8; fi |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 20 | - buildscripts/make_dependencies.sh # build protoc into /tmp/protobuf-${PROTOBUF_VERSION} |
Eric Anderson | 80f73a4 | 2016-04-27 15:23:35 -0700 | [diff] [blame] | 21 | - ln -s "/tmp/protobuf-${PROTOBUF_VERSION}/$(uname -s)-$(uname -p)" /tmp/protobuf |
Eric Anderson | 26141b4 | 2015-03-21 10:59:17 -0700 | [diff] [blame] | 22 | - mkdir -p $HOME/.gradle |
| 23 | - echo "checkstyle.ignoreFailures=false" >> $HOME/.gradle/gradle.properties |
Eric Anderson | 3c03eb7 | 2016-07-10 11:40:12 -0700 | [diff] [blame] | 24 | - echo "failOnWarnings=true" >> $HOME/.gradle/gradle.properties |
Eric Anderson | 675080b | 2017-02-24 14:53:23 -0800 | [diff] [blame] | 25 | - echo "errorProne=true" >> $HOME/.gradle/gradle.properties |
Louis Ryan | c42c8c4 | 2015-03-18 16:31:38 -0700 | [diff] [blame] | 26 | |
Eric Anderson | cea8e8e | 2015-10-27 19:53:18 -0700 | [diff] [blame] | 27 | install: |
Eric Anderson | d7bf67e | 2016-06-24 18:18:06 -0700 | [diff] [blame] | 28 | - ./gradlew assemble generateTestProto install |
| 29 | - pushd examples && ./gradlew build && popd |
| 30 | - pushd examples && mvn verify && popd |
Eric Anderson | cea8e8e | 2015-10-27 19:53:18 -0700 | [diff] [blame] | 31 | |
Eric Anderson | 3457199 | 2015-05-07 17:00:44 -0700 | [diff] [blame] | 32 | before_script: |
| 33 | - test -z "$(git status --porcelain)" || (git status && echo Error Working directory is not clean. Forget to commit generated files? && false) |
| 34 | |
Eric Anderson | 6715f12 | 2016-02-13 14:43:38 -0800 | [diff] [blame] | 35 | script: |
| 36 | - ./gradlew check :grpc-all:jacocoTestReport |
| 37 | |
Eric Anderson | 522580d | 2015-08-07 18:02:31 -0700 | [diff] [blame] | 38 | after_success: |
Eric Anderson | 6dc5e80 | 2015-10-15 14:52:24 -0700 | [diff] [blame] | 39 | - if \[ "$TRAVIS_OS_NAME" = linux \]; then ./gradlew :grpc-all:coveralls; fi |
Eric Anderson | 6715f12 | 2016-02-13 14:43:38 -0800 | [diff] [blame] | 40 | - bash <(curl -s https://codecov.io/bash) |
Louis Ryan | c42c8c4 | 2015-03-18 16:31:38 -0700 | [diff] [blame] | 41 | |
| 42 | os: |
| 43 | - linux |
Eric Anderson | 6dc5e80 | 2015-10-15 14:52:24 -0700 | [diff] [blame] | 44 | |
Louis Ryan | c42c8c4 | 2015-03-18 16:31:38 -0700 | [diff] [blame] | 45 | notifications: |
Eric Anderson | a0acb9b | 2015-03-20 10:26:00 -0700 | [diff] [blame] | 46 | email: false |
| 47 | |
| 48 | cache: |
| 49 | directories: |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 50 | - /tmp/protobuf-${PROTOBUF_VERSION} |
Eric Anderson | 1d7a11c | 2016-04-29 15:07:22 -0700 | [diff] [blame] | 51 | - /tmp/gradle-caches-modules-2 |
| 52 | - /tmp/gradle-wrapper |
Eric Anderson | 1605578 | 2015-03-20 12:03:48 -0700 | [diff] [blame] | 53 | |
| 54 | before_cache: |
Eric Anderson | 1d7a11c | 2016-04-29 15:07:22 -0700 | [diff] [blame] | 55 | # The lock changes based on folder name; normally $HOME/.gradle/caches/modules-2/modules-2.lock |
| 56 | - rm /tmp/gradle-caches-modules-2/gradle-caches-modules-2.lock |
Eric Anderson | 3b54ffa | 2015-04-29 07:56:04 -0700 | [diff] [blame] | 57 | - find $HOME/.gradle/wrapper -not -name "*-all.zip" -and -not -name "*-bin.zip" -delete |