forked from census-instrumentation/opencensus-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
66 lines (55 loc) · 1.72 KB
/
.travis.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
sudo: false
language: java
matrix:
include:
- jdk: oraclejdk7
env: TASK=BUILD
os: linux
- jdk: oraclejdk8
env: TASK=BUILD
os: linux
# Work around https://github.com/travis-ci/travis-ci/issues/2317
- env: TASK=BUILD
os: osx
- env: TASK=CHECK_GIT_HISTORY
os: linux
before_install:
- git log --oneline --decorate --graph -30
- if \[ "$TASK" == "BUILD" \]; then
mkdir -p $HOME/.gradle ;
cat gradle/errorprone/warnings > $HOME/.gradle/gradle.properties ;
cat gradle/errorprone/experimental_errors >> $HOME/.gradle/gradle.properties ;
cat gradle/errorprone/experimental_warnings >> $HOME/.gradle/gradle.properties ;
cat gradle/errorprone/experimental_suggestions >> $HOME/.gradle/gradle.properties ;
fi
# Skip Travis' default Gradle install step. See http://stackoverflow.com/a/26575080.
install: true
script:
- case "$TASK" in
"CHECK_GIT_HISTORY")
python check-git-history.py ;;
"BUILD")
export JAVA8_HOME=`jdk_switcher home oraclejdk8` ;
./gradlew clean assemble --stacktrace ;
case "$TRAVIS_JDK_VERSION" in
"oraclejdk8")
./gradlew check :all:jacocoTestReport ;;
"oraclejdk7")
./gradlew check ;;
esac ;;
*)
echo "Unknown task $TASK" ;
exit 1 ;;
esac
after_success:
- if \[ "$TASK" == "BUILD" \] && \[ "$TRAVIS_JDK_VERSION" == "oraclejdk8" \] && \[ "$TRAVIS_OS_NAME" = linux \]; then
./gradlew :all:coveralls --stacktrace ;
bash <(curl -s https://codecov.io/bash) ;
fi
before_cache:
- rm -fr $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/