diff --git a/ci/build-check.sh b/ci/build-check.sh index 9657313f..589b5d6e 100755 --- a/ci/build-check.sh +++ b/ci/build-check.sh @@ -10,11 +10,16 @@ ${dn}/build.sh # support parallel runs right now /usr/bin/make check make install -git clean -dfx -# And now a clang build to find unused variables -export CC=clang -export CFLAGS='-Werror=unused-variable -Werror=maybe-uninitialized' -build_default -# don't actually run the tests, just compile them -/usr/bin/make check TESTS= +# And now a clang build to find unused variables, but only run on Fedora because +# the CentOS version is ancient anyway and doesn't support all the flags that +# might get passed to it. +id=$(. /etc/os-release && echo $ID) +if [ "$id" == fedora ]; then + git clean -dfx + export CC=clang + export CFLAGS='-Werror=unused-variable -Werror=maybe-uninitialized' + build_default + # don't actually run the tests, just compile them + /usr/bin/make check TESTS= +fi