forked from libyal/libpff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
241 lines (241 loc) · 7.28 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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
language: c
env:
global:
# Encrypted COVERITY_SCAN_TOKEN
- secure: "p17X8wFVnUeU3oGAUeUpOJknniwIkliHaLLeHWNHrX1Op794acHEz8wVyuVHLxf5B1Irm8R4UXslzM4y/qAPIB03uaeiam9JJXLVXvKtalMxn856hx9+4TWie/HWQjoKQp4zEgUbLrvSkSW2NYUkFjnY3BvotoqyRW3BlYPonw0="
matrix:
include:
- name: "Coverity"
env:
- CONFIGURE_OPTIONS=""
- TARGET="coverity"
compiler: clang
os: linux
dist: xenial
sudo: required
group: edge
addons:
coverity_scan:
project:
name: "libyal/libpff"
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command_prepend: "./synclibs.sh && ./autogen.sh && ./configure"
build_command: "make -j4"
branch_pattern: master
- name: "Linux with clang"
env:
- CONFIGURE_OPTIONS=""
- CFLAGS="--coverage"
- LDFLAGS="--coverage"
- TARGET="linux-clang"
compiler: clang
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc"
env:
- CONFIGURE_OPTIONS=""
- CFLAGS="--coverage"
- LDFLAGS="--coverage"
- TARGET="linux-gcc"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc and wide character type (wchar_t) support"
env:
- CONFIGURE_OPTIONS="--enable-wide-character-type"
- CFLAGS="--coverage"
- LDFLAGS="--coverage"
- TARGET="linux-gcc-wide-character-type"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc without optimization"
env:
- CONFIGURE_OPTIONS="--enable-shared=no --enable-wide-character-type"
- CFLAGS="--coverage -O0"
- CPPFLAGS="-DOPTIMIZATION_DISABLED"
- LDFLAGS="--coverage"
- TARGET="linux-gcc-no-optimization"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc and Python module"
env:
- CONFIGURE_OPTIONS="--enable-python"
- CFLAGS="--coverage"
- LDFLAGS="--coverage"
- TARGET="linux-gcc-python"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc and Python 2 module"
env:
- CONFIGURE_OPTIONS="--enable-python2"
- CFLAGS="--coverage"
- LDFLAGS="--coverage"
- PYTHON_VERSION=2
- TARGET="linux-gcc-python2"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc and Python 3 module"
env:
- CONFIGURE_OPTIONS="--enable-python3"
- CFLAGS="--coverage"
- LDFLAGS="--coverage"
- PYTHON_VERSION=3
- TARGET="linux-gcc-python3"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc and Python 2 module (setup.py)"
env:
- TARGET="linux-gcc-python-setup-py"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
python: 2.7
- name: "Linux with gcc and Python 3 module (setup.py)"
env:
- TARGET="linux-gcc-python-setup-py"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
python: 3.4
- name: "Linux with gcc and shared libraries"
env:
- CONFIGURE_OPTIONS=""
- CFLAGS="--coverage"
- LDFLAGS="--coverage"
- TARGET="linux-gcc-shared"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc, shared libraries and wide character type (wchar_t) support"
env:
- CONFIGURE_OPTIONS="--enable-wide-character-type"
- CFLAGS="--coverage"
- LDFLAGS="--coverage"
- TARGET="linux-gcc-shared-wide-character-type"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc and static executables support"
env:
- CONFIGURE_OPTIONS="--enable-static-executables"
- CFLAGS="--coverage"
- LDFLAGS="--coverage"
- TARGET="linux-gcc-static-executables"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Mac OS with clang"
env:
- CONFIGURE_OPTIONS=""
- TARGET="macos-clang"
compiler: clang
os: osx
osx_image: xcode8.3
- name: "Mac OS with gcc"
env:
- CONFIGURE_OPTIONS=""
- TARGET="macos-gcc"
compiler: gcc
os: osx
osx_image: xcode8.3
- name: "Mac OS with gcc and Python module"
env:
- CONFIGURE_OPTIONS="--enable-python"
- TARGET="macos-gcc-python"
compiler: gcc
os: osx
osx_image: xcode8.3
- name: "Mac OS with gcc and Python 2 module"
env:
- CONFIGURE_OPTIONS="--enable-python2"
- PYTHON_VERSION=2
- TARGET="macos-gcc-python2"
compiler: gcc
os: osx
osx_image: xcode8.3
- name: "Mac OS with gcc and Python 2 module (setup.py)"
env:
- TARGET="macos-gcc-python-setup-py"
compiler: gcc
os: osx
osx_image: xcode8.3
- name: "Mac OS gcc and pkgbuild"
env:
- CONFIGURE_OPTIONS="--disable-dependency-tracking --prefix=/usr/local --enable-python --with-pyprefix"
- TARGET="macos-gcc-pkgbuild"
compiler: gcc
os: osx
osx_image: xcode8.3
before_install:
- if test ${TRAVIS_OS_NAME} = "linux"; then
sudo apt-get update && sudo apt-mark hold mysql-server-5.7 && sudo apt-get --fix-missing -o Dpkg::Options::="--force-confold" upgrade -y --allow-unauthenticated && sudo apt-get install -y autopoint zlib1g-dev;
elif test ${TRAVIS_OS_NAME} = "osx"; then
brew update && brew install gettext gnu-sed && brew link --force gettext;
fi
- if test ${TARGET} = "coverity"; 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
install:
- if test ${TRAVIS_OS_NAME} = "osx"; then
export SED="/usr/local/bin/gsed";
fi
- ./synclibs.sh --use-head && ./autogen.sh
- if test ${TARGET} = "linux-gcc-shared" || test ${TARGET} = "linux-gcc-shared-wide-character-type"; then
./configure > /dev/null && make > /dev/null && ./syncsharedlibs.sh --use-head;
fi
- if test -x "synctestdata.sh"; then
./synctestdata.sh;
fi
script:
- if test ${TRAVIS_OS_NAME} = "linux"; then
export PATH=$(echo $PATH | tr ":" "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s/::/:/g");
fi
- if test ${TARGET} = "linux-gcc-python-setup-py" || test ${TARGET} = "macos-gcc-python-setup-py"; then
./configure ${CONFIGURE_OPTIONS} && make > /dev/null && python ./setup.py build;
elif test ${TARGET} != "coverity"; then
./configure ${CONFIGURE_OPTIONS} && make > /dev/null && make check CHECK_WITH_STDERR=1;
if test $? -ne 0 && test -f tests/test-suite.log; then
cat tests/test-suite.log;
fi;
if test ${TARGET} = "macos-gcc-pkgbuild"; then
VERSION=`sed '5!d; s/^ \[//;s/\],$//' configure.ac` &&
make install DESTDIR=${PWD}/osx-pkg &&
mkdir -p ${PWD}/osx-pkg/usr/share/doc/libpff &&
cp AUTHORS COPYING NEWS README ${PWD}/osx-pkg/usr/share/doc/libpff &&
pkgbuild --root osx-pkg --identifier com.github.libyal.libpff --version ${VERSION} --ownership recommended ../libpff-${VERSION}.pkg;
fi
fi
after_success:
- if test ${TARGET} = "linux-gcc-no-optimization"; then
curl -o codecov.sh -s https://codecov.io/bash && sed 's/ -execdir / -exec /' -i ./codecov.sh && /bin/bash ./codecov.sh -n ${TARGET} -y .codecov.yml;
fi