jenkins: Run scan-build only if the tree is stable.
authorJustus Winter <justus@g10code.com>
Wed, 14 Dec 2016 13:54:30 +0000 (14:54 +0100)
committerJustus Winter <justus@g10code.com>
Thu, 15 Dec 2016 10:04:15 +0000 (11:04 +0100)
misc/jenkins/bin/build.bash

index 8388d6d..fd3f5a1 100755 (executable)
@@ -49,8 +49,10 @@ MAKEFLAGS="-j2"
 
 
 SCANBUILD=
-if [ "$(uname)" = Linux ]; then
-    # XXX: We should really have an analyzer target
+if [ "$(uname)" = Linux ] \
+       && [ "$GIT_PREVIOUS_COMMIT" = "$GIT_COMMIT" ]; then
+    # We only do scan-builds (which are really slow), if the tree is
+    # stable (most commonly on nightly builds).
     SCANBUILD="scan-build -o ${WORKSPACE}/clangScanBuildReports -v"
 fi
 CONFIGUREFLAGS=