-
Notifications
You must be signed in to change notification settings - Fork 40
/
.travis.yml
61 lines (53 loc) · 1.88 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
language: cpp
dist: trusty
matrix:
include:
- language: cpp
dist: trusty
sudo: required
addons:
mariadb: '10.0'
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
- libgtest-dev
script:
# first build mariadb c connector
- curl -o connector.tar.gz https://downloads.mariadb.com/Connectors/c/connector-c-3.0.4/mariadb-connector-c-3.0.4-src.tar.gz && tar xf connector.tar.gz && cd mariadb-connector-c-3.0.4-src/
- mkdir build && cd build
- cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/ && make libmariadb && sudo make install
- cd ../../
# now build mariadbpp
- mkdir build && cd build
- cmake ../ -DMARIADBPP_DOC=ON -DMARIADBPP_TEST=ON -DGTEST_SRC_DIR=/usr/src/gtest/ -DCMAKE_BUILD_TYPE=Debug -DTEST_USERNAME=$MYSQL_USER -DTEST_PASSWORD=$MYSQL_PASSWORD -DTEST_PORT=3306 -DTEST_DATABASE=$MYSQL_DATABASE && cmake --build .
- test/mariadbpp_tests
env:
- LABEL="Linux MariaDB Connector C"
- language: cpp
dist: trusty
addons:
mariadb: '10.0'
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
- libmariadbclient-dev
- libgtest-dev
env:
- LABEL="Linux libmariadbclient-dev"
env:
global:
- MAKEFLAGS="-j 2"
- MYSQL_DATABASE="mariadbpp_tests"
- MYSQL_USER: "travis"
- MYSQL_PASSWORD: ""
before_install:
- export CXX="g++-5" CC="gcc-5"
- mysql -e 'CREATE DATABASE IF NOT EXISTS mariadbpp_tests;'
script:
- mkdir build && cd build
- cmake ../ -DMARIADBPP_DOC=ON -DMARIADBPP_TEST=ON -DGTEST_SRC_DIR=/usr/src/gtest/ -DCMAKE_BUILD_TYPE=Debug -DTEST_USERNAME=$MYSQL_USER -DTEST_PASSWORD=$MYSQL_PASSWORD -DTEST_PORT=3306 -DTEST_DATABASE=$MYSQL_DATABASE && cmake --build .
- test/mariadbpp_tests