forked from census-instrumentation/opencensus-proto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
49 lines (42 loc) · 1.04 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
sudo: required
dist: trusty
matrix:
include:
- language: java
jdk: oraclejdk8
env: BUILD=BAZEL
- language: java
jdk: oraclejdk8
env: BUILD=GRADLE
before_install:
- case "$BUILD" in
"BAZEL")
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list ;
curl https://storage.googleapis.com/bazel-apt/doc/apt-key.pub.gpg | sudo apt-key add - ;
sudo apt-get update ;;
esac
install:
- case "$BUILD" in
"BAZEL")
sudo apt-get install bazel ;
bazel version;;
esac
script:
- case "$BUILD" in
"BAZEL")
cd src;
bazel build --show_result=100 ... ;;
"GRADLE")
./gradlew clean assemble --stacktrace ;
./gradlew check --stacktrace ;;
*)
echo "Missing case $BUILD" ;
exit 1 ;;
esac
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/