forked from nanodbc/nanodbc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
200 lines (179 loc) · 6.29 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
dist: trusty
sudo: required
language: cpp
branches:
only:
- master
- latest
- release
- coverity_scan
git:
depth: 10
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/92612206d50703891604
on_success: always # default: always
on_failure: always # default: always
on_start: always # default: never
on_cancel: always # default: always
on_error: always # default: always
env:
global:
- ENABLE_COVERAGE=ON
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "GSaK+tRRP/6Xe6D/gvr+368BvUUK/N4+ZzL0RugvHMVKZf+zv3m9foRKFrt4LnuEpmXmnJhPZl0zbYhDKdOJYuVlXss0QS5LgPenIDT4TQSwkXB2oC6/8/1GWFsHorLECe9EZ+LWmfzuMt9R/Yc/kJVxfEfj+XL/A3MivzNrw4oObGQqNGVA5WMyk23r86AnyB+Nkq7TGnNj1thR/LEvdiH0pgZF7QBdbtB1UFk9OeAX/mtownp8jWD/vi3Luh/z+C/rClARGVO91y3DTtgYK7v+akAB92y3qKNOmeQhkQ2DKz+hVeDn/+X4FTw7KfU0/dccbR2MoWCMKS0owMEMSlsAlp5ePsaJjTg7meTL9vpTv9BGk3788/IMvkFowjOle+StHQoXLOPeoi+dx1BvV5suaXHxGm5hM79Yf+HRDzxUJ6CPCKYvrNFMr6FSEcbUHRJpfkRUSkSrBFr3qcfomoK7BrqUHP+D8i4DFrfhk9vEuxWaKayCwfxCkajJ7UgBcR9E4GS9s5Htif61IFsvRFHpbmtHU1q55i8zu6w8ig/yYbehAnx7TbNQgdFfzpG/rv7w7F6Rt1ONy2HoE7eyV5mK5VcHE8NREJjGdgdp8rgqKQggsl/bpfxLNYsTeuSKR1eu2jaaX87yvsUfUQWYyJpltR0KsjW3cYEzCbTZJ30="
ref:
sources: &sources
- ubuntu-toolchain-r-test
packages: &packages
- clang-format-3.8
- cmake
- cmake-data
- g++-5
- lcov
- libboost-locale-dev
- libmyodbc
- libsqliteodbc
- mysql-client-5.6
- odbc-postgresql
- unixodbc
- unixodbc-dev
sqlite: &sqlite
apt:
sources: *sources
packages: *packages
compiler: gcc
os: linux
mysql: &mysql
mysql: "5.6"
apt:
sources: *sources
packages: *packages
compiler: gcc
os: linux
postgresql: &postgresql
postgresql: "9.6"
apt:
sources: *sources
packages: *packages
compiler: gcc
os: linux
vertica: &vertica
apt:
sources: *sources
packages: *packages
compiler: gcc
os: linux
matrix:
include:
- env: CLANGFORMAT=ON
compiler: gcc
os: linux
addons:
apt:
sources: *sources
packages:
- clang-format-3.8
# with default CMake configuration
- env: DB=sqlite
addons: *sqlite
- env: DB=postgresql
addons: *postgresql
- env: DB=mysql
addons: *mysql
# with Unicode
- env: DB=sqlite ENABLE_UNICODE=ON
addons: *sqlite
- env: DB=postgresql ENABLE_UNICODE=ON
addons: *postgresql
- env: DB=mysql ENABLE_UNICODE=ON
addons: *mysql
# with Boost
- env: DB=sqlite ENABLE_BOOST=ON
addons: *sqlite
- env: DB=postgresql ENABLE_BOOST=ON
addons: *postgresql
- env: DB=mysql ENABLE_BOOST=ON
addons: *mysql
# with Unicode, with Boost
- env: DB=sqlite ENABLE_UNICODE=ON ENABLE_BOOST=ON
addons: *sqlite
- env: DB=postgresql ENABLE_UNICODE=ON ENABLE_BOOST=ON
addons: *postgresql
- env: DB=mysql ENABLE_UNICODE=ON ENABLE_BOOST=ON
addons: *mysql
# without async features
- env: DB=sqlite DISABLE_ASYNC=ON
addons: *sqlite
- env: DB=postgresql DISABLE_ASYNC=ON
addons: *postgresql
- env: DB=mysql DISABLE_ASYNC=ON
addons: *mysql
# without libc++
- env: DB=sqlite DISABLE_LIBCXX=ON
addons: *sqlite
- env: DB=postgresql DISABLE_LIBCXX=ON
addons: *postgresql
- env: DB=mysql DISABLE_LIBCXX=ON
addons: *mysql
- env: DB=vertica
addons: *vertica
- env: DB=sqlite COVERITY=ON DISABLE_LIBCXX=ON DISABLE_EXAMPLES=OFF ENABLE_COVERAGE=OFF
compiler: gcc
os: linux
addons:
apt:
sources: *sources
packages: *packages
coverity_scan:
project:
name: "nanodbc/nanodbc"
description: "A small C++ wrapper for ODBC"
notification_email: [email protected]
build_command_prepend: mkdir -p build.coverity && pushd build.coverity && cmake -DCMAKE_BUILD_TYPE=Debug .. && popd
build_command: cmake --build ./build.coverity
branch_pattern: coverity_scan
- compiler: clang
env: DB=sqlite ENABLE_COVERAGE=OFF
os: osx
osx_image: xcode8.3
- compiler: clang
env: DB=sqlite ENABLE_BOOST=ON ENABLE_COVERAGE=OFF
os: osx
osx_image: xcode8.3
allow_failures:
- os: osx
- env: DB=sqlite ENABLE_UNICODE=ON
- env: DB=sqlite ENABLE_UNICODE=ON ENABLE_BOOST=ON
- env: DB=vertica
# before_install runs after matrix.addons.apt installation targets in the matrix
before_install:
- if [[ "$COVERITY" == "ON" ]]; then echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca- ; fi
# Skip build if the commit message contains [skip travis] or [travis skip]
# https://github.com/travis-ci/travis-ci/issues/5032
- >
echo "$TRAVIS_COMMIT_MESSAGE" | grep -E '\[(skip travis|travis skip)\]'
&& echo "[skip travis] has been found, exiting."
&& exit 0 || true
- if [[ -f ${TRAVIS_BUILD_DIR}/utility/ci/travis/before_install.$TRAVIS_OS_NAME.sh ]]; then travis_retry ${TRAVIS_BUILD_DIR}/utility/ci/travis/before_install.$TRAVIS_OS_NAME.sh; fi
- if [[ -f ${TRAVIS_BUILD_DIR}/utility/ci/travis/before_install.$DB.sh ]]; then travis_retry ${TRAVIS_BUILD_DIR}/utility/ci/travis/before_install.$DB.sh; fi
before_script:
- if [[ -f ${TRAVIS_BUILD_DIR}/utility/ci/travis/before_script.$DB.sh ]]; then source ${TRAVIS_BUILD_DIR}/utility/ci/travis/before_script.$DB.sh; fi
- if [[ -f /etc/odbcinst.ini ]]; then export ODBCSYSINI=/etc; fi
- export ODBCINI=${HOME}/.odbc.ini
- odbcinst -j
- if [[ -f "$ODBCSYSINI/odbcinst.ini" ]]; then odbcinst -q -d; fi
- if [[ -s "$ODBCINI" ]]; then odbcinst -q -s; fi
script:
- travis_retry ${TRAVIS_BUILD_DIR}/utility/ci/travis/script.sh
after_success:
- |
if [[ "${ENABLE_COVERAGE}" == "ON" ]]; then
cd ${TRAVIS_BUILD_DIR}
lcov --directory . --capture --output-file coverage.info # capture coverage info
lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system
lcov --list coverage.info # debug info
bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
fi