Skip to content

Commit 617743b

Browse files
committed
fix CI
1 parent d871a0c commit 617743b

File tree

5 files changed

+20
-77
lines changed

5 files changed

+20
-77
lines changed

.github/workflows/build_ubuntu.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,14 @@ elseif( CATKIN_DEVEL_PREFIX OR CATKIN_BUILD_BINARY_PACKAGE)
111111
set(BUILD_TOOL_INCLUDE_DIRS ${catkin_INCLUDE_DIRS})
112112

113113
elseif(BUILD_UNIT_TESTS)
114-
find_package(GTest REQUIRED)
114+
include(FetchContent)
115+
FetchContent_Declare(
116+
googletest
117+
URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip
118+
)
119+
# For Windows: Prevent overriding the parent project's compiler/linker settings
120+
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
121+
FetchContent_MakeAvailable(googletest)
115122
endif()
116123

117124

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![License MIT](https://img.shields.io/github/license/BehaviorTree/BehaviorTree.CPP?color=blue)
2-
![Version](https://img.shields.io/badge/version-3.5-blue.svg)
3-
[![Build Status](https://travis-ci.org/BehaviorTree/BehaviorTree.CPP.svg?branch=master)](https://travis-ci.org/BehaviorTree/BehaviorTree.CPP)
2+
![Version](https://img.shields.io/badge/version-3.6-blue.svg)
3+
[![CMake Build](https://github.com/BehaviorTree/BehaviorTree.CPP/actions/workflows/build_vanilla.yml/badge.svg)](https://github.com/BehaviorTree/BehaviorTree.CPP/actions/workflows/build_vanilla.yml)
44
[![ros1](https://github.com/BehaviorTree/BehaviorTree.CPP/workflows/ros1/badge.svg?branch=master)](https://github.com/BehaviorTree/BehaviorTree.CPP/actions?query=workflow%3Aros1)
55
[![ros2](https://github.com/BehaviorTree/BehaviorTree.CPP/workflows/ros2/badge.svg?branch=master)](https://github.com/BehaviorTree/BehaviorTree.CPP/actions?query=workflow%3Aros2)
66
[![LGTM Grade](https://img.shields.io/lgtm/grade/cpp/github/BehaviorTree/BehaviorTree.CPP)](https://lgtm.com/projects/g/BehaviorTree/BehaviorTree.CPP/context:cpp)

tests/CMakeLists.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,16 @@ set(BT_TESTS
2020
gtest_switch.cpp
2121
)
2222

23-
if (BT_COROUTINES)
24-
list(APPEND BT_TESTS gtest_coroutines.cpp)
23+
if( BT_COROUTINES )
24+
LIST( APPEND BT_TESTS gtest_coroutines.cpp)
2525
endif()
2626

27+
#if(ament_cmake_FOUND OR catkin_FOUND)
28+
# # This test requires gmock. Since we don't have a uniform way to include
29+
# # gmock for non-users, it is turned of when build without ros.
30+
# list(APPEND BT_TESTS gtest_async_action_node.cpp)
31+
#endif()
32+
2733
if(ament_cmake_FOUND AND BUILD_TESTING)
2834

2935
find_package(ament_cmake_gtest REQUIRED)
@@ -43,15 +49,13 @@ elseif(catkin_FOUND AND CATKIN_ENABLE_TESTING)
4349
${catkin_LIBRARIES})
4450
target_include_directories(${BEHAVIOR_TREE_LIBRARY}_test PRIVATE gtest/include)
4551

46-
elseif(GTEST_FOUND AND BUILD_UNIT_TESTS)
52+
elseif(BUILD_UNIT_TESTS)
4753

4854
enable_testing()
4955

5056
add_executable(${BEHAVIOR_TREE_LIBRARY}_test ${BT_TESTS})
5157
target_link_libraries(${PROJECT_NAME}_test ${BEHAVIOR_TREE_LIBRARY}
52-
bt_sample_nodes
53-
${GTEST_LIBRARIES}
54-
${GTEST_MAIN_LIBRARIES})
58+
bt_sample_nodes gtest gtest_main)
5559
target_include_directories(${BEHAVIOR_TREE_LIBRARY}_test PRIVATE gtest/include ${GTEST_INCLUDE_DIRS})
5660

5761
add_test(BehaviorTreeCoreTest ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${BEHAVIOR_TREE_LIBRARY}_test)

0 commit comments

Comments
 (0)