Add Travis CI configuration
authorFelix Morgner <felix.morgner@gmail.com>
Thu, 26 Jan 2017 23:32:24 +0000 (00:32 +0100)
committerFelix Morgner <felix.morgner@gmail.com>
Thu, 26 Jan 2017 23:35:48 +0000 (00:35 +0100)
.travis.yml [new file with mode: 0644]
README.md

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)
index 4b34637ef160cb9fbe5559dd4e613c9762da6170..3fd5567b5d82f740e3a6279548b9d463fbebdc83 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
 #About uMurmur
 
+Build for OpenSSL and mbed TLS 2.3/2.4: [![Build Status](https://travis-ci.org/umurmur/umurmur.svg?branch=master)](https://travis-ci.org/umurmur/umurmur)
+
 uMurmur is a minimalistic Mumble server primarily targeted to run on embedded computers, like routers, with an open OS like e.g. OpenWRT. The server part of Mumble is called Murmur, hence the name uMurmur. It is available as a precompiled package for quite a lot distributions. Check your distribution's package repository.
 
 Instructions for building from source