This repository has been archived by the owner. It is now read-only.
forked from angoca/BenchmarkSQL-4
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
74 lines (65 loc) · 3.53 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
language: sql-pl
# blacklist
branches:
except:
- master
env:
- DB=db2
- DB=postgres
before_install:
- pwd
- df -h
# DB2
# Install the required libraries
- sudo apt-get update -qq
- sh -c "if [ '$DB' = 'db2' ]; then sudo apt-get -y install libaio1 ksh libstdc++6-4.4-pic libstdc++6-4.4-dev libstdc++5 rpm; fi"
- sh -c "if [ '$DB' = 'db2' ]; then sudo apt-get -y install libpam0g:i386; fi"
- sh -c "if [ '$DB' = 'db2' ]; then sudo ln -s /lib/i386-linux-gnu/libpam.so.0 /lib/libpam.so.0; fi"
- sh -c "if [ '$DB' = 'db2' ]; then sudo apt-get install numactl; fi"
# Retrieves and extracts the DB2 binaries
- cd /tmp
- sh -c "if [ '$DB' = 'db2' ]; then wget https://iwm.dhe.ibm.com/sdfdl/v2/regs2/db2pmopn/db2_v105/expc/Xa.2/Xb.aA_60_-idZesxvYFTG9wZGeVpL-sk6SitQZbXZ1LQQ/Xc.db2_v105/expc/v10.5fp1_linuxx64_expc.tar.gz/Xd./Xf.LPr.D1vk/Xg.7581679/Xi.swg-db2expressc/XY.regsrvs/XZ.Bs4qLmV_wlEhE_aG_ELNyRq0hh0/v10.5fp1_linuxx64_expc.tar.gz; fi"
- sh -c "if [ '$DB' = 'db2' ]; then tar zvxf v10.5fp1_linuxx64_expc.tar.gz; fi"
# Checks the prerequisites
- sh -c "if [ '$DB' = 'db2' ]; then expc/db2prereqcheck -i; fi"
# Install DB2 and creates an instance (Response file)
- sh -c "if [ '$DB' = 'db2' ]; then sudo expc/db2setup -r /home/travis/build/angoca/BenchmarkSQL/run/db2expc.rsp || cat /tmp/db2setup.log; fi"
- sh -c "if [ '$DB' = 'db2' ]; then echo \"db2admin\\\ndb2admin\" | sudo passwd db2inst1; fi"
# Remove files
- cd
- sh -c "if [ '$DB' = 'db2' ]; then rm -Rf /tmp/expc; fi"
- sh -c "if [ '$DB' = 'db2' ]; then rm /tmp/v10.5fp1_linuxx64_expc.tar.gz; fi"
# Creates the database
- sh -c "if [ '$DB' = 'db2' ]; then sudo su - db2inst1 -c \"db2 create db bmarkdb\"; fi"
- sh -c "if [ '$DB' = 'db2' ]; then sudo su - db2inst1 -c \"db2 connect to bmarkdb;db2 grant dbadm on database to user $USER\"; fi"
# Modifies the scripts
- cd
- cd build/angoca/BenchmarkSQL/run
- sh -c "if [ '$DB' = 'db2' ]; then sed 's/^myCP=\"\.\./myCP=\"\/opt\/ibm\/db2\/V10\.5\/java\/db2jcc4\.jar:\.\./g' runSQL.sh > runSQL2.sh; mv runSQL2.sh runSQL.sh; fi"
- sh -c "if [ '$DB' = 'db2' ]; then sed 's/-cp \.:/-cp \.:\/opt\/ibm\/db2\/V10\.5\/java\/db2jcc4\.jar:/g' runBenchmark.sh > runBenchmark2.sh; mv runBenchmark2.sh runBenchmark.sh; fi"
- sh -c "if [ '$DB' = 'db2' ]; then sed 's/-cp \.:/-cp \.:\/opt\/ibm\/db2\/V10\.5\/java\/db2jcc4\.jar:/g' runLoader.sh > runLoader2.sh; mv runLoader2.sh runLoader.sh; fi"
# Postgres
- sh -c "if [ '$DB' = 'postgres' ]; then sudo -u postgres psql -c \"create user benchmarksql with superuser password 'password'\"; fi"
- sh -c "if [ '$DB' = 'postgres' ]; then sudo -u postgres psql -c \"grant all privileges on database postgres to benchmarksql\"; fi"
- cat run*.sh
- chmod +x run*.sh
- df -h
- df -ih
install:
# DB2
- sh -c "if [ '$DB' = 'db2' ]; then ./runSQL.sh props.db2 sqlTableCreates_DB2; fi"
# Postgres
- sh -c "if [ '$DB' = 'postgres' ]; then ./runSQL.sh props.pg sqlTableCreates; fi"
- df -h
script:
- sh -c "if [ '$DB' = 'db2' ]; then ./runLoader.sh props.db2 numWarehouses 1; fi"
- sh -c "if [ '$DB' = 'db2' ]; then ./runSQL.sh props.db2 sqlIndexCreates_DB2; fi"
- sh -c "if [ '$DB' = 'db2' ]; then ./runBenchmark.sh props.db2; fi"
- sh -c "if [ '$DB' = 'postgres' ]; then ./runLoader.sh props.pg numWarehouses 1; fi"
- sh -c "if [ '$DB' = 'postgres' ]; then ./runSQL.sh props.pg sqlIndexCreates; fi"
- sh -c "if [ '$DB' = 'postgres' ]; then ./runBenchmark.sh props.pg; fi"
after_script:
- df -h
- df -ih
- cat log/BenchmarkSQLError.log
- cat log/benchmarksql.log