Add scripts for Travis CI

git-svn-id: http://pugixml.googlecode.com/svn/trunk@969 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
Arseny Kapoulkine 2014-02-09 00:05:19 +00:00
parent 0456f5deea
commit 09647e2b29
2 changed files with 29 additions and 0 deletions

5
.travis.yml Normal file
View File

@ -0,0 +1,5 @@
language: cpp
compiler:
- clang
- gcc
script: make -f tests/Makefile.travis test

24
tests/Makefile.travis Normal file
View File

@ -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