aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml33
-rw-r--r--README.adoc5
-rwxr-xr-xetc/uncrustify_check.sh19
3 files changed, 57 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..d470d85e
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,33 @@
+language: c
+sudo: false
+addons:
+ apt:
+ packages:
+ - cmake
+ - uncrustify
+ - colordiff
+matrix:
+ include:
+ - os: linux
+ compiler: gcc
+ - os: linux
+ compiler: clang
+# - os: osx
+# compiler: gcc
+ - os: osx
+ compiler: clang
+script:
+ # Print all environment variables to aid in CI development
+ - uname -a
+ - printenv
+ # Print version and available CMake generators to aid in CI development
+ - cmake --version
+ - cmake --help
+ # Perform out-of-source build
+ - mkdir build
+ - cd build
+ # Perform CMake backend generation, build, and test
+ - cmake ..
+ - cmake --build . -- -j4
+ - ctest --output-on-failure -C Debug -j4
+ - etc/uncrustify_check.sh
diff --git a/README.adoc b/README.adoc
index 7560e656..b528e7c0 100644
--- a/README.adoc
+++ b/README.adoc
@@ -1,6 +1,11 @@
nng - nanomsg-NG
================
+image:https://img.shields.io/badge/license-MIT-blue.svg[MIT License]
+image:https://img.shields.io/travis/nanomsg/nng/master.svg?label=linux[Linux Status,link="https://travis-ci.org/nanomsg/nng"]
+image:https://img.shields.io/appveyor/ci/nanomsg/nng/master.svg?label=windows[Windows Status,link="https://ci.appveyor.com/project/nanomsg/nng"]
+
+
This repository represents a work in progress rewrite of the SP protocol
library called "libnanomsg". The work is being done by Garrett D'Amore,
and at this juncture he is *not* soliciting assistance.
diff --git a/etc/uncrustify_check.sh b/etc/uncrustify_check.sh
new file mode 100755
index 00000000..881fd121
--- /dev/null
+++ b/etc/uncrustify_check.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+PATH=${PATH}:/opt/pkg/bin export PATH
+stat=0
+find src -name '*.[ch]' -print | while read file
+do
+ uncrustify -c etc/uncrustify.cfg -lC -f $file | colordiff -u $file -
+ if [ $? -ne 0 ]
+ then
+ stat=1
+ fi
+done
+
+if [ $stat -ne 0 ]
+then
+ echo "Format errors detect. Please fix."
+ exit 1
+fi
+exit 0