X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=.ci%2Fwarn%2Frun.sh;h=2add1a5ccfcc754331bdc213d969e9467c1d46f7;hb=4f48176209832913975843b6cf3bf1753152da3f;hp=65f46eb22d71069d0ef3e5e8fa5fe2fbdd99bfd5;hpb=7619f84393f824a84e20e03167304b27d3581ac0;p=tinc diff --git a/.ci/warn/run.sh b/.ci/warn/run.sh index 65f46eb2..2add1a5c 100755 --- a/.ci/warn/run.sh +++ b/.ci/warn/run.sh @@ -3,20 +3,28 @@ set -euo pipefail test -n "$CC" -export CFLAGS="${CFLAGS:-} -Werror" result=0 +clang_tidy() { + rm -f compile_commands.json + ln -s "$1"/compile_commands.json . + run-clang-tidy || result=$? +} + check_warnings() { - git clean -dfx + flavor="$1" + dir="${CC}_${flavor}" + + ./.ci/build.sh "$dir" -Dwerror=true || result=$? - autoreconf -fsi - # shellcheck disable=SC2046 - ./configure $(sh .ci/conf.sh) - make -j"$(nproc)" all extra || result=$? + case "$CC" in + clang*) clang_tidy "$dir" ;; + esac } -check_warnings -check_warnings --disable-legacy-protocol +check_warnings default +check_warnings nolegacy +check_warnings gcrypt exit $result