From b536d6f0f1736b523ba33e358f1d851f64496fe1 Mon Sep 17 00:00:00 2001 From: Daan Sprenkels Date: Tue, 25 Apr 2017 18:06:46 +0200 Subject: [PATCH] travis: add new configuration This commit enables travis-ci on linux and osx with memory checking only enabled on linux. --- .editorconfig | 4 ++++ .travis.yml | 18 ++++++++++++++++++ Makefile | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .travis.yml diff --git a/.editorconfig b/.editorconfig index 3beae9d..a04f3b9 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,3 +5,7 @@ indent_size = 8 [Makefile] indent_style = tab indent_size = 8 + +[*.yml] +indent_style = space +indent_size = 2 diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5e1d2a3 --- /dev/null +++ b/.travis.yml @@ -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 diff --git a/Makefile b/Makefile index be74eaf..97abfed 100644 --- a/Makefile +++ b/Makefile @@ -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))