2018-08-19 19:02:16 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
CACHEDIR="$HOME/cache"
|
|
|
|
|
|
|
|
. ".travis/flags-$CC.sh"
|
|
|
|
add_flag -Werror
|
2018-08-20 05:34:02 +08:00
|
|
|
add_flag -fdiagnostics-color=always
|
2018-09-22 05:59:54 +08:00
|
|
|
add_flag -fsanitize=address,undefined
|
2018-08-19 19:02:16 +08:00
|
|
|
cmake -B_build -H. -GNinja \
|
|
|
|
-DCMAKE_C_FLAGS="$C_FLAGS" \
|
|
|
|
-DCMAKE_CXX_FLAGS="$CXX_FLAGS" \
|
|
|
|
-DCMAKE_EXE_LINKER_FLAGS="$LD_FLAGS" \
|
|
|
|
-DCMAKE_SHARED_LINKER_FLAGS="$LD_FLAGS" \
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH="$PWD/_install" \
|
|
|
|
-DTRACE=ON \
|
|
|
|
-DMUST_BUILD_TOXAV=ON \
|
|
|
|
-DSTRICT_ABI=ON \
|
|
|
|
-DTEST_TIMEOUT_SECONDS=120 \
|
2018-10-07 02:03:52 +08:00
|
|
|
-DUSE_IPV6=OFF \
|
|
|
|
-DAUTOTEST=ON
|
2018-08-19 19:02:16 +08:00
|
|
|
|
|
|
|
cd _build
|
|
|
|
|
|
|
|
ninja install -j$(nproc)
|
|
|
|
|
2018-08-27 03:08:34 +08:00
|
|
|
export ASAN_OPTIONS="detect_invalid_pointer_pairs=1"
|
|
|
|
export ASAN_OPTIONS="$ASAN_OPTIONS,detect_stack_use_after_return=1"
|
|
|
|
export ASAN_OPTIONS="$ASAN_OPTIONS,strict_init_order=1"
|
|
|
|
export ASAN_OPTIONS="$ASAN_OPTIONS,strict_string_checks=1"
|
2018-08-19 19:02:16 +08:00
|
|
|
ctest -j50 --output-on-failure ||
|
|
|
|
ctest -j50 --output-on-failure --rerun-failed
|