forked from pgjdbc/pgjdbc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
213 lines (205 loc) · 6.19 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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
sudo: false
language: java
before_script:
- export PG_DATADIR="/etc/postgresql/${PG_VERSION}/main"
- ./.travis/travis_install_postgres.sh
- test "x$XA" == 'x' || ./.travis/travis_configure_xa.sh
- test "x$REPLICATION" == 'x' || ./.travis/travis_configure_replication.sh
- ./.travis/travis_start_postgres.sh
- psql -U postgres -c "create user test with password 'test';"
- test "x$REPLICATION" == 'x' || psql -U postgres -c "alter user test with replication;"
- psql -c 'create database test owner test;' -U postgres
- echo "MAVEN_OPTS='-Xmx1g -Dgpg.skip=true'" > ~/.mavenrc
- test "x$PG_VERSION" == 'x' || test "x$NO_HSTORE" == 'xY' || psql test -c 'CREATE EXTENSION hstore;' -U postgres
- test "x$PG_VERSION" == 'x' || test "x$CREATE_PLPGSQL" == 'x' || createlang -U postgres plpgsql test
- if [[ "x$JDK" == *'x9'* ]]; then remove_dir_from_path $JAVA_HOME/bin; export JAVA_HOME=/usr/lib/jvm/java-9-oracle; export PATH=$JAVA_HOME/bin:$PATH; java -Xmx32m -version; fi
env:
global:
- secure: "3HRd+UJQzXoxmBAiJ8SLFuYK8NvMVgIs0erfcPdgvtfFGTPkH3XMONfNr2VE2uz6qwUB5GWkVzvS4c9CPbnnft9QhyYeeUINiqQMN5+6AN5re3C2D7VQMm3NSB+T2R6zS/18UZW5tIoTJILgl5oRCQFI7RSpqhvZ8nqPxJ4gptI="
- secure: "VrNgbyKQi5HjSMZfkt/zwG+AHk1NW1b+f3Jo1ZH7DCqcgLApwvp4MNsw+XamqHxudjj3Z8+4bYBxG2H6zIOobIyYhBvxUwMq7HTjM4jH8m5phqvQIWZOzZzqguYNNS7JJQUpIMwR7wTuHqucVfMxljoSuXQbs+0BUxo4Eh+FScQ="
- secure: "NI+aqwRLLVt2feJdk/2ZEZnsaPyu+vOx8MahVxjz0UUVvRHVqxM5O1M0R53NJfEeIjflOzgZJwRLqgyl6dkdfjytRhaHWGptQdehV4cwNb+4epnn8WlpRzMac65zTQqnbGVtw9jissDQv6/Zl/+D+DMcU65BbFZkix40whILXG0="
script:
# make sure previous build artifacts are not used for subsequent builds
- rm -rf $HOME/.m2/repository/org/postgresql || true
- export JDK6_HOME=$(jdk_switcher home openjdk6)
- export JDK7_HOME=$(jdk_switcher home openjdk7)
- export JDK8_HOME=$(jdk_switcher home oraclejdk8)
- export JDK9_HOME=/usr/lib/jvm/java-9-oracle
- test -d "${JDK9_HOME}" || export JDK9_HOME=$(jdk_switcher home oraclejdk8)
- envsubst < toolchains.xml > ~/.m2/toolchains.xml
- ./.travis/travis_build.sh
# To avoid useless S3 cache updates (https://github.com/travis-ci/travis-ci/issues/1441#issuecomment-67607074)
#- mkdir /tmp/cache-trick
#- mv $HOME/.m2/repository/org/postgresql /tmp/cache-trick/
before_cache:
# No sense in caching current build artifacts
- rm -rf $HOME/.m2/repository/org/postgresql
- find $HOME/.ivy2 -name "ivydata-*.properties" -delete
- find $HOME/.sbt -name "*.lock" -delete
# Skip default "mvn install" issued by Travis
# Root project cannot be compiled with older JDKs, so it makes sense to just skip the step
install: true
cache:
directories:
- $HOME/.m2/repository
- $HOME/.ivy2/cache
- $HOME/.sbt/boot/
matrix:
fast_finish: true
allow_failures:
- env: # this has to match the environment for 8.2 below
- PG_VERSION=8.2
- XA=true
- COVERAGE=Y
- NO_HSTORE=Y
- CREATE_PLPGSQL=Y
- env: # this has to match the environment for 8.3 below
- PG_VERSION=8.3
- XA=true
- COVERAGE=Y
- NO_HSTORE=Y
- CREATE_PLPGSQL=Y
include:
- env:
- FEDORA_CI=Y
services:
- docker
- jdk: oraclejdk8
sudo: required
dist: trusty
env:
- PG_VERSION=9.6
- XA=true
- REPLICATION=Y
- COVERAGE=Y
- jdk: oraclejdk8
sudo: required
dist: trusty
addons:
postgresql: "9.5"
env:
- PG_VERSION=9.5
- XA=true
- REPLICATION=Y
- COVERAGE=Y
- jdk: oraclejdk8
sudo: required
dist: precise
env:
- PG_VERSION=8.4
- XA=true
- COVERAGE=Y
- NO_HSTORE=Y
- CREATE_PLPGSQL=Y
- jdk: oraclejdk8
sudo: required
dist: precise
env: # this has to match allow_failures above
- PG_VERSION=8.2
- XA=true
- COVERAGE=Y
- NO_HSTORE=Y
- CREATE_PLPGSQL=Y
- jdk: oraclejdk8
sudo: required
dist: precise
env: # this has to match allow_failures above
- PG_VERSION=8.3
- XA=true
- COVERAGE=Y
- NO_HSTORE=Y
- CREATE_PLPGSQL=Y
- jdk: oraclejdk8
env: RUN_CHECKSTYLE=true
script: mvn checkstyle:check
- jdk: oraclejdk8
addons:
postgresql: "9.4"
apt:
packages:
- oracle-java8-installer
sudo: required
dist: trusty
env:
- PG_VERSION=9.4
- XA=true
- REPLICATION=Y
- COVERAGE=Y
- MCENTRAL=Y
- JDOC=Y
- jdk: oraclejdk8
sudo: required
dist: trusty
env:
- PG_VERSION=HEAD
- XA=true
- REPLICATION=Y
- jdk: openjdk7
addons:
postgresql: "9.4"
env:
- PG_VERSION=9.4
- MCENTRAL=Y
- jdk: openjdk6
addons:
postgresql: "9.4"
env:
- PG_VERSION=9.4
- MCENTRAL=Y
- jdk: oraclejdk8
addons:
postgresql: "9.4"
env:
- PG_VERSION=9.4
- TEST_CLIENTS=Y
- jdk: oraclejdk8 # this will be overwritten by before_install above
addons:
postgresql: "9.4"
apt:
packages:
- oracle-java9-installer
env:
- PG_VERSION=9.4
- JDK=9
- jdk: oraclejdk8
addons:
postgresql: "9.4"
env:
- PG_VERSION=9.4
- QUERY_MODE=simple
- COVERAGE=Y
- ANORM_SBT=Y
- jdk: oraclejdk8
addons:
postgresql: "9.4"
env:
- PG_VERSION=9.4
- QUERY_MODE=extendedForPrepared
- jdk: oraclejdk8
addons:
postgresql: "9.4"
env:
- PG_VERSION=9.4
- NO_WAFFLE_NO_OSGI=Y
- JDOC=Y
- jdk: openjdk7
addons:
postgresql: "9.3"
env:
- PG_VERSION=9.3
- COVERAGE=Y
- jdk: openjdk6
addons:
postgresql: "9.2"
env:
- PG_VERSION=9.2
- COVERAGE=Y
- jdk: oraclejdk8
addons:
postgresql: "9.1"
env:
- PG_VERSION=9.1
- COVERAGE=Y
# Deploy snapshots to Maven Central
after_success:
- "test $TRAVIS_PULL_REQUEST == 'false' && test $TRAVIS_BRANCH == 'master' && test $MCENTRAL == 'Y' && ./.travis/travis_deploy.sh"