run.sh 422 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. set -euo pipefail
  3. test -n "$CC"
  4. result=0
  5. clang_tidy() {
  6. rm -f compile_commands.json
  7. ln -s "$1"/compile_commands.json .
  8. run-clang-tidy || result=$?
  9. }
  10. check_warnings() {
  11. flavor="$1"
  12. dir="${CC}_${flavor}"
  13. ./.ci/build.sh "$dir" -Dwerror=true || result=$?
  14. case "$CC" in
  15. clang*) clang_tidy "$dir" ;;
  16. esac
  17. }
  18. check_warnings default
  19. check_warnings nolegacy
  20. check_warnings gcrypt
  21. exit $result