blob: 52b611b7403f37438fbe0c7cb6ab0ff344b165c2 [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
Kun Zhange2ed2e82016-01-27 08:26:19 -08008 - PROTOBUF_VERSION=3.0.0-beta-2
Kun Zhangbd23a8d2015-08-28 18:47:06 -07009 - LDFLAGS=-L/tmp/protobuf-${PROTOBUF_VERSION}/lib
10 - CXXFLAGS=-I/tmp/protobuf-${PROTOBUF_VERSION}/include
nmittler1dce8df2016-02-16 08:47:09 -080011 - LD_LIBRARY_PATH=/tmp/protobuf-${PROTOBUF_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
Eric Anderson036af152015-11-25 14:18:28 -080016 - 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 Anderson6715f122016-02-13 14:43:38 -080027script:
28 - ./gradlew check :grpc-all:jacocoTestReport
29
Eric Anderson522580d2015-08-07 18:02:31 -070030after_success:
Eric Anderson6dc5e802015-10-15 14:52:24 -070031 - if \[ "$TRAVIS_OS_NAME" = linux \]; then ./gradlew :grpc-all:coveralls; fi
Eric Anderson6715f122016-02-13 14:43:38 -080032 - bash <(curl -s https://codecov.io/bash)
Louis Ryanc42c8c42015-03-18 16:31:38 -070033
34os:
35 - linux
Eric Anderson6dc5e802015-10-15 14:52:24 -070036 - osx
37
38# This image comes with jdk8
39osx_image: xcode7
Louis Ryanc42c8c42015-03-18 16:31:38 -070040
Louis Ryanc42c8c42015-03-18 16:31:38 -070041notifications:
Eric Andersona0acb9b2015-03-20 10:26:00 -070042 email: false
43
Eric Anderson6dc5e802015-10-15 14:52:24 -070044# Caching does not work for public repositories with OS X:
45# https://github.com/travis-ci/travis-ci/issues/4011
Eric Andersona0acb9b2015-03-20 10:26:00 -070046cache:
47 directories:
Kun Zhangbd23a8d2015-08-28 18:47:06 -070048 - /tmp/protobuf-${PROTOBUF_VERSION}
Eric Anderson16055782015-03-20 12:03:48 -070049 - $HOME/.m2/repository/io/netty
50 - $HOME/.gradle/caches/modules-2
51 - $HOME/.gradle/wrapper
52
53before_cache:
54 - rm $HOME/.gradle/caches/modules-2/modules-2.lock
Eric Anderson3b54ffa2015-04-29 07:56:04 -070055 - find $HOME/.gradle/wrapper -not -name "*-all.zip" -and -not -name "*-bin.zip" -delete