ci: check boost version change on OSX

refs: #4060

Change-Id: I70819d428c6285ed4e18d2da9478d2c99333d37a
diff --git a/.jenkins.d/10-ndn-cxx.sh b/.jenkins.d/10-ndn-cxx.sh
index d22bfb6..69d337e 100755
--- a/.jenkins.d/10-ndn-cxx.sh
+++ b/.jenkins.d/10-ndn-cxx.sh
@@ -7,7 +7,19 @@
 
 pushd /tmp >/dev/null
 
-INSTALLED_VERSION=$((cd ndn-cxx && git rev-parse HEAD) 2>/dev/null || echo NONE)
+INSTALLED_VERSION=
+if has OSX $NODE_LABELS; then
+    BOOST=$(brew ls --versions boost)
+    OLD_BOOST=$(cat boost.txt || :)
+    if [[ $OLD_BOOST != $BOOST ]]; then
+        echo "$BOOST" > boost.txt
+        INSTALLED_VERSION=NONE
+    fi
+fi
+
+if [[ -z $INSTALLED_VERSION ]]; then
+    INSTALLED_VERSION=$((cd ndn-cxx && git rev-parse HEAD) 2>/dev/null || echo NONE)
+fi
 
 sudo rm -Rf ndn-cxx-latest