]>
Commit | Line | Data |
---|---|---|
c9a34303 | 1 | #!/bin/bash |
d151cd28 TB |
2 | # Build script for Travis CI |
3 | ||
e5d52774 TB |
4 | build_botan() |
5 | { | |
1bbb736e | 6 | # same revision used in the build recipe of the testing environment |
3be430cc | 7 | BOTAN_REV=0881f2c33ff7 # 2.13.0 + amalgamation patch |
24af02b0 TB |
8 | BOTAN_DIR=$TRAVIS_BUILD_DIR/../botan |
9 | ||
d4068a1d TB |
10 | if test -d "$BOTAN_DIR"; then |
11 | return | |
12 | fi | |
13 | ||
2a58030b TB |
14 | echo "$ build_botan()" |
15 | ||
e5d52774 TB |
16 | # if the leak detective is enabled we have to disable threading support |
17 | # (used for std::async) as that causes invalid frees somehow, the | |
18 | # locking allocator causes a static leak via the first function that | |
19 | # references it (e.g. crypter or hasher), so we disable that too | |
20 | if test "$LEAK_DETECTIVE" = "yes"; then | |
21 | BOTAN_CONFIG="--without-os-features=threads | |
22 | --disable-modules=locking_allocator" | |
23 | fi | |
24 | # disable some larger modules we don't need for the tests | |
25 | BOTAN_CONFIG="$BOTAN_CONFIG --disable-modules=pkcs11,tls,x509,xmss" | |
1bbb736e TB |
26 | |
27 | git clone https://github.com/randombit/botan.git $BOTAN_DIR && | |
24af02b0 | 28 | cd $BOTAN_DIR && |
bbe72f97 | 29 | git checkout -qf $BOTAN_REV && |
24af02b0 | 30 | python ./configure.py --amalgamation $BOTAN_CONFIG && |
e5d52774 TB |
31 | make -j4 libs >/dev/null && |
32 | sudo make install >/dev/null && | |
33 | sudo ldconfig || exit $? | |
24af02b0 | 34 | cd - |
e5d52774 TB |
35 | } |
36 | ||
d50bb81c TB |
37 | build_wolfssl() |
38 | { | |
3be430cc | 39 | WOLFSSL_REV=87859f9e810b # v4.3.0-stable + IBM Z patch |
d50bb81c TB |
40 | WOLFSSL_DIR=$TRAVIS_BUILD_DIR/../wolfssl |
41 | ||
42 | if test -d "$WOLFSSL_DIR"; then | |
43 | return | |
44 | fi | |
45 | ||
46 | echo "$ build_wolfssl()" | |
47 | ||
48 | WOLFSSL_CFLAGS="-DWOLFSSL_PUBLIC_MP -DWOLFSSL_DES_ECB" | |
49 | WOLFSSL_CONFIG="--enable-keygen --enable-rsapss --enable-aesccm | |
50 | --enable-aesctr --enable-des3 --enable-camellia | |
51 | --enable-curve25519 --enable-ed25519" | |
52 | ||
53 | git clone https://github.com/wolfSSL/wolfssl.git $WOLFSSL_DIR && | |
54 | cd $WOLFSSL_DIR && | |
55 | git checkout -qf $WOLFSSL_REV && | |
56 | ./autogen.sh && | |
57 | ./configure C_EXTRA_FLAGS="$WOLFSSL_CFLAGS" $WOLFSSL_CONFIG && | |
58 | make -j4 >/dev/null && | |
59 | sudo make install >/dev/null && | |
60 | sudo ldconfig || exit $? | |
61 | cd - | |
62 | } | |
63 | ||
7b46089e TB |
64 | build_tss2() |
65 | { | |
936d101d | 66 | TSS2_REV=2.3.1 |
7b46089e TB |
67 | TSS2_PKG=tpm2-tss-$TSS2_REV |
68 | TSS2_DIR=$TRAVIS_BUILD_DIR/../$TSS2_PKG | |
69 | TSS2_SRC=https://github.com/tpm2-software/tpm2-tss/releases/download/$TSS2_REV/$TSS2_PKG.tar.gz | |
70 | ||
71 | if test -d "$TSS2_DIR"; then | |
72 | return | |
73 | fi | |
74 | ||
2a58030b TB |
75 | echo "$ build_tss2()" |
76 | ||
7b46089e TB |
77 | curl -L $TSS2_SRC | tar xz -C $TRAVIS_BUILD_DIR/.. && |
78 | cd $TSS2_DIR && | |
936d101d | 79 | ./configure --disable-doxygen-doc && |
248f3491 TB |
80 | make -j4 >/dev/null && |
81 | sudo make install >/dev/null && | |
7b46089e TB |
82 | sudo ldconfig || exit $? |
83 | cd - | |
84 | } | |
85 | ||
d151cd28 TB |
86 | if test -z $TRAVIS_BUILD_DIR; then |
87 | TRAVIS_BUILD_DIR=$PWD | |
88 | fi | |
89 | ||
90 | cd $TRAVIS_BUILD_DIR | |
91 | ||
92 | TARGET=check | |
93 | ||
60a0bb67 TB |
94 | DEPS="libgmp-dev" |
95 | ||
95e67e8d MW |
96 | CFLAGS="-g -O2 -Wall -Wno-format -Wno-format-security -Wno-pointer-sign -Werror" |
97 | ||
d151cd28 TB |
98 | case "$TEST" in |
99 | default) | |
316aa4b4 TB |
100 | # should be the default, but lets make sure |
101 | CONFIG="--with-printf-hooks=glibc" | |
d151cd28 | 102 | ;; |
2a58030b TB |
103 | openssl*) |
104 | CONFIG="--disable-defaults --enable-pki --enable-openssl --enable-pem" | |
885c05b0 | 105 | export TESTS_PLUGINS="test-vectors pem openssl!" |
60a0bb67 | 106 | DEPS="libssl-dev" |
d151cd28 TB |
107 | ;; |
108 | gcrypt) | |
3986c1e3 | 109 | CONFIG="--disable-defaults --enable-pki --enable-gcrypt --enable-pkcs1" |
885c05b0 | 110 | export TESTS_PLUGINS="test-vectors pkcs1 gcrypt!" |
60a0bb67 | 111 | DEPS="libgcrypt11-dev" |
d151cd28 | 112 | ;; |
9ee23d5e | 113 | botan) |
4bcc4bac | 114 | CONFIG="--disable-defaults --enable-pki --enable-botan --enable-pem" |
885c05b0 | 115 | export TESTS_PLUGINS="test-vectors pem botan!" |
9ee23d5e TB |
116 | # we can't use the old package that comes with Ubuntu so we build from |
117 | # the current master until 2.8.0 is released and then probably switch to | |
118 | # that unless we need newer features (at least 2.7.0 plus PKCS#1 patch is | |
119 | # currently required) | |
120 | DEPS="" | |
121 | if test "$1" = "deps"; then | |
e5d52774 | 122 | build_botan |
9ee23d5e TB |
123 | fi |
124 | ;; | |
d50bb81c TB |
125 | wolfssl) |
126 | CONFIG="--disable-defaults --enable-pki --enable-wolfssl --enable-pem" | |
885c05b0 | 127 | export TESTS_PLUGINS="test-vectors pem wolfssl!" |
d50bb81c TB |
128 | # build with custom options to enable all the features the plugin supports |
129 | DEPS="" | |
130 | if test "$1" = "deps"; then | |
131 | build_wolfssl | |
132 | fi | |
133 | ;; | |
316aa4b4 TB |
134 | printf-builtin) |
135 | CONFIG="--with-printf-hooks=builtin" | |
136 | ;; | |
e2d8833f | 137 | all|coverage|sonarcloud) |
d151cd28 | 138 | CONFIG="--enable-all --disable-android-dns --disable-android-log |
66c4735f | 139 | --disable-kernel-pfroute --disable-keychain |
157742be | 140 | --disable-lock-profiler --disable-padlock --disable-fuzzing |
e4fd163a | 141 | --disable-osx-attr --disable-tkm --disable-uci |
cfdab423 | 142 | --disable-soup --disable-unwind-backtraces |
4732e29a | 143 | --disable-svc --disable-dbghelp-backtraces --disable-socket-win |
c572401b | 144 | --disable-kernel-wfp --disable-kernel-iph --disable-winhttp" |
d151cd28 TB |
145 | # not enabled on the build server |
146 | CONFIG="$CONFIG --disable-af-alg" | |
3be430cc TB |
147 | if test "$TRAVIS_CPU_ARCH" != "amd64"; then |
148 | CONFIG="$CONFIG --disable-aesni --disable-rdrand" | |
149 | fi | |
42f7c989 TB |
150 | if test "$TEST" != "coverage"; then |
151 | CONFIG="$CONFIG --disable-coverage" | |
152 | else | |
153 | # not actually required but configure checks for it | |
154 | DEPS="$DEPS lcov" | |
155 | fi | |
60a0bb67 TB |
156 | DEPS="$DEPS libcurl4-gnutls-dev libsoup2.4-dev libunbound-dev libldns-dev |
157 | libmysqlclient-dev libsqlite3-dev clearsilver-dev libfcgi-dev | |
ed843063 | 158 | libpcsclite-dev libpam0g-dev binutils-dev libnm-dev libgcrypt20-dev |
393e39a1 | 159 | libjson-c-dev iptables-dev python-pip libtspi-dev libsystemd-dev" |
63529548 | 160 | PYDEPS="tox" |
e5d52774 TB |
161 | if test "$1" = "deps"; then |
162 | build_botan | |
d50bb81c | 163 | build_wolfssl |
7b46089e | 164 | build_tss2 |
e5d52774 | 165 | fi |
d151cd28 | 166 | ;; |
fd372e13 MW |
167 | win*) |
168 | CONFIG="--disable-defaults --enable-svc --enable-ikev2 | |
d930d184 MW |
169 | --enable-ikev1 --enable-static --enable-test-vectors --enable-nonce |
170 | --enable-constraints --enable-revocation --enable-pem --enable-pkcs1 | |
171 | --enable-pkcs8 --enable-x509 --enable-pubkey --enable-acert | |
172 | --enable-eap-tnc --enable-eap-ttls --enable-eap-identity | |
1da56773 | 173 | --enable-updown --enable-ext-auth --enable-libipsec |
d930d184 MW |
174 | --enable-tnccs-20 --enable-imc-attestation --enable-imv-attestation |
175 | --enable-imc-os --enable-imv-os --enable-tnc-imv --enable-tnc-imc | |
cfdab423 TB |
176 | --enable-pki --enable-swanctl --enable-socket-win |
177 | --enable-kernel-iph --enable-kernel-wfp --enable-winhttp" | |
6eb7dd11 TB |
178 | # no make check for Windows binaries unless we run on a windows host |
179 | if test "$APPVEYOR" != "True"; then | |
180 | TARGET= | |
8a4f1102 | 181 | CCACHE=ccache |
09662628 TB |
182 | else |
183 | CONFIG="$CONFIG --enable-openssl" | |
184 | CFLAGS="$CFLAGS -I/c/OpenSSL-$TEST/include" | |
185 | LDFLAGS="-L/c/OpenSSL-$TEST" | |
186 | export LDFLAGS | |
6eb7dd11 | 187 | fi |
d930d184 | 188 | CFLAGS="$CFLAGS -mno-ms-bitfields" |
94a69986 | 189 | DEPS="gcc-mingw-w64-base" |
fd372e13 MW |
190 | case "$TEST" in |
191 | win64) | |
cfdab423 | 192 | CONFIG="--host=x86_64-w64-mingw32 $CONFIG --enable-dbghelp-backtraces" |
94a69986 | 193 | DEPS="gcc-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-x86-64-dev $DEPS" |
8a4f1102 | 194 | CC="$CCACHE x86_64-w64-mingw32-gcc" |
fd372e13 MW |
195 | ;; |
196 | win32) | |
197 | CONFIG="--host=i686-w64-mingw32 $CONFIG" | |
cfdab423 | 198 | DEPS="gcc-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-i686-dev $DEPS" |
8a4f1102 | 199 | CC="$CCACHE i686-w64-mingw32-gcc" |
fd372e13 MW |
200 | ;; |
201 | esac | |
d930d184 | 202 | ;; |
e36b1e2e | 203 | osx) |
fd9edf7f TB |
204 | # this causes a false positive in ip-packet.c since Xcode 8.3 |
205 | CFLAGS="$CFLAGS -Wno-address-of-packed-member" | |
e36b1e2e TB |
206 | # use the same options as in the Homebrew Formula |
207 | CONFIG="--disable-defaults --enable-charon --enable-cmd --enable-constraints | |
208 | --enable-curl --enable-eap-gtc --enable-eap-identity | |
209 | --enable-eap-md5 --enable-eap-mschapv2 --enable-ikev1 --enable-ikev2 | |
210 | --enable-kernel-libipsec --enable-kernel-pfkey | |
211 | --enable-kernel-pfroute --enable-nonce --enable-openssl | |
212 | --enable-osx-attr --enable-pem --enable-pgp --enable-pkcs1 | |
213 | --enable-pkcs8 --enable-pki --enable-pubkey --enable-revocation | |
214 | --enable-scepclient --enable-socket-default --enable-sshkey | |
215 | --enable-stroke --enable-swanctl --enable-unity --enable-updown | |
216 | --enable-x509 --enable-xauth-generic" | |
217 | DEPS="bison gettext openssl curl" | |
218 | BREW_PREFIX=$(brew --prefix) | |
219 | export PATH=$BREW_PREFIX/opt/bison/bin:$PATH | |
220 | export ACLOCAL_PATH=$BREW_PREFIX/opt/gettext/share/aclocal:$ACLOCAL_PATH | |
221 | for pkg in openssl curl | |
222 | do | |
8486b3b4 | 223 | PKG_CONFIG_PATH=$BREW_PREFIX/opt/$pkg/lib/pkgconfig:$PKG_CONFIG_PATH |
e36b1e2e TB |
224 | CPPFLAGS="-I$BREW_PREFIX/opt/$pkg/include $CPPFLAGS" |
225 | LDFLAGS="-L$BREW_PREFIX/opt/$pkg/lib $LDFLAGS" | |
226 | done | |
227 | export PKG_CONFIG_PATH | |
228 | export CPPFLAGS | |
229 | export LDFLAGS | |
230 | ;; | |
d6949b15 TB |
231 | freebsd) |
232 | # use the options of the FreeBSD port (including options), except smp, | |
233 | # which requires a patch but is deprecated anyway, only using the builtin | |
234 | # printf hooks | |
235 | CONFIG="--enable-kernel-pfkey --enable-kernel-pfroute --disable-scripts | |
236 | --disable-kernel-netlink --enable-openssl --enable-eap-identity | |
237 | --enable-eap-md5 --enable-eap-tls --enable-eap-mschapv2 | |
238 | --enable-eap-peap --enable-eap-ttls --enable-md4 --enable-blowfish | |
239 | --enable-addrblock --enable-whitelist --enable-cmd --enable-curl | |
240 | --enable-eap-aka --enable-eap-aka-3gpp2 --enable-eap-dynamic | |
241 | --enable-eap-radius --enable-eap-sim --enable-eap-sim-file | |
242 | --enable-gcm --enable-ipseckey --enable-kernel-libipsec | |
243 | --enable-load-tester --enable-ldap --enable-mediation | |
244 | --enable-mysql --enable-sqlite --enable-tpm --enable-unbound | |
245 | --enable-unity --enable-xauth-eap --enable-xauth-pam | |
246 | --with-printf-hooks=builtin --enable-attr-sql --enable-sql" | |
247 | DEPS="gmp openldap-client libxml2 mysql80-client sqlite3 unbound ldns" | |
248 | export GPERF=/usr/local/bin/gperf | |
249 | export LEX=/usr/local/bin/flex | |
250 | ;; | |
1ce2721d TB |
251 | fuzzing) |
252 | CFLAGS="$CFLAGS -DNO_CHECK_MEMWIPE" | |
508b3087 | 253 | CONFIG="--enable-fuzzing --enable-static --disable-shared --disable-scripts |
75181f48 | 254 | --enable-imc-test --enable-tnccs-20" |
1ce2721d TB |
255 | # don't run any of the unit tests |
256 | export TESTS_RUNNERS= | |
257 | # prepare corpora | |
258 | if test -z "$1"; then | |
259 | if test -z "$FUZZING_CORPORA"; then | |
260 | git clone --depth 1 https://github.com/strongswan/fuzzing-corpora.git fuzzing-corpora | |
261 | export FUZZING_CORPORA=$TRAVIS_BUILD_DIR/fuzzing-corpora | |
262 | fi | |
7421884d TB |
263 | # these are about the same as those on OSS-Fuzz (except for the |
264 | # symbolize options and strip_path_prefix) | |
265 | export ASAN_OPTIONS=redzone=16:handle_sigill=1:strict_string_check=1:\ | |
266 | allocator_release_to_os_interval_ms=500:strict_memcmp=1:detect_container_overflow=1:\ | |
267 | coverage=0:allocator_may_return_null=1:use_sigaltstack=1:detect_stack_use_after_return=1:\ | |
268 | alloc_dealloc_mismatch=0:detect_leaks=1:print_scariness=1:max_uar_stack_size_log=16:\ | |
269 | handle_abort=1:check_malloc_usable_size=0:quarantine_size_mb=10:detect_odr_violation=0:\ | |
270 | symbolize=1:handle_segv=1:fast_unwind_on_fatal=0:external_symbolizer_path=/usr/bin/llvm-symbolizer-3.5 | |
1ce2721d TB |
271 | fi |
272 | ;; | |
d151cd28 TB |
273 | dist) |
274 | TARGET=distcheck | |
275 | ;; | |
4e8f5a18 TB |
276 | apidoc) |
277 | DEPS="doxygen" | |
278 | CONFIG="--disable-defaults" | |
279 | TARGET=apidoc | |
280 | ;; | |
c9a34303 TB |
281 | lgtm) |
282 | DEPS="jq" | |
283 | ||
284 | if test -z "$1"; then | |
285 | # fall back to the parent of the latest commit (on new branches we might | |
286 | # not have a range, also on duplicate branches) | |
287 | base="${TRAVIS_COMMIT}^" | |
288 | if test -n "$TRAVIS_COMMIT_RANGE"; then | |
289 | base="${TRAVIS_COMMIT_RANGE%...*}" | |
290 | # after rebases, the first commit ID in the range might not be valid | |
291 | git rev-parse -q --verify $base | |
292 | if [ $? != 0 ]; then | |
293 | # this will always compare against master, while the range | |
294 | # otherwise only contains "new" commits | |
295 | base=$(git merge-base origin/master ${TRAVIS_COMMIT}) | |
296 | fi | |
297 | fi | |
298 | base=$(git rev-parse $base) | |
299 | project_id=1506185006272 | |
300 | ||
301 | echo "Starting code review for $TRAVIS_COMMIT (base $base) on lgtm.com" | |
302 | git diff --binary $base > lgtm.patch || exit $? | |
303 | curl -s -X POST --data-binary @lgtm.patch \ | |
304 | "https://lgtm.com/api/v1.0/codereviews/${project_id}?base=${base}&external-id=${TRAVIS_BUILD_NUMBER}" \ | |
305 | -H 'Content-Type: application/octet-stream' \ | |
306 | -H 'Accept: application/json' \ | |
307 | -H "Authorization: Bearer ${LGTM_TOKEN}" > lgtm.res || exit $? | |
308 | lgtm_check_url=$(jq -r '."task-result-url"' lgtm.res) | |
309 | if [ "$lgtm_check_url" == "null" ]; then | |
310 | cat lgtm.res | jq | |
311 | exit 1 | |
312 | fi | |
313 | lgtm_url=$(jq -r '."task-result"."results-url"' lgtm.res) | |
314 | echo "Progress and full results: ${lgtm_url}" | |
315 | ||
316 | echo -n "Waiting for completion: " | |
317 | lgtm_status=pending | |
318 | while [ "$lgtm_status" = "pending" ]; do | |
319 | sleep 15 | |
320 | curl -s -X GET "${lgtm_check_url}" \ | |
321 | -H 'Accept: application/json' \ | |
322 | -H "Authorization: Bearer ${LGTM_TOKEN}" > lgtm.res | |
323 | if [ $? != 0 ]; then | |
324 | echo -n "-" | |
325 | continue | |
326 | fi | |
327 | echo -n "." | |
328 | lgtm_status=$(jq -r '.status' lgtm.res) | |
329 | done | |
330 | echo "" | |
331 | ||
332 | if [ "$lgtm_status" != "success" ]; then | |
333 | lgtm_message=$(jq -r '.["status-message"]' lgtm.res) | |
334 | echo "Code review failed: ${lgtm_message}" | |
335 | exit 1 | |
336 | fi | |
337 | lgtm_new=$(jq -r '.languages[].new' lgtm.res | awk '{t+=$1} END {print t}') | |
338 | lgtm_fixed=$(jq -r '.languages[].fixed' lgtm.res | awk '{t+=$1} END {print t}') | |
339 | echo -n "Code review complete: " | |
340 | echo -e "\e[1;31m${lgtm_new}\e[0m new alerts, \e[1;32m${lgtm_fixed}\e[0m fixed" | |
341 | exit $lgtm_new | |
342 | fi | |
343 | ;; | |
d151cd28 TB |
344 | *) |
345 | echo "$0: unknown test $TEST" >&2 | |
346 | exit 1 | |
347 | ;; | |
348 | esac | |
349 | ||
60a0bb67 | 350 | if test "$1" = "deps"; then |
e36b1e2e TB |
351 | case "$TRAVIS_OS_NAME" in |
352 | linux) | |
353 | sudo apt-get update -qq && \ | |
354 | sudo apt-get install -qq bison flex gperf gettext $DEPS | |
355 | ;; | |
356 | osx) | |
357 | brew update && \ | |
358 | brew install $DEPS | |
359 | ;; | |
d6949b15 TB |
360 | freebsd) |
361 | pkg install -y automake autoconf libtool pkgconf && \ | |
362 | pkg install -y bison flex gperf gettext $DEPS | |
363 | ;; | |
e36b1e2e | 364 | esac |
60a0bb67 TB |
365 | exit $? |
366 | fi | |
367 | ||
75a84579 | 368 | if test "$1" = "pydeps"; then |
6ccfeeb1 | 369 | test -z "$PYDEPS" || pip -q install --user $PYDEPS |
75a84579 MW |
370 | exit $? |
371 | fi | |
372 | ||
d151cd28 | 373 | CONFIG="$CONFIG |
e36b1e2e | 374 | --disable-dependency-tracking |
d151cd28 TB |
375 | --enable-silent-rules |
376 | --enable-test-vectors | |
377 | --enable-monolithic=${MONOLITHIC-no} | |
378 | --enable-leak-detective=${LEAK_DETECTIVE-no}" | |
379 | ||
e36b1e2e TB |
380 | echo "$ ./autogen.sh" |
381 | ./autogen.sh || exit $? | |
4e8f5a18 TB |
382 | echo "$ CC=$CC CFLAGS=\"$CFLAGS\" ./configure $CONFIG" |
383 | CC="$CC" CFLAGS="$CFLAGS" ./configure $CONFIG || exit $? | |
384 | ||
385 | case "$TEST" in | |
386 | apidoc) | |
387 | exec 2>make.warnings | |
388 | ;; | |
389 | *) | |
390 | ;; | |
391 | esac | |
392 | ||
393 | echo "$ make $TARGET" | |
e2d8833f TB |
394 | case "$TEST" in |
395 | sonarcloud) | |
393e39a1 TB |
396 | # there is an issue with the platform detection that causes sonarqube to |
397 | # fail on bionic with "ERROR: ld.so: object '...libinterceptor-${PLATFORM}.so' | |
398 | # from LD_PRELOAD cannot be preloaded (cannot open shared object file)" | |
399 | # https://jira.sonarsource.com/browse/CPP-2027 | |
400 | BW_PATH=$(dirname $(which build-wrapper-linux-x86-64)) | |
401 | cp $BW_PATH/libinterceptor-x86_64.so $BW_PATH/libinterceptor-haswell.so | |
e2d8833f TB |
402 | # without target, coverage is currently not supported anyway because |
403 | # sonarqube only supports gcov, not lcov | |
404 | build-wrapper-linux-x86-64 --out-dir bw-output make -j4 || exit $? | |
405 | ;; | |
406 | *) | |
407 | make -j4 $TARGET || exit $? | |
408 | ;; | |
409 | esac | |
4e8f5a18 TB |
410 | |
411 | case "$TEST" in | |
412 | apidoc) | |
413 | if test -s make.warnings; then | |
414 | cat make.warnings | |
415 | exit 1 | |
416 | fi | |
f36e3755 | 417 | rm make.warnings |
4e8f5a18 | 418 | ;; |
e2d8833f TB |
419 | sonarcloud) |
420 | sonar-scanner \ | |
421 | -Dsonar.projectKey=strongswan \ | |
422 | -Dsonar.projectVersion=$(git describe)+${TRAVIS_BUILD_NUMBER} \ | |
423 | -Dsonar.sources=. \ | |
187ab298 | 424 | -Dsonar.cfamily.threads=2 \ |
e2d8833f | 425 | -Dsonar.cfamily.build-wrapper-output=bw-output || exit $? |
f36e3755 | 426 | rm -r bw-output .scannerwork |
e2d8833f | 427 | ;; |
4e8f5a18 TB |
428 | *) |
429 | ;; | |
430 | esac | |
f36e3755 TB |
431 | |
432 | # ensure there are no unignored build artifacts (or other changes) in the Git repo | |
433 | unclean="$(git status --porcelain)" | |
434 | if test -n "$unclean"; then | |
435 | echo "Unignored build artifacts or other changes:" | |
436 | echo "$unclean" | |
437 | exit 1 | |
438 | fi |