forked from bingmann/sqlplot-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (36 loc) · 1.92 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
language: cpp
branches:
only:
- master
env:
global:
- CMAKE_ARGS_ALL="-DBUILD_EXAMPLES=ON -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/share/postgresql/"
matrix:
# gcc builds
- CMAKE_CC="gcc" CMAKE_CXX="g++" CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Debug" DB="sqlite"
- CMAKE_CC="gcc" CMAKE_CXX="g++" CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release" DB="sqlite"
# clang builds
- CMAKE_CC="clang" CMAKE_CXX="clang++" CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Debug" DB="sqlite"
- CMAKE_CC="clang" CMAKE_CXX="clang++" CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release" DB="sqlite"
# gcc builds
- CMAKE_CC="gcc" CMAKE_CXX="g++" CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Debug" DB="postgresql"
- CMAKE_CC="gcc" CMAKE_CXX="g++" CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release" DB="postgresql"
# clang builds
- CMAKE_CC="clang" CMAKE_CXX="clang++" CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Debug" DB="postgresql"
- CMAKE_CC="clang" CMAKE_CXX="clang++" CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release" DB="postgresql"
# gcc builds
- CMAKE_CC="gcc" CMAKE_CXX="g++" CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Debug" DB="mysql"
- CMAKE_CC="gcc" CMAKE_CXX="g++" CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release" DB="mysql"
# clang builds
- CMAKE_CC="clang" CMAKE_CXX="clang++" CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Debug" DB="mysql"
- CMAKE_CC="clang" CMAKE_CXX="clang++" CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release" DB="mysql"
install:
- sudo apt-get -qq update
- sudo apt-get install libboost-all-dev
- if [ "$DB" == "postgresql" ]; then sudo apt-get install libpq-dev; fi
before_script:
- mkdir build && cd build && cmake -DCMAKE_C_COMPILER=$CMAKE_CC -DCMAKE_CXX_COMPILER=$CMAKE_CXX $CMAKE_ARGS $CMAKE_ARGS_ALL -DTEST_DATABASE=$DB ..
- if [ "$DB" == "postgresql" ]; then psql -c "CREATE DATABASE $USER;" -U postgres; fi
- if [ "$DB" == "mysql" ]; then mysql -e "CREATE DATABASE test;"; fi
script:
- make -j4 && ctest -V