Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Travis #337

Merged
merged 9 commits into from
May 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
language: cpp

compiler:
- gcc

# by default Ubuntu Trusty is included, so we have 14.04 + 16.04
matrix:
include:
- os: linux
dist: xenial
sudo: required

addons:
apt:
packages:
- cmake
- libboost-all-dev
- libeigen3-dev


install:
- git clone git://github.com/ethz-asl/libnabo.git
- cd libnabo
- mkdir build && cd build
- cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
- make
- sudo make install

script:
- cd $TRAVIS_BUILD_DIR
- mkdir build && cd build
- cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=ON --build . ..
- make -j2
- ctest --verbose
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,15 @@ endif(GENERATE_API_DOC)
add_subdirectory(examples)
# Evaluation programs
add_subdirectory(evaluations)

# Unit testing
add_subdirectory(utest)

option(BUILD_TESTS "Build all tests." OFF)

if (BUILD_TESTS)
enable_testing()
add_subdirectory(utest)
endif()

#=================== allow find_package() =========================
#
Expand Down
6 changes: 1 addition & 5 deletions utest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
enable_testing()

include_directories(../contrib/gtest)
add_executable(utest
Expand All @@ -16,8 +15,5 @@ add_executable(utest
find_package (Threads)
target_link_libraries(utest gtest pointmatcher ${CMAKE_THREAD_LIBS_INIT})

add_test(utest ${CMAKE_CURRENT_BINARY_DIR}/utest --gtest_output=xml:${CMAKE_CURRENT_BINARY_DIR}/test_results.xml --path "${CMAKE_SOURCE_DIR}/examples/data/")
add_test(utest ${CMAKE_CURRENT_BINARY_DIR}/utest --path "${CMAKE_SOURCE_DIR}/examples/data/")

if (UNIX)
configure_file(CTestCustom.cmake ${CMAKE_BINARY_DIR})
endif (UNIX)
1 change: 0 additions & 1 deletion utest/CTestCustom.cmake

This file was deleted.