aboutsummaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 25be15394c728edddfd02c8ffe4c7a8db0962f6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
sudo: false

language: java

env:
  global:
    - PROTOBUF_VERSION=3.0.0-beta-1
    - OPENSSL_VERSION=1.0.2d
    - LDFLAGS=-L/tmp/protobuf-${PROTOBUF_VERSION}/lib
    - CXXFLAGS=-I/tmp/protobuf-${PROTOBUF_VERSION}/include
    - LD_LIBRARY_PATH=/tmp/protobuf-${PROTOBUF_VERSION}/lib:/tmp/openssl-${OPENSSL_VERSION}/lib

before_install:
    # Work around https://github.com/travis-ci/travis-ci/issues/2317
  - if \[ "$TRAVIS_OS_NAME" = linux \]; then jdk_switcher use oraclejdk8; fi
  - if \[ "$TRAVIS_OS_NAME" = osx \]; then brew update; fi
  - buildscripts/make_dependencies.sh # build protoc into /tmp/protobuf-${PROTOBUF_VERSION}
  - mkdir -p $HOME/.gradle
  - echo "checkstyle.ignoreFailures=false" >> $HOME/.gradle/gradle.properties

before_script:
  - test -z "$(git status --porcelain)" || (git status && echo Error Working directory is not clean. Forget to commit generated files? && false)

after_success:
  - if \[ "$TRAVIS_OS_NAME" = linux \]; then ./gradlew :grpc-all:coveralls; fi

os:
  - linux
  - osx

# This image comes with jdk8
osx_image: xcode7

notifications:
  email: false

# Caching does not work for public repositories with OS X:
# https://github.com/travis-ci/travis-ci/issues/4011
cache:
  directories:
    - /tmp/protobuf-${PROTOBUF_VERSION}
    - /tmp/openssl-${OPENSSL_VERSION}
    - $HOME/.m2/repository/io/netty
    - $HOME/.gradle/caches/modules-2
    - $HOME/.gradle/wrapper

before_cache:
  - rm $HOME/.gradle/caches/modules-2/modules-2.lock
  - find $HOME/.gradle/wrapper -not -name "*-all.zip" -and -not -name "*-bin.zip" -delete