diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-03-12 22:59:58 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-03-12 22:59:58 +0100 |
commit | edb413ade788920d2aa03564df7fbc5ad6b7c194 (patch) | |
tree | 447850d4a91e42cf1f4bd66679c874d714d17f0b /.travis | |
parent | e854c2f17284e7b30c6aa1b6e132b527a171ada9 (diff) | |
download | blogc-edb413ade788920d2aa03564df7fbc5ad6b7c194.tar.gz blogc-edb413ade788920d2aa03564df7fbc5ad6b7c194.tar.bz2 blogc-edb413ade788920d2aa03564df7fbc5ad6b7c194.zip |
travis: added clang-analyzer target
Diffstat (limited to '.travis')
-rw-r--r-- | .travis/targets/clang-analyzer.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/.travis/targets/clang-analyzer.sh b/.travis/targets/clang-analyzer.sh new file mode 100644 index 0000000..bd2d61d --- /dev/null +++ b/.travis/targets/clang-analyzer.sh @@ -0,0 +1,42 @@ +build() { + pushd build > /dev/null + ../configure \ + CFLAGS="-Wall -g -O0" \ + --enable-silent-rules \ + --enable-ronn \ + --enable-tests \ + --disable-valgrind \ + --enable-git-receiver \ + --enable-make \ + --enable-runserver + popd > /dev/null + + PN="$(grep PACKAGE_TARNAME build/config.h | cut -d\" -f2)" + PV="$(grep PACKAGE_VERSION build/config.h | cut -d\" -f2)" + P="${PN}-clang-analyzer-${PV}" + + set +e + scan-build \ + --status-bugs \ + -o "build/${P}" \ + make -C build + RV=$? + set -e + + if [[ ${RV} -ne 0 ]]; then + tar \ + -cvJf "build/${P}.tar.xz" \ + -C build/${P}/ \ + . + fi + + echo ${RV} > build/.test_result +} + +deploy_cond() { + [[ "x${CC}" = "xclang" ]] && [[ -f build/*.tar.xz ]] +} + +deploy() { + FILES=( build/*.tar.xz ) +} |