travis: add new configuration

This commit enables travis-ci on linux and osx
with memory checking only enabled on linux.
This commit is contained in:
Daan Sprenkels
2017-04-25 18:06:46 +02:00
parent 23f96d00e1
commit b536d6f0f1
3 changed files with 23 additions and 1 deletions

View File

@@ -5,3 +5,7 @@ indent_size = 8
[Makefile]
indent_style = tab
indent_size = 8
[*.yml]
indent_style = space
indent_size = 2

18
.travis.yml Normal file
View File

@@ -0,0 +1,18 @@
language: c
os:
- linux
- osx
compiler:
- clang
- gcc
addons:
apt:
packages:
- valgrind
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export MEMCHECK="valgrind -q --leak-check=full --error-exitcode=1"; fi
- make && make test

View File

@@ -9,7 +9,7 @@ libsss.a: $(OBJS)
%.out: %.o
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS)
valgrind -q --leak-check=full --error-exitcode=1 ./$@
$(MEMCHECK) ./$@
test_sss.out: $(OBJS)
test_hazmat.out: $(filter-out hazmat.o,$(OBJS))