blob: 13ae54c91eb589dad8158a839f5ad1e81e6639f2 [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:
Kun Zhange2ed2e82016-01-27 08:26:19 -08007 - PROTOBUF_VERSION=3.0.0-beta-2
Kun Zhangbd23a8d2015-08-28 18:47:06 -07008 - LDFLAGS=-L/tmp/protobuf-${PROTOBUF_VERSION}/lib
9 - CXXFLAGS=-I/tmp/protobuf-${PROTOBUF_VERSION}/include
nmittler1dce8df2016-02-16 08:47:09 -080010 - LD_LIBRARY_PATH=/tmp/protobuf-${PROTOBUF_VERSION}/lib
Louis Ryanc42c8c42015-03-18 16:31:38 -070011
Eric Andersona0acb9b2015-03-20 10:26:00 -070012before_install:
Eric Anderson6dc5e802015-10-15 14:52:24 -070013 # Work around https://github.com/travis-ci/travis-ci/issues/2317
14 - if \[ "$TRAVIS_OS_NAME" = linux \]; then jdk_switcher use oraclejdk8; fi
Eric Anderson036af152015-11-25 14:18:28 -080015 - if \[ "$TRAVIS_OS_NAME" = osx \]; then brew update; fi
Kun Zhangbd23a8d2015-08-28 18:47:06 -070016 - buildscripts/make_dependencies.sh # build protoc into /tmp/protobuf-${PROTOBUF_VERSION}
Eric Anderson26141b42015-03-21 10:59:17 -070017 - mkdir -p $HOME/.gradle
18 - echo "checkstyle.ignoreFailures=false" >> $HOME/.gradle/gradle.properties
Louis Ryanc42c8c42015-03-18 16:31:38 -070019
Eric Andersoncea8e8e2015-10-27 19:53:18 -070020install:
21 - ./gradlew assemble generateTestProto
22
Eric Anderson34571992015-05-07 17:00:44 -070023before_script:
24 - test -z "$(git status --porcelain)" || (git status && echo Error Working directory is not clean. Forget to commit generated files? && false)
25
Eric Anderson522580d2015-08-07 18:02:31 -070026after_success:
Eric Anderson6dc5e802015-10-15 14:52:24 -070027 - if \[ "$TRAVIS_OS_NAME" = linux \]; then ./gradlew :grpc-all:coveralls; fi
Louis Ryanc42c8c42015-03-18 16:31:38 -070028
29os:
30 - linux
Eric Anderson6dc5e802015-10-15 14:52:24 -070031 - osx
32
33# This image comes with jdk8
34osx_image: xcode7
Louis Ryanc42c8c42015-03-18 16:31:38 -070035
Louis Ryanc42c8c42015-03-18 16:31:38 -070036notifications:
Eric Andersona0acb9b2015-03-20 10:26:00 -070037 email: false
38
Eric Anderson6dc5e802015-10-15 14:52:24 -070039# Caching does not work for public repositories with OS X:
40# https://github.com/travis-ci/travis-ci/issues/4011
Eric Andersona0acb9b2015-03-20 10:26:00 -070041cache:
42 directories:
Kun Zhangbd23a8d2015-08-28 18:47:06 -070043 - /tmp/protobuf-${PROTOBUF_VERSION}
Eric Anderson16055782015-03-20 12:03:48 -070044 - $HOME/.m2/repository/io/netty
45 - $HOME/.gradle/caches/modules-2
46 - $HOME/.gradle/wrapper
47
48before_cache:
49 - rm $HOME/.gradle/caches/modules-2/modules-2.lock
Eric Anderson3b54ffa2015-04-29 07:56:04 -070050 - find $HOME/.gradle/wrapper -not -name "*-all.zip" -and -not -name "*-bin.zip" -delete