diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2014-02-09 00:05:19 +0000 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2014-02-09 00:05:19 +0000 |
commit | 09647e2b29660b61fc00bbdede190a36dfb22e68 (patch) | |
tree | 25d4c7d341f52e403f13e2d38492ddc0c369c263 | |
parent | 0456f5deeaa43fd4f6a315a8892b07f296975ca5 (diff) |
Add scripts for Travis CI
git-svn-id: http://pugixml.googlecode.com/svn/trunk@969 99668b35-9821-0410-8761-19e4c4f06640
-rw-r--r-- | .travis.yml | 5 | ||||
-rw-r--r-- | tests/Makefile.travis | 24 |
2 files changed, 29 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..95fa3e6 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: cpp +compiler: + - clang + - gcc +script: make -f tests/Makefile.travis test
\ No newline at end of file diff --git a/tests/Makefile.travis b/tests/Makefile.travis new file mode 100644 index 0000000..02f22e7 --- /dev/null +++ b/tests/Makefile.travis @@ -0,0 +1,24 @@ +CXXFLAGS=-c -Wall -Wextra -Werror -pedantic + +BUILD=build/travis + +SOURCES=src/pugixml.cpp $(wildcard tests/*.cpp) +OBJECTS=$(SOURCES:%=$(BUILD)/%.o) +EXECUTABLE=$(BUILD)/test + +all: $(EXECUTABLE) + +test: $(EXECUTABLE) + ./$(EXECUTABLE) + +$(EXECUTABLE): $(OBJECTS) + $(CXX) $(OBJECTS) $(LDFLAGS) -o $@ + +$(BUILD)/%.cpp.o: %.cpp + mkdir -p $(dir $@) + $(CXX) $(CXXFLAGS) $< -o $@ + +clean: + rm -rf $(BUILD) + +.PHONY: all test clean
\ No newline at end of file |