-
Notifications
You must be signed in to change notification settings - Fork 494
/
travis-build.sh
executable file
·45 lines (38 loc) · 1.03 KB
/
travis-build.sh
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
#!/bin/bash
set -e
# Disable leak checking for now, there are some issues (or false positives)
# that we still need to fix
export ASAN_OPTIONS="detect_leaks=0"
export LSAN_OPTIONS="suppressions=${PWD}/test/lsan_suppress.txt"
export CC
TEST_CMD="python3 -m pytest --maxfail=99 test/"
# Standard build with Valgrind
for CC in gcc clang; do
(
mkdir "build-${CC}"; cd "build-${CC}"
if [ "${CC}" == 'gcc-6' ]; then
build_opts='-D b_lundef=false'
else
build_opts=''
fi
# shellcheck disable=SC2086
meson -D werror=true ${build_opts} ../
ninja
TEST_WITH_VALGRIND=true ${TEST_CMD}
)
done
(cd "build-${CC}"; sudo ninja install)
# Sanitized build
CC=clang
for san in undefined address; do
(
mkdir "build-${san}"
cd "build-${san}"
# b_lundef=false is required to work around clang
# bug, cf. https://groups.google.com/forum/#!topic/mesonbuild/tgEdAXIIdC4
meson -D b_sanitize=${san} -D b_lundef=false -D werror=true ..
ninja
${TEST_CMD}
sudo ninja install
)
done