-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
168 lines (149 loc) · 4.58 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
dist: trusty
sudo: required
group: deprecated-2017Q2
# lib contains jar files to support running tests
cache:
directories:
- lib
language: java
jdk:
- oraclejdk8
- openjdk8
# oraclejdk9 failures - https://github.com/oltpbenchmark/oltpbench/issues/137
#matrix:
# allow_failures:
# - jdk: oraclejdk9
# Currently oraclejdk8 is mapped to DB=mysql and the
# others are DB=postgres.
#
# a test env of: - DB=mysql TEST=tatp
# duplicated for postgres would of been nice however
# attempting to limit non-junit tests to single jdk with
# matrix:
# exclude:
# - jdk: oraclejdk8
# env: DB=mysql
# - jdk: oraclejdk9
# env: DB=mysql
# - jdk: oraclejdk8
# env: DB=postgres
# - jdk: oraclejdk9
# env: DB=postgres
# Failed to exclude any elements.
# Possibilities for future:
# matrix:
# include:
# - addons:
# mariadb: 5.5
# - addons:
# mariadb: 10.0
# - addons:
# mariadb: 10.1
# - addons:
# mariadb: 10.2
# - addons:
# postgresql: 9.4
# - addons:
# postgresql: 9.5
# - addons:
# postgresql: 9.6
## - addons:
## postgresql: 9.7
# https://docs.travis-ci.com/user/database-setup/#Using-a-different-PostgreSQL-Version
# MariaDB wasn't supported on trusty-containers at time of writing
# This syntax may not be correct.
addons:
postgresql: 9.6
env:
- TEST=junit
- TEST=epinions
- TEST=tatp
- TEST=tpcc
- TEST=voter
- TEST=auctionmark
- TEST=wikipedia
- TEST=ycsb
- TEST=seats
- TEST=sibench
- TEST=noop
- TEST=smallbank
- TEST=twitter
- TEST=resourcestresser
# Missing loader com.oltpbenchmark.benchmarks.resourcestresser.ResourceStresserBenchmark.makeLoaderImpl(ResourceStresserBenchmark.java:58)
# -> org.apache.commons.lang.NotImplementedException: Code is not implemented
# - TEST=resourcestresser
# Missing sample config file
# - TEST=chbenchmark
#
# Missing sample config
# - TEST=hyadapt
#
# Not fully implemented
# - TEST=jpab
#
# Works only for MySQL at this time
# - TEST=linkbench
#
# While mariadb addon isn't used. Remove if using a addon: mariadb
services:
- mysql
# Increase the size of ramdisk on sudo enabled infrastructure
# https://github.com/travis-ci/travis-ci/issues/9036#issuecomment-357189213
before_install:
- sudo mount -o remount,size=50% /var/ramfs
install:
- echo $TRAVIS_JDK_VERSION
- if [ $TRAVIS_JDK_VERSION == oraclejdk8 ]; then
DB=mysql ;
else
DB=postgres ;
fi
- if [ $DB == mysql ]; then mysql -e "SELECT VERSION()";
mysql -e "CREATE DATABASE IF NOT EXISTS ${TEST}" ;
mysql -e "CREATE USER 'travis'@'localhost' IDENTIFIED BY 'travis'; GRANT ALL ON *.* TO 'travis'@'localhost'";
elif [ $DB == postgres ]; then psql -c "SELECT VERSION()" -U travis;
psql -c "create database $TEST" -U postgres ;
psql -c "ALTER USER CURRENT_USER WITH PASSWORD 'travis'" -U travis;
fi
# MySQL create user is probably one of the trust-container bugs for MySQL
# Will probably need the following to set a password
# We pass a password here as <password></password> sends no password in the protocol
# rather than the blank one and therefore fails on MySQL.
before_script:
- if [ $DB == mysql ]; then
URLBASE=jdbc:mysql://localhost:3306 ;
DRIVER=com.mysql.jdbc.Driver ;
TYPE=mysql ;
elif [ $DB == postgres ]; then
URLBASE=jdbc:postgresql://localhost:5432 ;
DRIVER=org.postgresql.Driver ;
TYPE=postgres ;
fi
script:
- SCALEFACTOR=0.5
- if [ $TEST == junit ]; then
ant junit;
else
ant build;
config=config/sample_${TEST}_config.xml ;
sed -i
-e "/<dbtype>/c\<dbtype>${TYPE}</dbtype>"
-e "/<driver>/c\<driver>${DRIVER}</driver>"
-e "/<DBUrl>/c\<DBUrl>${URLBASE}/${TEST}</DBUrl>"
-e '/<username>/c\<username>travis</username>'
-e '/<password>/c\<password>travis</password>'
-e "/<scalefactor>/c\\<scalefactor>${SCALEFACTOR}</scalefactor>"
-e '/<terminals>/c\<terminals>3</terminals>'
-e '/<time>/c\<time>60</time>'
-e '/<isolation>/c\<isolation>TRANSACTION_READ_COMMITTED</isolation>'
"${config}";
./oltpbenchmark --bench "${TEST}" --config "${config}" --create true --load true --execute true ;
fi
# With tests, scalefactor and terminals are just to reduce load on travis
# isolation READ_COMMITTED as the TRANSACTIONAL default caused too many failures for now.
after_script:
- if [ $DB == mysql ]; then
mysql -e "DROP DATABASE IF EXISTS ${TEST}" ;
elif [ $DB == postgres ]; then
psql -c "DROP DATABASE IF EXISTS ${TEST}" -U postgres ;
fi