diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2c4e978 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,21 @@ +language: cpp +compiler: + - g++ + +before_install: + - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; + - sudo apt-get update; + - sudo apt-get install gcc-4.8 g++-4.8; + - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20; + - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20; + - g++ --version; + - sudo apt-get update -qq; + +install: + - make install + +script: + - make test + - make main + - ./test + - ./main \ No newline at end of file diff --git a/README.md b/README.md index 9444d96..972e362 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ -CppNumericalSolvers (C++11 implementation with MATLAB bindings) +CppNumericalSolvers (C++11 implementation with MATLAB bindings) ================================================================= +[![Build Status](https://api.travis-ci.org/PatWie/CppNumericalSolvers.svg?branch=master)](http://travis-ci.org/PatWie/CppNumericalSolvers) + Quick Intro ----------- - run `make install` to download and build dependencies diff --git a/makefile b/makefile index ebeb7f9..6c816ce 100644 --- a/makefile +++ b/makefile @@ -27,30 +27,3 @@ install: mv eigen-eigen-* eigen rm -Rf eigen-3.2.2.tar rm -Rf eigen-3.2.2.tar.bz2 - - - -# test: unittests.cpp -# $(CXX) $(CXXFLAGSTEST) -o test Neighborhood.hpp Neighborhood.cpp Vector.hpp Vector.cpp ProQuantization.hpp ProQuantization.cpp ProTree.hpp ProTree.cpp unittests.cpp libgtest.a -lglog -# GLOG_logtostderr=1 ./test - -# gtest: -# rm -f gtest-1.7.0.zip -# rm -fR gtest-1.7.0 -# wget -O gtest-1.7.0.zip https://googletest.googlecode.com/files/gtest-1.7.0.zip -# unzip gtest-1.7.0.zip -# g++ -Igtest-1.7.0/include -Igtest-1.7.0 -c "gtest-1.7.0/src/gtest-all.cc" -# ar -rv libgtest.a gtest-all.o -# rm -f gtest-1.7.0.zip -# mv gtest-1.7.0 gtest - - -# cleanall: -# rm -f test -# rm -f main - -# cleanmain: -# rm -f main - -# cleantest: -# rm -f test \ No newline at end of file diff --git a/src/unittests.cpp b/src/unittests.cpp index 92b2cdb..fb8dfdf 100644 --- a/src/unittests.cpp +++ b/src/unittests.cpp @@ -49,8 +49,8 @@ TEST(BfgsTest, RosenbrockNear) { SOLVE_1stOrder(pwie::BfgsSolver, ro TEST(LbfgsTest, RosenbrockFar) { SOLVE_1stOrder(pwie::LbfgsSolver, rosenbrock, 15.0, 8.0, 0.0) } TEST(LbfgsTest, RosenbrockNear) { SOLVE_1stOrder(pwie::LbfgsSolver, rosenbrock, 1.0, 3.0, 0.0) } -// TEST(LbfgsbTest, RosenbrockFar) { SOLVE_1stOrder(pwie::LbfgsbSolver, rosenbrock, 15.0, 8.0, 0.0) } -// TEST(LbfgsbTest, RosenbrockNear) { SOLVE_1stOrder(pwie::LbfgsbSolver, rosenbrock, 1.0, 3.0, 0.0) } +TEST(LbfgsbTest, DISABLED_RosenbrockFar) { SOLVE_1stOrder(pwie::LbfgsbSolver, rosenbrock, 15.0, 8.0, 0.0) } +TEST(LbfgsbTest, DISABLED_RosenbrockNear) { SOLVE_1stOrder(pwie::LbfgsbSolver, rosenbrock, 1.0, 3.0, 0.0) } int main (int argc, char **argv) {