Commit 262dfcf0bf7416ddac5012737dfa1686e013824f

Etienne Samson 2018-03-29T22:14:05

mbedtls: enable Travis CI tests

diff --git a/.travis.yml b/.travis.yml
index a4c8e91..b5f1c6f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -55,6 +55,16 @@ matrix:
          OPTIONS="-DBUILD_CLAR=ON -DBUILD_EXAMPLES=OFF -DDEBUG_POOL=ON -DCMAKE_BUILD_TYPE=Debug"
      os: linux
      dist: trusty
+   - compiler: gcc
+     env:
+         MBEDTLS=1
+         OPTIONS="-DTHREADSAFE=ON -DCMAKE_BUILD_TYPE=Release -DUSE_HTTPS=mbedTLS -DMBEDTLS_ROOT_DIR=../deps/mbedtls"
+     os: linux
+   - compiler: gcc
+     env:
+         MBEDTLS=1
+         OPTIONS="-DTHREADSAFE=OFF -DBUILD_EXAMPLES=ON -DUSE_HTTPS=mbedTLS -DMBEDTLS_ROOT_DIR=../deps/mbedtls"
+     os: linux
  allow_failures:
    - env: COVERITY=1
 
diff --git a/script/install-deps-linux.sh b/script/install-deps-linux.sh
new file mode 100755
index 0000000..c084ca2
--- /dev/null
+++ b/script/install-deps-linux.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -x
+
+if [ "$MBEDTLS" ]; then
+  git clone https://github.com/ARMmbed/mbedtls.git ./deps/mbedtls
+  cd ./deps/mbedtls
+  git checkout mbedtls-2.6.1
+  cmake -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=ON -DUSE_STATIC_MBEDTLS_LIBRARY=OFF .
+  cmake --build .
+
+  echo "mbedTLS built in `pwd`"
+fi