aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Frank Denis <github@pureftpd.org>2017-12-31 19:08:54 +0100
committerGravatar Frank Denis <github@pureftpd.org>2017-12-31 19:08:54 +0100
commite1749c5b993f62646c99ff07a264b27a2cbb3c95 (patch)
tree86c8171179c1b13d500c9ae4c053c59cc3dd2fb3
parent18bc4165e736d67cfbfe9045dac39edacc495e64 (diff)
downloadtweetpipe-e1749c5b993f62646c99ff07a264b27a2cbb3c95.tar.gz
Add a simple Travis script
-rw-r--r--.travis.yml15
-rw-r--r--Makefile19
2 files changed, 28 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..25e7f01
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,15 @@
+sudo: false
+
+language: c
+
+os:
+ - linux
+ - osx
+
+compiler:
+ - clang
+ - gcc
+ - g++
+
+script:
+ - make test
diff --git a/Makefile b/Makefile
index ac17e2e..9d5cf96 100644
--- a/Makefile
+++ b/Makefile
@@ -13,17 +13,22 @@ SRC = \
src/safe_rw.c \
src/safe_rw.h
-all: bin
+all: bin test
bin: encpipe
+$(OBJ): $(SRC)
+
.c.o:
$(CC) $(CFLAGS) -o $@ -c $<
encpipe: $(OBJ)
$(CC) $(CFLAGS) -o encpipe $(OBJ)
-install: bin
+ext/libhydrogen/hydrogen.c:
+ git submodule update --init
+
+install: all
-$(STRIP) --strip-all encpipe 2> /dev/null || $(STRIP) encpipe 2> /dev/null
mkdir -p $(PREFIX)/bin
install -o 0 -g 0 -m 0755 encpipe $(PREFIX)/bin 2> /dev/null || install -m 0755 encpipe $(PREFIX)/bin
@@ -31,10 +36,8 @@ install: bin
uninstall:
rm -f $(PREFIX)/bin/encpipe
-$(OBJ): $(SRC)
-
-ext/libhydrogen/hydrogen.c:
- git submodule update --init
+test: bin
+ @echo test | ./encpipe -e -p password | ./encpipe -d -p password -o /dev/null
.PHONY: clean
@@ -44,3 +47,7 @@ clean:
distclean: clean
.SUFFIXES: .c .o
+
+check: test
+
+distclean: clean