blob: d29b5ef4a8caa68e126a65a607157725a552c321 [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:
Eric Anderson56dca032016-02-12 08:48:41 -08007 - GRADLE_OPTS=-Xmx512m
Eric Anderson80f73a42016-04-27 15:23:35 -07008 - LDFLAGS=-L/tmp/protobuf/lib
9 - CXXFLAGS=-I/tmp/protobuf/include
10 - LD_LIBRARY_PATH=/tmp/protobuf/lib
Louis Ryanc42c8c42015-03-18 16:31:38 -070011
Eric Andersona0acb9b2015-03-20 10:26:00 -070012before_install:
Eric Anderson1d7a11c2016-04-29 15:07:22 -070013 - mkdir -p $HOME/.gradle/caches &&
14 ln -s /tmp/gradle-caches-modules-2 $HOME/.gradle/caches/modules-2
15 - mkdir -p $HOME/.gradle &&
16 ln -s /tmp/gradle-wrapper $HOME/.gradle/wrapper
zpencer1d80feb2018-04-27 15:59:16 -070017 - buildscripts/make_dependencies.sh # build protoc into /tmp/protobuf
Eric Anderson26141b42015-03-21 10:59:17 -070018 - mkdir -p $HOME/.gradle
19 - echo "checkstyle.ignoreFailures=false" >> $HOME/.gradle/gradle.properties
Eric Anderson3c03eb72016-07-10 11:40:12 -070020 - echo "failOnWarnings=true" >> $HOME/.gradle/gradle.properties
Eric Anderson675080b2017-02-24 14:53:23 -080021 - echo "errorProne=true" >> $HOME/.gradle/gradle.properties
Louis Ryanc42c8c42015-03-18 16:31:38 -070022
Eric Andersoncea8e8e2015-10-27 19:53:18 -070023install:
Eric Andersond7bf67e2016-06-24 18:18:06 -070024 - ./gradlew assemble generateTestProto install
25 - pushd examples && ./gradlew build && popd
26 - pushd examples && mvn verify && popd
Eric Andersoncea8e8e2015-10-27 19:53:18 -070027
Eric Anderson34571992015-05-07 17:00:44 -070028before_script:
29 - test -z "$(git status --porcelain)" || (git status && echo Error Working directory is not clean. Forget to commit generated files? && false)
30
Eric Anderson6715f122016-02-13 14:43:38 -080031script:
32 - ./gradlew check :grpc-all:jacocoTestReport
33
Eric Anderson522580d2015-08-07 18:02:31 -070034after_success:
Eric Anderson4e82e622018-03-28 17:13:39 -070035 # Upload to coveralls once, instead of for each job in the matrix
36 - if \[\[ "$TRAVIS_JOB_NUMBER" == *.1 \]\]; then ./gradlew :grpc-all:coveralls; fi
Eric Anderson6715f122016-02-13 14:43:38 -080037 - bash <(curl -s https://codecov.io/bash)
Louis Ryanc42c8c42015-03-18 16:31:38 -070038
39os:
40 - linux
Eric Anderson6dc5e802015-10-15 14:52:24 -070041
Eric Anderson4e82e622018-03-28 17:13:39 -070042jdk:
zpencer37e6f5f2018-07-19 13:35:27 -070043 # net.ltgt.errorprone supports jdk8 and jdk9, but has problems with jdk10
44 # For jdk10, we need to switch over to using net.ltgt.errorprone-javacplugin,
45 # and likely update to the latest com.google.errorprone:error_prone_core.
46 # We have decided not to make our build.gradle support both plugins, so when
47 # we finally move off of jdk8 and jdk9 we will need use the javac annotation
48 # processor based plugin.
49 - oraclejdk8 # if both jdk 8 and 9 are removed, migrate to net.ltgt.errorprone-javacplugin (see above comment)
50 - oraclejdk9 # if both jdk 8 and 9 are removed, migrate to net.ltgt.errorprone-javacplugin (see above comment)
51 - oraclejdk10
Eric Anderson4e82e622018-03-28 17:13:39 -070052
Louis Ryanc42c8c42015-03-18 16:31:38 -070053notifications:
Eric Andersona0acb9b2015-03-20 10:26:00 -070054 email: false
55
56cache:
57 directories:
Eric Anderson1887b932018-07-09 10:13:02 -070058 - /tmp/protobuf-*
Eric Anderson1d7a11c2016-04-29 15:07:22 -070059 - /tmp/gradle-caches-modules-2
60 - /tmp/gradle-wrapper
Eric Anderson16055782015-03-20 12:03:48 -070061
62before_cache:
Eric Anderson1d7a11c2016-04-29 15:07:22 -070063 # The lock changes based on folder name; normally $HOME/.gradle/caches/modules-2/modules-2.lock
64 - rm /tmp/gradle-caches-modules-2/gradle-caches-modules-2.lock
Eric Anderson3b54ffa2015-04-29 07:56:04 -070065 - find $HOME/.gradle/wrapper -not -name "*-all.zip" -and -not -name "*-bin.zip" -delete