build: Synchronize CI scripts with NFD

This commits also fixes discovered incorrect memory accesses in SqliteStorage.

Change-Id: I85e1d1b62be15b6d9f0a2824e4fac8cbf2ca5f9b
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..eaf279c
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,138 @@
+sudo: required
+language: generic
+env:
+  global:
+    - JOB_NAME=limited-build
+    - WAF_JOBS=2
+
+matrix:
+  include:
+    # Linux/gcc
+    - os: linux
+      dist: trusty
+      env:
+        - CXX=g++-4.8
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+        - BUILD_WITH_ASAN=yes
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          sources: ubuntu-toolchain-r-test
+          packages: g++-4.9
+      env:
+        - CXX=g++-4.9
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+        - BUILD_WITH_ASAN=yes
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          sources: ubuntu-toolchain-r-test
+          packages: g++-5
+      env:
+        - CXX=g++-5
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+        - BUILD_WITH_ASAN=yes
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          sources: ubuntu-toolchain-r-test
+          packages: g++-6
+      env:
+        - CXX=g++-6
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+        - BUILD_WITH_ASAN=yes
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          sources: ubuntu-toolchain-r-test
+          packages: g++-7
+      env:
+        - CXX=g++-7
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+        - BUILD_WITH_ASAN=yes
+
+    # Linux/clang
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          packages: clang-3.5
+      env:
+        - CXX=clang++-3.5
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+        - BUILD_WITH_ASAN=yes
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          packages: clang-3.6
+      env:
+        - CXX=clang++-3.6
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+        - BUILD_WITH_ASAN=yes
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          sources:
+            - llvm-toolchain-precise-3.7
+            - ubuntu-toolchain-r-test
+          packages: clang-3.7
+      env:
+        - CXX=clang++-3.7
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          sources:
+            - llvm-toolchain-precise-3.8
+            - ubuntu-toolchain-r-test
+          packages: clang-3.8
+      env:
+        - CXX=clang++-3.8
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+        - BUILD_WITH_ASAN=yes
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          sources: llvm-toolchain-trusty-3.9
+          packages: clang-3.9
+      env:
+        - CXX=clang++-3.9
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          sources: llvm-toolchain-trusty-4.0
+          packages: clang-4.0
+      env:
+        - CXX=clang++-4.0
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+        - BUILD_WITH_ASAN=yes
+
+    # macOS/clang
+    # https://docs.travis-ci.com/user/osx-ci-environment/#OS-X-Version
+    - os: osx
+      osx_image: xcode7.3
+      env:
+        - NODE_LABELS="OSX OSX-10.11"
+        - BUILD_WITH_ASAN=yes
+    - os: osx
+      osx_image: xcode8.3
+      env:
+        - NODE_LABELS="OSX OSX-10.12"
+        - BUILD_WITH_ASAN=yes
+
+before_script:
+  - ${CXX:-c++} --version
+  - python --version
+
+script:
+  - ./.jenkins