diff options
| author | Garrett D'Amore <garrett@damore.org> | 2016-12-21 01:30:19 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2016-12-21 01:30:19 -0800 |
| commit | 44f983ef691112993710a5456ed6d15da1d51420 (patch) | |
| tree | a5ffcc4d761239bde260a522294b916ac0a59cc8 | |
| parent | 5db7f0f969fb05cb0783acd187857b7b06b09b8b (diff) | |
| download | nng-44f983ef691112993710a5456ed6d15da1d51420.tar.gz nng-44f983ef691112993710a5456ed6d15da1d51420.tar.bz2 nng-44f983ef691112993710a5456ed6d15da1d51420.zip | |
Travis stuff for uncrustify.
| -rw-r--r-- | .travis.yml | 33 | ||||
| -rw-r--r-- | README.adoc | 5 | ||||
| -rwxr-xr-x | etc/uncrustify_check.sh | 19 |
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 |
