Add Travis CI configuration
[umurmur.git] / .travis.yml
diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..63756f7
--- /dev/null
@@ -0,0 +1,67 @@
+sudo: false
+dist: trusty
+language: cpp
+
+compiler: gcc
+
+matrix:
+  include:
+    - addons:
+        apt:
+          packages:
+            - libssl-dev
+            - libprotobuf-dev
+            - libprotoc-dev
+            - protobuf-compiler
+            - libconfig-dev
+      env:
+        TLSIMPL=openssl
+    - addons:
+        apt:
+          packages:
+            - libprotobuf-dev
+            - libprotoc-dev
+            - protobuf-compiler
+            - libconfig-dev
+      env:
+        TLSIMPL=mbedtls MBEDVERSION=2.3.0
+    - addons:
+        apt:
+          packages:
+            - libprotobuf-dev
+            - libprotoc-dev
+            - protobuf-compiler
+            - libconfig-dev
+      env:
+        TLSIMPL=mbedtls MBEDVERSION=2.4.0
+  exclude:
+    - compiler: gcc
+
+install:
+  - if [ "$TLSIMPL" == "mbedtls" ]; then
+    pushd .;
+    cd /tmp;
+    wget https://github.com/ARMmbed/mbedtls/archive/mbedtls-${MBEDVERSION}.tar.gz;
+    tar xf mbedtls-${MBEDVERSION}.tar.gz;
+    cd mbedtls-mbedtls-${MBEDVERSION};
+    cmake . -DCMAKE_INSTALL_PREFIX=/tmp/deps -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=Off -DUSE_SHARED_MBEDTLS_LIBRARY=On;
+    make install -j$(nproc);
+    if [ "$MBEDVERSION" == "2.3.0" ]; then
+    sed -e 's/<time\.h>/"platform.h"/g' -i /tmp/deps/include/mbedtls/ssl.h;
+    fi;
+    popd;
+    fi
+  - pushd .;
+    cd /tmp;
+    wget https://github.com/protobuf-c/protobuf-c/releases/download/v1.0.0/protobuf-c-1.0.0.tar.gz;
+    tar xf protobuf-c-1.0.0.tar.gz;
+    cd protobuf-c-1.0.0/;
+    ./configure --prefix=/tmp/deps;
+    make -j$(nproc);
+    make install;
+    popd
+
+script:
+  - ./autogen.sh
+  - env CPPFLAGS=-I/tmp/deps/include LDFLAGS=-L/tmp/deps/lib ./configure --with-ssl=${TLSIMPL}
+  - make -j$(nproc)