2015-09-05 04:26:24 +08:00
|
|
|
language: java
|
2015-03-19 07:31:38 +08:00
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
2016-02-13 00:48:41 +08:00
|
|
|
- GRADLE_OPTS=-Xmx512m
|
2016-04-28 06:23:35 +08:00
|
|
|
- LDFLAGS=-L/tmp/protobuf/lib
|
|
|
|
- CXXFLAGS=-I/tmp/protobuf/include
|
|
|
|
- LD_LIBRARY_PATH=/tmp/protobuf/lib
|
2015-03-19 07:31:38 +08:00
|
|
|
|
2015-03-21 01:26:00 +08:00
|
|
|
before_install:
|
2018-08-18 08:03:50 +08:00
|
|
|
- rm ~/.m2/settings.xml || true # Avoid repository.apache.org, which has QPS limits and is useless
|
2016-04-30 06:07:22 +08:00
|
|
|
- mkdir -p $HOME/.gradle/caches &&
|
|
|
|
ln -s /tmp/gradle-caches-modules-2 $HOME/.gradle/caches/modules-2
|
|
|
|
- mkdir -p $HOME/.gradle &&
|
|
|
|
ln -s /tmp/gradle-wrapper $HOME/.gradle/wrapper
|
2018-04-28 06:59:16 +08:00
|
|
|
- buildscripts/make_dependencies.sh # build protoc into /tmp/protobuf
|
2015-03-22 01:59:17 +08:00
|
|
|
- mkdir -p $HOME/.gradle
|
|
|
|
- echo "checkstyle.ignoreFailures=false" >> $HOME/.gradle/gradle.properties
|
2016-07-11 02:40:12 +08:00
|
|
|
- echo "failOnWarnings=true" >> $HOME/.gradle/gradle.properties
|
2017-02-25 06:53:23 +08:00
|
|
|
- echo "errorProne=true" >> $HOME/.gradle/gradle.properties
|
2015-03-19 07:31:38 +08:00
|
|
|
|
2015-10-28 10:53:18 +08:00
|
|
|
install:
|
2018-10-25 05:25:22 +08:00
|
|
|
- ./gradlew assemble syncGeneratedSources publishToMavenLocal
|
2016-06-25 09:18:06 +08:00
|
|
|
- pushd examples && ./gradlew build && popd
|
|
|
|
- pushd examples && mvn verify && popd
|
2018-12-12 08:23:28 +08:00
|
|
|
- pushd examples/example-alts && ../gradlew build && popd
|
2018-12-07 04:03:25 +08:00
|
|
|
- pushd examples/example-tls && ../gradlew clean build && popd
|
2018-12-12 08:23:28 +08:00
|
|
|
- pushd examples/example-kotlin && ../gradlew build && popd
|
2015-10-28 10:53:18 +08:00
|
|
|
|
2015-05-08 08:00:44 +08:00
|
|
|
before_script:
|
|
|
|
- test -z "$(git status --porcelain)" || (git status && echo Error Working directory is not clean. Forget to commit generated files? && false)
|
|
|
|
|
2016-02-14 06:43:38 +08:00
|
|
|
script:
|
|
|
|
- ./gradlew check :grpc-all:jacocoTestReport
|
|
|
|
|
2015-08-08 09:02:31 +08:00
|
|
|
after_success:
|
2018-03-29 08:13:39 +08:00
|
|
|
# Upload to coveralls once, instead of for each job in the matrix
|
2018-07-31 03:44:35 +08:00
|
|
|
- if [[ "$TRAVIS_JOB_NUMBER" == *.1 ]]; then ./gradlew :grpc-all:coveralls; fi
|
2016-02-14 06:43:38 +08:00
|
|
|
- bash <(curl -s https://codecov.io/bash)
|
2015-03-19 07:31:38 +08:00
|
|
|
|
|
|
|
os:
|
|
|
|
- linux
|
2015-10-16 05:52:24 +08:00
|
|
|
|
2018-03-29 08:13:39 +08:00
|
|
|
jdk:
|
2018-12-14 02:17:06 +08:00
|
|
|
- oraclejdk8
|
2018-10-18 02:49:30 +08:00
|
|
|
- openjdk11
|
2018-03-29 08:13:39 +08:00
|
|
|
|
2015-03-19 07:31:38 +08:00
|
|
|
notifications:
|
2015-03-21 01:26:00 +08:00
|
|
|
email: false
|
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
2018-07-31 07:31:12 +08:00
|
|
|
- /tmp/protobuf-cache
|
2016-04-30 06:07:22 +08:00
|
|
|
- /tmp/gradle-caches-modules-2
|
|
|
|
- /tmp/gradle-wrapper
|
2015-03-21 03:03:48 +08:00
|
|
|
|
|
|
|
before_cache:
|
2016-04-30 06:07:22 +08:00
|
|
|
# The lock changes based on folder name; normally $HOME/.gradle/caches/modules-2/modules-2.lock
|
|
|
|
- rm /tmp/gradle-caches-modules-2/gradle-caches-modules-2.lock
|
2015-04-29 22:56:04 +08:00
|
|
|
- find $HOME/.gradle/wrapper -not -name "*-all.zip" -and -not -name "*-bin.zip" -delete
|