forked from census-instrumentation/opencensus-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtravis_script
executable file
·64 lines (62 loc) · 1.85 KB
/
travis_script
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
#!/bin/bash
#
# Travis build script, cf.
# https://docs.travis-ci.com/user/customizing-the-build/#Implementing-Complex-Build-Steps.
set -o errexit
set -o xtrace
case "$TASK" in
"CHECK_GIT_HISTORY")
python "$(dirname "$0")"/check-git-history.py
;;
"BUILD")
case "$TRAVIS_OS_NAME" in
"linux")
case "$TRAVIS_JDK_VERSION" in
"oraclejdk9")
./gradlew clean assemble check --stacktrace
;;
"openjdk10")
./gradlew clean assemble check --stacktrace
;;
"openjdk11")
./gradlew clean assemble check --stacktrace
;;
"openjdk8")
./gradlew clean assemble --stacktrace
./gradlew check :opencensus-all:jacocoTestReport
./gradlew verGJF
;;
*)
echo "Unknown JDK version $TRAVIS_JDK_VERSION"
exit 1
;;
esac
;;
"osx")
# OS X is a separate case, because the JDK version is determined by the OS X image:
# https://docs.travis-ci.com/user/reference/osx/#JDK-and-OS-X
./gradlew clean assemble --stacktrace
./gradlew check
;;
*)
echo "Unknown OS name $TRAVIS_OS_NAME"
exit 1
;;
esac
;;
"CHECKER_FRAMEWORK")
./gradlew clean assemble -PcheckerFramework=true
;;
"BUILD_EXAMPLES_GRADLE")
pushd examples && ./gradlew clean assemble --stacktrace && ./gradlew check && ./gradlew verGJF && popd
pushd examples/spring/servlet && ./gradlew clean assemble --stacktrace && ./gradlew check && ./gradlew verGJF && popd
;;
"BUILD_EXAMPLES_MAVEN")
pushd examples && mvn clean package appassembler:assemble -e && popd
pushd examples/spring/servlet && mvn clean package appassembler:assemble -e && popd
;;
*)
echo "Unknown task $TASK"
exit 1
;;
esac