forked from rbock/sqlpp11-connector-mysql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
74 lines (63 loc) · 1.34 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
language: cpp
os:
- linux
- osx
sudo: required
dist: trusty
services:
- mysql
addons:
apt:
packages:
#- mysql-server-5.6
#- mysql-client-core-5.6
#- mysql-client-5.6
- libboost-dev
compiler:
- clang
- gcc
env:
- CONFIG=Release
#- CONFIG=Debug
notifications:
email:
on_success: change
on_failure: always
install:
- pwd
- PROJECT_DIR="$PWD"
- BRANCH=`git rev-parse --abbrev-ref HEAD`
- cd ..
- pwd
- git clone https://github.com/HowardHinnant/date
- cd date
- git checkout tags/v2.4
- cd ..
- git clone https://github.com/rbock/sqlpp11
- if [ "$BRANCH" != "master" ]; then
cd sqlpp11
&& git checkout develop
&& cd ..
;
fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew update
&& brew install mysql
&& brew services start mysql
;
fi
- mysql --version
- (while ! mysqladmin -u root status ; do sleep 1; done) # wait for mysql to start
- mysqladmin -u root create sqlpp_mysql
- cd "$PROJECT_DIR"
before_script:
- mkdir build
- cd build
- if [[ "$CXX" = "g++" && "$CONFIG" = "Debug" && "$TRAVIS_OS_NAME" = "linux" ]]; then export CXXFLAGS="--coverage"; fi
- cmake .. -DCMAKE_BUILD_TYPE=$CONFIG
script:
- make VERBOSE=1
- cmake --build . --config $CONFIG
- ctest --output-on-failure
after_script:
- ../coveralls