forked from hibernate/hibernate-search
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (60 loc) · 1.93 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
# The main CI of Hibernate Search is http://ci.hibernate.org/. Travis CI can be
# used in github forks. https://travis-ci.org/hibernate/hibernate-search is
# therefore deactivated. Activating Travis for your own fork is as easy as
# activating it in the travis site of your fork.
sudo: required
dist: trusty
language: java
jdk:
- oraclejdk8
addons:
# for now, let's test only with H2
#postgresql: '9.4'
#mariadb: '10.0'
apt:
packages:
- oracle-java8-installer
# might be useful to push reports to an S3 bucket
# artifacts:
# paths:
# - $(find $HOME -name surefire-reports | tr "\n" ":")
# - $(find $HOME -name failsafe-reports | tr "\n" ":")
# s3_region: 'us-west-2'
cache:
directories:
- $HOME/.m2
env:
#- DB=h2 ELASTICSEARCH=2.0
- DB=h2 ELASTICSEARCH=2.2
- DB=h2 ELASTICSEARCH=5.0
- DB=h2 ELASTICSEARCH=5.2
# for now, let's test only with H2
#- DB=pgsql
#- DB=mariadb
install:
# The Maven install provided by Travis is outdated, use Maven wrapper to get the latest version
- mvn -N io.takari:maven:wrapper
- ./mvnw -v
# first run to download all the Maven dependencies without logging
- ./mvnw -s settings-example.xml -B -q clean install -DskipTests=true
# we run checkstyle first to fail fast if there is a styling error
- ./mvnw -s settings-example.xml checkstyle:check
before_script:
- case $DB in
"h2") ;;
"pgsql") psql -U postgres -f 'travis/pgsql.sql' ;;
"mariadb") mysql -u root < 'travis/mariadb.sql' ;;
esac
script:
- case $DB in
"h2") ;;
"pgsql") BUILD_OPTIONS+=' -Pci-postgresql' ;;
"mariadb") BUILD_OPTIONS+=' -Pci-mariadb' ;;
esac
- case $ELASTICSEARCH in
2.0) BUILD_OPTIONS+=' -P!elasticsearch-5.2,elasticsearch-2.0' ;;
2.2) BUILD_OPTIONS+=' -P!elasticsearch-5.2,elasticsearch-2.2' ;;
5.0) BUILD_OPTIONS+=' -P!elasticsearch-5.2,elasticsearch-5.0' ;;
5.2) ;;
esac
- ./mvnw -s settings-example.xml -Pdist $BUILD_OPTIONS clean install