forked from pgjdbc/pgjdbc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
202 lines (193 loc) · 6 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
sudo: false
language: java
dist: trusty
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
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="
before_install:
- ./.travis/travis_install_zulu.sh
- test -z "${ZULU_JDK}" || export JDK${ZULU_JDK}_HOME=/usr/lib/jvm/zulu-${ZULU_JDK}-amd64
script:
# make sure previous build artifacts are not used for subsequent builds
- rm -rf $HOME/.m2/repository/org/postgresql || true
- test -d "${JDK6_HOME}" || export JDK6_HOME=$(jdk_switcher home openjdk6)
- test -d "${JDK7_HOME}" || export JDK7_HOME=$(jdk_switcher home openjdk7)
- test -d "${JDK8_HOME}" || export JDK8_HOME=$(jdk_switcher home oraclejdk8)
- test -d "${JDK9_HOME}" || export JDK9_HOME=$(jdk_switcher home oraclejdk9)
- test -d "${JDK9_HOME}" || export JDK9_HOME=$(jdk_switcher home oraclejdk8) # JDK9 missing on precise, fallback to JDK8
- envsubst < toolchains.xml > ~/.m2/toolchains.xml
- test ${JDK} -eq 9 || jdk_switcher use oraclejdk8 # Run Maven with Java 8, build with Toolchains.
- ./.travis/travis_build.sh
- ./.travis/travis_check_postgres_health.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
include:
- jdk: oraclejdk8
env: RUN_CHECKSTYLE=true
script: mvn checkstyle:check
- env:
- FEDORA_CI=Y
services:
- docker
- jdk: oraclejdk9
addons:
apt:
packages:
- oracle-java9-installer # Test with latest update
postgresql: "9.6"
env:
- PG_VERSION=9.6
- JDK=9
- jdk: oraclejdk8
sudo: required
env:
- PG_VERSION=HEAD
- XA=true
- REPLICATION=Y
- COVERAGE=Y
- jdk: oraclejdk8
sudo: required
addons:
postgresql: "9.6"
env:
- PG_VERSION=9.6
- ZULU_JDK=8
- XA=true
- REPLICATION=Y
- COVERAGE=Y
- MCENTRAL=Y
- JDOC=Y
- jdk: oraclejdk8
sudo: required
addons:
postgresql: "9.5"
env:
- PG_VERSION=9.5
- XA=true
- REPLICATION=Y
- jdk: oraclejdk8
sudo: required
addons:
apt:
packages:
- oracle-java8-installer # Test with latest update
postgresql: "9.4"
env:
- PG_VERSION=9.4
- LATEST_JAVA_UPDATE=Y # Use Travis last Java update
- XA=true
- REPLICATION=Y
- COVERAGE=Y
- jdk: oraclejdk8
sudo: required
env:
- PG_VERSION=8.4
- XA=true
- COVERAGE=Y
- NO_HSTORE=Y
- CREATE_PLPGSQL=Y
- jdk: oraclejdk8
sudo: required
dist: precise
env:
- PG_VERSION=8.3
- XA=true
- COVERAGE=Y
- NO_HSTORE=Y
- CREATE_PLPGSQL=Y
- jdk: oraclejdk8
sudo: required
dist: precise
env:
- PG_VERSION=8.2
- XA=true
- COVERAGE=Y
- NO_HSTORE=Y
- CREATE_PLPGSQL=Y
- jdk: oraclejdk8
addons:
postgresql: "9.6"
env:
- PG_VERSION=9.6
- TEST_CLIENTS=Y
- jdk: oraclejdk8
addons:
postgresql: "9.6"
env:
- PG_VERSION=9.6
- QUERY_MODE=simple
- COVERAGE=Y
- ANORM_SBT=Y
- jdk: oraclejdk8
addons:
postgresql: "9.6"
env:
- PG_VERSION=9.6
- QUERY_MODE=extendedForPrepared
- COVERAGE=Y
- jdk: oraclejdk8
addons:
postgresql: "9.5"
env:
- PG_VERSION=9.5
- NO_WAFFLE_NO_OSGI=Y
- JDOC=Y
- jdk: openjdk7
sudo: required
addons:
postgresql: "9.4"
env:
- PG_VERSION=9.4
- ZULU_JDK=7
- MCENTRAL=Y
- jdk: openjdk7
sudo: required
addons:
postgresql: "9.3"
env:
- PG_VERSION=9.3
- ZULU_JDK=7
- jdk: openjdk6
sudo: required
env:
- PG_VERSION=9.2
- ZULU_JDK=6
- MCENTRAL=Y
- jdk: openjdk6
sudo: required
env:
- PG_VERSION=9.1
- ZULU_JDK=6
# Deploy snapshots to Maven Central
after_success:
- "test $TRAVIS_PULL_REQUEST == 'false' && test $TRAVIS_BRANCH == 'master' && test $MCENTRAL == 'Y' && ./.travis/travis_deploy.sh"