-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
39 lines (32 loc) · 1.31 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
sudo: false
addons:
apt:
packages:
- ninja-build
- doxygen
- graphviz
- libsqliteodbc
- libmyodbc
- odbc-postgresql
install:
- wget -O boost_1_58_0.tar.bz2 https://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.bz2/download && tar -xf boost_1_58_0.tar.bz2
- pushd boost_1_58_0 && ./bootstrap.sh --prefix=$HOME/boost-1.58.0 --with-libraries=thread,test && ./b2 link=shared threading=multi variant=release install && popd
language: cpp
env:
- DB=sqlite
- DB=mysql
- DB=postgresql
services:
- mysql
- postgresql
before_script:
- if [ "$DB" = 'mysql' ]; then echo -e '\n[MySQL]\nDescription = MySQL ODBC driver\nDriver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so\n' | sudo tee -a /etc/odbcinst.ini; fi
- if [ "$DB" = 'mysql' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS rodbc_test;'; fi
- if [ "$DB" = 'postgresql' ]; then psql -U postgres -c 'CREATE DATABASE rodbc_test;'; fi
script:
- if [ "$DB" = 'mysql' ]; then DB_CONFIG='-DRODBC_TEST_CONN_STR="Driver=MySQL;Database=rodbc_test;"'; fi
- if [ "$DB" = 'postgresql' ]; then DB_CONFIG='-DRODBC_TEST_CONN_STR="Driver=PostgreSQL Unicode;User=postgres;Database=rodbc_test;"'; fi
- mkdir build && cd build
- cmake -G Ninja "-DBOOST_ROOT=$HOME/boost-1.58.0" "$DB_CONFIG" ..
- ninja
- ctest -V