/
.travis.yml
103 lines (95 loc) · 2.92 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
sudo: false
language: java
before_script:
- psql -U postgres -c "create user test with password 'test';"
- psql -c 'create database test owner test;' -U postgres
- echo "MAVEN_OPTS='-Xmx1g -Dgpg.skip=true'" > ~/.mavenrc
env:
global:
- secure: "3HRd+UJQzXoxmBAiJ8SLFuYK8NvMVgIs0erfcPdgvtfFGTPkH3XMONfNr2VE2uz6qwUB5GWkVzvS4c9CPbnnft9QhyYeeUINiqQMN5+6AN5re3C2D7VQMm3NSB+T2R6zS/18UZW5tIoTJILgl5oRCQFI7RSpqhvZ8nqPxJ4gptI="
- secure: "VrNgbyKQi5HjSMZfkt/zwG+AHk1NW1b+f3Jo1ZH7DCqcgLApwvp4MNsw+XamqHxudjj3Z8+4bYBxG2H6zIOobIyYhBvxUwMq7HTjM4jH8m5phqvQIWZOzZzqguYNNS7JJQUpIMwR7wTuHqucVfMxljoSuXQbs+0BUxo4Eh+FScQ="
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)
- envsubst < toolchains.xml > ~/.m2/toolchains.xml
- ./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
# 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'
matrix:
fast_finish: true
include:
- jdk: oraclejdk8
env: RUN_CHECKSTYLE=true
script: cd pgjdbc && mvn checkstyle:check
- jdk: oraclejdk8
addons:
postgresql: "9.4"
env:
- PG_VERSION=9.4
- COVERAGE=Y
- jdk: openjdk7
addons:
postgresql: "9.4"
env: PG_VERSION=9.4
- jdk: openjdk6
addons:
postgresql: "9.4"
env: PG_VERSION=9.4
- jdk: oraclejdk8
addons:
postgresql: "9.3"
env: PG_VERSION=9.3
- jdk: openjdk7
addons:
postgresql: "9.3"
env:
- PG_VERSION=9.3
- COVERAGE=Y
- jdk: openjdk6
addons:
postgresql: "9.3"
env: PG_VERSION=9.3
- jdk: oraclejdk8
addons:
postgresql: "9.2"
env: PG_VERSION=9.2
- jdk: openjdk7
addons:
postgresql: "9.2"
env: PG_VERSION=9.2
- 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
- jdk: openjdk7
addons:
postgresql: "9.1"
env: PG_VERSION=9.1
- jdk: openjdk6
addons:
postgresql: "9.1"
env: PG_VERSION=9.1
# Deploy snapshots to Maven Central
after_success:
- "test $TRAVIS_PULL_REQUEST == 'false' && test $TRAVIS_BRANCH == 'master' && test $PG_VERSION == '9.4' && ./travis_deploy.sh"