ci: Embedding CI build and test running script

This commit also unifies build and test scripts for Jenkins and Travis CI

Change-Id: I6ee99c51032769629eb2c62b40608033fa9cac78
diff --git a/.jenkins.d/10-build.sh b/.jenkins.d/10-build.sh
new file mode 100755
index 0000000..e8811bd
--- /dev/null
+++ b/.jenkins.d/10-build.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+set -x
+
+# Cleanup
+sudo ./waf distclean -j1 --color=yes
+
+COVERAGE=$( python -c "print '--with-coverage' if 'code-coverage' in '$JOB_NAME' else ''" )
+
+sudo rm -Rf /usr/local/include/ndn-cxx
+sudo rm -f /usr/local/lib/libndn-cxx*
+sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx*
+
+# Configure
+CXXFLAGS="-std=c++03 -pedantic -Wall -Wno-long-long -O2 -g -Werror" \
+  ./waf -j1 configure --color=yes --with-tests --without-pch $COVERAGE
+
+# Build
+./waf --color=yes -j1
+
+# Install
+sudo ./waf -j1 --color=yes install
+sudo ldconfig || true