forked from trinodb/trino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
174 lines (163 loc) · 7.28 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
language: java
env:
global:
- MAVEN_OPTS="-Xmx512M -XX:+ExitOnOutOfMemoryError"
# `mvn install` runs in parallel and required more memory. It's not run concurrently with tests.
- MAVEN_INSTALL_OPTS="-Xmx2G -XX:+ExitOnOutOfMemoryError"
- MAVEN_SKIP_CHECKS_AND_DOCS="-Dair.check.skip-all=true -Dmaven.javadoc.skip=true"
- MAVEN_FAST_INSTALL="-DskipTests $MAVEN_SKIP_CHECKS_AND_DOCS -B -q -T C1"
- ARTIFACTS_UPLOAD_PATH_BRANCH=travis_build_artifacts/${TRAVIS_REPO_SLUG}/${TRAVIS_BRANCH}/${TRAVIS_BUILD_NUMBER}
- ARTIFACTS_UPLOAD_PATH_PR=travis_build_artifacts_pr/${TRAVIS_REPO_SLUG}/${TRAVIS_BRANCH}/${TRAVIS_BUILD_NUMBER}
- TEST_FLAGS=""
- PRODUCT_TESTS_CONFIG=config-empty
matrix:
include:
- env: MAVEN_CHECKS=true BUILD_PRESTO_DOCKER=true
- env: WEBUI_CHECKS=true
- env: TEST_SPECIFIC_MODULES=presto-main
- env: TEST_SPECIFIC_MODULES=presto-tests
# Product tests are long. Start them early to reduce overall build latency.
- env: PRODUCT_TESTS_SUITE=suite-1
- env: PRODUCT_TESTS_SUITE=suite-2
- env: PRODUCT_TESTS_SUITE=suite-3
# suite-4 does not exist
- env: PRODUCT_TESTS_SUITE=suite-5
- env: PRODUCT_TESTS_SUITE=suite-6-non-generic
- env: PRODUCT_TESTS_SUITE=suite-7-non-generic
- env: TEST_SPECIFIC_MODULES=presto-tests TEST_FLAGS="-P ci-only"
- env: TEST_SPECIFIC_MODULES=presto-raptor-legacy
- env: TEST_SPECIFIC_MODULES=presto-accumulo
- env: TEST_SPECIFIC_MODULES=presto-cassandra
- env: TEST_SPECIFIC_MODULES=presto-hive,presto-orc,presto-parquet
- env: TEST_SPECIFIC_MODULES=presto-mongodb,presto-kafka,presto-elasticsearch
- env: TEST_SPECIFIC_MODULES=presto-redis
- env: TEST_SPECIFIC_MODULES=presto-sqlserver,presto-postgresql,presto-mysql
- env: TEST_SPECIFIC_MODULES=presto-phoenix,presto-iceberg
- env: TEST_OTHER_MODULES=!presto-main,!presto-tests,!presto-raptor-legacy,!presto-accumulo,!presto-cassandra,!presto-hive,!presto-orc,!presto-parquet,!presto-mongodb,!presto-kafka,!presto-elasticsearch,!presto-redis,!presto-sqlserver,!presto-postgresql,!presto-mysql,!presto-phoenix,!presto-iceberg,!presto-kudu,!presto-docs,!presto-server,!presto-server-rpm
- env: HIVE_TESTS=true
- env: KUDU_TESTS=true
# HDP 3
- if: type != pull_request
env: PRODUCT_TESTS_SUITE=suite-1 PRODUCT_TESTS_CONFIG=config-hdp3
- if: type != pull_request
env: PRODUCT_TESTS_SUITE=suite-2 PRODUCT_TESTS_CONFIG=config-hdp3
- if: type != pull_request
env: PRODUCT_TESTS_SUITE=suite-3 PRODUCT_TESTS_CONFIG=config-hdp3
# suite-4 does not exist
- if: type != pull_request
env: PRODUCT_TESTS_SUITE=suite-5 PRODUCT_TESTS_CONFIG=config-hdp3
# TODO
# - if: type != pull_request
# env: HIVE_TESTS=true PRODUCT_TESTS_CONFIG=config-hdp3
dist: xenial
jdk: openjdk8
cache:
yarn: true
directories:
- $HOME/.m2/repository
git:
quiet: true
install:
- rm -f ~/.m2/settings.xml
- travis_retry ./mvnw -v
- |
if [[ -v TEST_SPECIFIC_MODULES ]]; then
env MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" ./mvnw install $MAVEN_FAST_INSTALL -pl "${TEST_SPECIFIC_MODULES}" -am
fi
- |
if [[ -v TEST_OTHER_MODULES ]]; then
env MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" ./mvnw install $MAVEN_FAST_INSTALL -pl '!presto-docs,!presto-server,!presto-server-rpm'
fi
- |
if [[ -v PRODUCT_TESTS_SUITE ]]; then
env MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" ./mvnw install $MAVEN_FAST_INSTALL -pl '!presto-docs,!presto-server-rpm'
fi
- |
if [[ -v HIVE_TESTS ]]; then
env MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" ./mvnw install $MAVEN_FAST_INSTALL -pl presto-hive-hadoop2 -am
fi
- |
if [[ -v KUDU_TESTS ]]; then
env MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" ./mvnw install $MAVEN_FAST_INSTALL -pl presto-kudu -am
fi
before_script:
- |
export ARTIFACTS_UPLOAD_PATH=${ARTIFACTS_UPLOAD_PATH_BRANCH}
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
export ARTIFACTS_UPLOAD_PATH="${ARTIFACTS_UPLOAD_PATH_PR}"
fi
# *** WARNING ***
#
# A single script block must include exactly ONE command.
# Travis runs a script block without the `-e` flag. Any failures in the middle are simply ignored.
#
# Specifying the `-e` flag manually is not recommended.
# It will stop the execution after the very first failure.
# Travis runs the remaining blocks even if one of the scripts returns a non zero status.
# Non zero status is propagated at the end of the build.
script:
- |
if [[ -v MAVEN_CHECKS ]]; then
env MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" ./mvnw install -DskipTests -B -T C1 -P ci -pl '!presto-server-rpm' &&
./mvnw install -B -P ci -pl presto-server-rpm &&
true
fi
- |
if [[ -v BUILD_PRESTO_DOCKER ]]; then
docker/build-local.sh
fi
- |
if [[ -v WEBUI_CHECKS ]]; then
presto-main/bin/check_webui.sh
fi
- |
if [[ -v TEST_SPECIFIC_MODULES ]]; then
./mvnw test $MAVEN_SKIP_CHECKS_AND_DOCS -B -pl "${TEST_SPECIFIC_MODULES}" $TEST_FLAGS
fi
- |
if [[ -v TEST_OTHER_MODULES ]]; then
./mvnw test $MAVEN_SKIP_CHECKS_AND_DOCS -B -pl "${TEST_OTHER_MODULES}"
fi
- |
if [[ -v PRODUCT_TESTS_SUITE ]]; then
source "presto-product-tests/conf/product-tests-${PRODUCT_TESTS_CONFIG}.sh" &&
"presto-product-tests/bin/product-tests-${PRODUCT_TESTS_SUITE}.sh"
fi
- |
if [[ -v HIVE_TESTS ]]; then
source "presto-product-tests/conf/product-tests-${PRODUCT_TESTS_CONFIG}.sh" &&
presto-hive-hadoop2/bin/run_hive_tests.sh
fi
- |
if [[ -v HIVE_TESTS && -v HIVE_TESTS_AWS_ACCESS_KEY_ID ]]; then
source "presto-product-tests/conf/product-tests-${PRODUCT_TESTS_CONFIG}.sh" &&
env AWS_ACCESS_KEY_ID="${HIVE_TESTS_AWS_ACCESS_KEY_ID}" \
AWS_SECRET_ACCESS_KEY="${HIVE_TESTS_AWS_SECRET_ACCESS_KEY}" \
S3_BUCKET_ENDPOINT="${S3_TESTS_BUCKET_ENDPOINT}" \
S3_BUCKET="${S3_TESTS_BUCKET}" \
presto-hive-hadoop2/bin/run_hive_s3_tests.sh
fi
- |
if [[ -v HIVE_TESTS && -v HIVE_TESTS_AWS_ACCESS_KEY_ID ]]; then
env AWS_ACCESS_KEY_ID="${HIVE_TESTS_AWS_ACCESS_KEY_ID}" \
AWS_SECRET_ACCESS_KEY="${HIVE_TESTS_AWS_SECRET_ACCESS_KEY}" \
./mvnw test $MAVEN_SKIP_CHECKS_AND_DOCS -B -pl presto-hive -P test-hive-glue
fi
- |
if [[ -v KUDU_TESTS ]]; then
presto-kudu/bin/run_kudu_tests.sh null &&
presto-kudu/bin/run_kudu_tests.sh "" &&
presto-kudu/bin/run_kudu_tests.sh presto:: &&
true
fi
before_cache:
# Make the cache stable between builds by removing build output
- rm -rf $HOME/.m2/repository/io/prestosql
notifications:
webhooks:
urls:
- https://www.travisbuddy.com/
on_success: never
on_cancel: never
slack:
secure: NPHH9nIuInY3v4Jvl1ywC5BlygY9YiVni6LLcR52nwdx/FocO9j80aNKx/kuso+nGRM3dmWKPWdk8ShOOS2ZRvYXQUe2Gy6wSnlwqjKGaHEReZA5hOFuYfTQw0Gh7WGzwiuYpvAzhXzn31GvL92M24Oq0kqP64sA9nndBAT3uMv5PdQV40JtL8kQdh66wHuwtJ/LrljWKTwrTJH8NcGc7I6MLljxe+3n1zy49J7MqVyGdBdFA6CMc6Abgc3XKfsadJH3QFC05LfyOQqMjCutSd+HWkl7yMFLWpddLj0C9DdpG1z7324gcQjlLbDGI3Mc3vd/bTLnanIgQ4ZIWSK8/0j8u/dJw0DPUkO82sZ+1nvtwNvE+C67M2vxlunRuxEwEIw7a6cUuguKh/EhZYDccF6523kFPyCLs8zSKdScCjjz4pj+jj3niug/tBiSRebwhcfLnWlQp7trY54ETtvwjAidGfXwuqO07FsNJL2gweg+axFhcSqFos7VwWeJVB1bVGg1PYM3wFarr25aQstIvE+Ap9Mym1MXXhswwe09BYQiOzoiK/CYAKrQT3IjLBGOM8P+uh2rv4w+wUNlgfUnG9A9aiRAlw+9uXDgFIR59y3SylKtWabDtX5khO/5TTlzc4Cq3tGSoNPPJ+WAtUISGrgCjQAVVnhdZ7chi4aLt5s=