-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
210 lines (198 loc) · 5.22 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
201
202
203
204
205
206
207
208
209
210
#
# This file is part of the Off-the-Record Next Generation Messaging
# library (libotr-ng).
#
# Copyright (C) 2016-2019, the libotr-ng contributors.
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 2.1 of the License, or
# (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
#
language: c
cache:
directories:
- .deps
common_sources: &all_sources
- ubuntu-toolchain-r-test
addons:
apt:
sources:
- *all_sources
packages:
- lcov
- valgrind
matrix:
fast_finish: true
include:
- os: linux
dist: trusty
compiler: clang
env: T=normal
- os: linux
dist: trusty
compiler: gcc
env: T=normal
- os: linux
dist: xenial
compiler: clang
env: T=xenial
- os: linux
dist: xenial
compiler: gcc
env: T=xenial
- os: osx
compiler: clang
osx_image: xcode8.3
env: T=normal
- os: linux
compiler: gcc
dist: xenial
env: T=coverage
- os: linux
compiler: gcc
dist: xenial
env: T=profile
- os: linux
dist: trusty
compiler: clang
env: T=style
- os: linux
compiler: gcc
dist: trusty
env: T=full-valgrind-checks
- os: linux
dist: trusty
compiler: clang
env: T=sanitizer
- os: linux
compiler: gcc
dist: xenial
env: T=ctgrind
- os: linux
compiler: gcc
dist: xenial
- os: linux
dist: trusty
compiler: gcc
env: T=32bit
allow_failures:
- os: osx
compiler: clang
env: T=normal
- os: linux
compiler: gcc
dist: xenial
env: T=ctgrind
sudo: required
before_install:
- $CC --version
- which $CC
- export CC=`which $CC`
# Update the repo
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew update; fi
- |
if [ $TRAVIS_OS_NAME == 'linux' ]; then
sudo apt-get update --quiet --assume-yes
fi
# Dependencies
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew cleanup; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew install curl && brew install glib; fi
- if [[ "$T" == "splint" ]]; then sudo apt-get install splint --quiet --assume-yes; fi
- if [[ "$T" = "style" ]]; then sudo apt-get install clang-format-3.5 clang-tidy-3.9 --quiet --assume-yes; fi
- if [[ "$T" = "32bit" ]]; then sudo apt-get install gcc-multilib --quiet --assume-yes; fi
before_script:
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
brew install libgcrypt || brew outdated libgcrypt || brew upgrade libgcrypt &&
brew install libsodium || brew outdated libsodium || brew upgrade libsodium;
fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo apt-get install libgcrypt20-dev; fi
- ./travis_before_script.sh
- valgrind --version
- if [[ "$T" = "32bit" ]]; then export CLAFGS="-m32"; fi
script:
- export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}
- export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH}"
- |
if [ "$T" = "coverage" ]; then
./autogen.sh
./configure --disable-shared --enable-code-coverage
make -j
make -j check
make coverage-check
fi
- |
if [ "$T" = "profile" ]; then
./autogen.sh
./configure --disable-shared --enable-gprof
make -j
make -j check
make profile
fi
- |
if [ "$T" = "full-valgrind-checks" ]; then
./autogen.sh
./configure --enable-valgrind
make -j
make -j check
make check-valgrind
fi
- |
if [ "$T" = "normal" ]; then
./autogen.sh
./configure --disable-shared
make -j
make -j check
make ci
fi
- |
if [ "$T" = "xenial" ]; then
./autogen.sh
./configure --disable-shared
make -j
make -j check
make test
fi
- |
if [ "$T" = "style" ]; then
./autogen.sh
./configure --disable-shared
make code-style-doctor code-check
fi
- |
if [ "$T" = "ctgrind" ]; then
./autogen.sh
./configure --with-ctgrind
make -j
make -j check
make ci
fi
- |
if [ "$T" = "sanitizer" ]; then
./autogen.sh
./configure --with-sanitizers=address,undefined,integer
export LSAN_OPTIONS=suppressions=lsan.supp
make -j
make -j check
make test
fi
- |
if [ "$T" = "splint" ]; then
./autogen.sh
./configure
make splint
fi
- |
if [ "$T" = "32bit" ]; then
./autogen.sh
./configure --disable-shared
make ci
fi