forked from gammu/gammu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
70 lines (70 loc) · 2.03 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
os:
- linux
- osx
language: cpp
compiler:
- gcc
- clang
env:
matrix:
- ARGS=""
global:
- CTEST_OUTPUT_ON_FAILURE=1
- TESTARGS="-DMYSQL_TESTING=on -DPSQL_TESTING=ON -DMYSQL_USER=root -DPSQL_USER=postgres -DPSQL_PASSWORD= -DODBC_TESTING=ON -DODBC_DSN=ODBCTest"
before_script:
- if [ -f /usr/share/libmyodbc/odbcinst.ini ] ; then cp /usr/share/libmyodbc/odbcinst.ini ~/.odbcinst.ini ; fi
- cp tests/odbc.ini ~/.odbc.ini
- if [ $TRAVIS_OS_NAME = linux ] ; then if [ $CC = clang ] ; then export CXX=clang++-3.8 ; export CC=clang-3.8 ; else export CXX=g++-6 ; export CC=gcc-6 ; fi ; fi
- if [ $TRAVIS_OS_NAME = linux ] ; then psql -c 'create database smsd;' -U postgres ; fi
- if [ $TRAVIS_OS_NAME = linux ] ; then mysql -uroot -e "create database smsd;" ; fi
- if [ $TRAVIS_OS_NAME = linux ] ; then mysql -uroot -e "SET PASSWORD = PASSWORD('smsd')" ; fi
- if [ $TRAVIS_OS_NAME != linux ] ; then export TESTARGS= ; fi
- mkdir _build
- cd _build
- ln -s ../codecov.yml .
script:
- cmake .. -DCMAKE_C_COMPILER=$CC -DENABLE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Continuous -DONLINE_TESTING=ON $TESTARGS $ARGS
- make
- make test
after_success:
- make gcov
- bash <(curl -s https://codecov.io/bash) -X gcov -F $TRAVIS_OS_NAME
# use docker based faster build
sudo: false
# install build dependencies and enable Coverity scan
addons:
apt:
sources:
- george-edison55-precise-backports # cmake 3.2.3 / doxygen 1.8.3
- llvm-toolchain-precise-3.8 # llvm 3.8
- ubuntu-toolchain-r-test # gcc backports
packages:
- libbluetooth-dev
- libusb-1.0-0-dev
- libgudev-1.0-dev
- unixodbc-dev
- libdbi-dev
- libdbd-sqlite3
- libdbd-mysql
- libdbd-pgsql
- cmake
- cmake-data
- clang-3.8
- llvm-3.8
- gcc-6
- g++-6
- libmyodbc
matrix:
exclude:
- os: osx
compiler: gcc
include:
- os: linux
compiler: gcc
env: ARGS="-DENABLE_GETOPT=OFF"
- os: linux
compiler: gcc
env: ARGS="-DUSE_WCHAR_T=OFF"
services:
- mysql
- postgresql