ci: sync jenkins script and travis config with NFD

This commit also adds support for "limited-build" job type to ndn-cxx,
and enables it for travis integrations.

Change-Id: I6960b1d683c94c433ad1bfe702c4273e01036a2c
diff --git a/.jenkins.d/10-build.sh b/.jenkins.d/10-build.sh
index d99f3c3..e86ced8 100755
--- a/.jenkins.d/10-build.sh
+++ b/.jenkins.d/10-build.sh
@@ -1,10 +1,11 @@
 #!/usr/bin/env bash
-set -x
 set -e
 
 JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
 source "$JDIR"/util.sh
 
+set -x
+
 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*
@@ -12,25 +13,27 @@
 # Cleanup
 sudo ./waf -j1 --color=yes distclean
 
-# Configure/build static library in debug mode with precompiled headers
-./waf -j1 --color=yes configure --enable-static --disable-shared --with-tests --debug
-./waf -j1 --color=yes build
+if [[ "$JOB_NAME" != *"limited-build" ]]; then
+  # Configure/build static library in optimized mode with tests
+  ./waf -j1 --color=yes configure --enable-static --disable-shared --with-tests
+  ./waf -j1 --color=yes build
 
-# Cleanup
-sudo ./waf -j1 --color=yes distclean
+  # Cleanup
+  sudo ./waf -j1 --color=yes distclean
 
-# Configure/build static and shared library in optimized mode without tests with precompiled headers
-./waf -j1 --color=yes configure --enable-shared --enable-static
-./waf -j1 --color=yes build
+  # Configure/build static and shared library in optimized mode without tests
+  ./waf -j1 --color=yes configure --enable-static --enable-shared
+  ./waf -j1 --color=yes build
 
-# Cleanup
-sudo ./waf -j1 --color=yes distclean
+  # Cleanup
+  sudo ./waf -j1 --color=yes distclean
+fi
 
-# Configure/build shared library in debug mode with examples without precompiled headers
+# Configure/build shared library in debug mode with tests/examples and without precompiled headers
 if [[ "$JOB_NAME" == *"code-coverage" ]]; then
     COVERAGE="--with-coverage"
 fi
-./waf -j1 --color=yes configure --debug --enable-shared --disable-static --with-tests --without-pch --with-examples $COVERAGE
+./waf -j1 --color=yes configure --disable-static --enable-shared --debug --with-tests --with-examples --without-pch $COVERAGE
 ./waf -j1 --color=yes build
 
 # (tests will be run against debug version)