ci: Update Travis-CI to use Ubuntu Linux 14.04 (trusty) and OS X 10.9 VMs

Due to resource constraints, this commit also makes Travis-CI to build
only once (debug, without precompiled headers, with tests).

Change-Id: I65ec64bca545093efae384dd00b51bbeaf7d9b65
Refs: #3360
diff --git a/.jenkins.d/10-build.sh b/.jenkins.d/10-build.sh
index 09fa916..fa7591a 100755
--- a/.jenkins.d/10-build.sh
+++ b/.jenkins.d/10-build.sh
@@ -9,19 +9,21 @@
 # Cleanup
 sudo ./waf -j1 --color=yes distclean
 
-# Configure/build in optimized mode with tests and precompiled headers
-./waf -j1 --color=yes configure --with-tests
-./waf -j1 --color=yes build
+if [[ "$JOB_NAME" != *"limited-build" ]]; then
+  # Configure/build in optimized mode with tests and precompiled headers
+  ./waf -j1 --color=yes configure --with-tests
+  ./waf -j1 --color=yes build
 
-# Cleanup
-sudo ./waf -j1 --color=yes distclean
+  # Cleanup
+  sudo ./waf -j1 --color=yes distclean
 
-# Configure/build in optimized mode without tests and with precompiled headers
-./waf -j1 --color=yes configure
-./waf -j1 --color=yes build
+  # Configure/build in optimized mode without tests and with precompiled headers
+  ./waf -j1 --color=yes configure
+  ./waf -j1 --color=yes build
 
-# Cleanup
-sudo ./waf -j1 --color=yes distclean
+  # Cleanup
+  sudo ./waf -j1 --color=yes distclean
+fi
 
 # Configure/build in debug mode
 if [[ "$JOB_NAME" == *"code-coverage" ]]; then
diff --git a/.jenkins.d/README.md b/.jenkins.d/README.md
index 3bacba8..b1a3fbf 100644
--- a/.jenkins.d/README.md
+++ b/.jenkins.d/README.md
@@ -28,6 +28,7 @@
 
   * empty: default build process
   * `code-coverage` (Linux OS is assumed): build process with code coverage analysis
+  * `limited-build`: only a single build with tests
 
 - `CACHE_DIR`: the variable defines a path to folder containing cached files from previous builds,
   e.g., a compiled version of ndn-cxx library.  If not set, `/tmp` is used.
diff --git a/.travis.yml b/.travis.yml
index 7f40779..6ed51f3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,15 +1,24 @@
-sudo: true
-language: cpp
-os:
-  - linux
-compiler:
-  - gcc
+sudo: required
+language: generic
+env:
+  global:
+    - JOB_NAME=limited-build
+matrix:
+  include:
+    - os: linux
+      dist: trusty
+      env: CXX=g++
+    - os: linux
+      dist: trusty
+      env: CXX=clang++
+    - os: osx
+      env: CXX=clang++
 notifications:
   email:
     on_success: always
     on_failure: always
 script:
-  - if [[ $TRAVIS_OS_NAME == linux ]]; then export NODE_LABELS="Linux Ubuntu Ubuntu-12.04"; fi
-  - if [[ $TRAVIS_OS_NAME == osx ]]; then export NODE_LABELS="OSX OSX-10.10"; fi
+  - if [[ $TRAVIS_OS_NAME == linux ]]; then export NODE_LABELS="Linux Ubuntu Ubuntu-14.04"; fi
+  - if [[ $TRAVIS_OS_NAME == osx ]]; then export NODE_LABELS="OSX OSX-10.9"; fi
   - echo $NODE_LABELS
   - ./.jenkins
diff --git a/wscript b/wscript
index f833255..f51f65a 100644
--- a/wscript
+++ b/wscript
@@ -117,6 +117,9 @@
                    " (http://redmine.named-data.net/projects/nfd/wiki/Boost_FAQ)")
         return
 
+    if conf.env['CXX_NAME'] == 'clang' and conf.env.BOOST_VERSION_NUMBER < 105800:
+        conf.define('BOOST_ASIO_HAS_STD_ARRAY', 1) # Workaround for http://redmine.named-data.net/issues/3360#note-14
+
     conf.load('unix-socket')
     conf.checkWebsocket(mandatory=True)