Skip to content

Commit ac26aea

Browse files
Fix CI, add BUILD_TESTS and remove catkin support
1 parent 3a00bc3 commit ac26aea

17 files changed

+60
-184
lines changed

.github/workflows/cmake_ubuntu.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: cmake Ubuntu
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types: [opened, synchronize, reopened]
49

510
env:
611
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
@@ -15,22 +20,17 @@ jobs:
1520
runs-on: ${{ matrix.os }}
1621
strategy:
1722
matrix:
18-
os: [ubuntu-20.04]
23+
os: [ubuntu-22.04]
1924

2025
steps:
2126
- uses: actions/checkout@v2
2227

2328
- name: Install Conan
2429
id: conan
2530
uses: turtlebrowser/get-conan@main
26-
with:
27-
version: 1.59.0
2831

2932
- name: Create default profile
30-
run: conan profile new default --detect
31-
32-
- name: Update profile
33-
run: conan profile update settings.compiler.libcxx=libstdc++11 default
33+
run: conan profile detect
3434

3535
- name: Create Build Environment
3636
# Some projects don't allow in-source building, so create a separate build directory
@@ -44,16 +44,16 @@ jobs:
4444
- name: Configure CMake
4545
shell: bash
4646
working-directory: ${{github.workspace}}/build
47-
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
47+
run: cmake ${{github.workspace}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
4848

4949
- name: Build
5050
shell: bash
5151
working-directory: ${{github.workspace}}/build
5252
run: cmake --build . --config ${{env.BUILD_TYPE}}
5353

5454
- name: run test (Linux)
55-
working-directory: ${{github.workspace}}/build
56-
run: ./tests/behaviortree_cpp_test
55+
working-directory: ${{github.workspace}}/build/tests
56+
run: ctest
5757

5858
- name: Upload coverage reports to Codecov
5959
uses: codecov/codecov-action@v3

.github/workflows/cmake_windows.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: cmake Windows
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types: [opened, synchronize, reopened]
49

510
env:
611
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)

.github/workflows/pixi.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Pixi (conda)
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types: [opened, synchronize, reopened]
49

510
jobs:
611
pixi_conda_build:

.github/workflows/pre-commit.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
name: pre-commit
22

33
on:
4-
pull_request:
54
push:
6-
branches: [master]
5+
branches:
6+
- master
7+
pull_request:
8+
types: [opened, synchronize, reopened]
79

810
jobs:
911
pre-commit:

.github/workflows/ros1.yaml

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

.github/workflows/ros2-rolling.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: ros2-rolling
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types: [opened, synchronize, reopened]
49

510
jobs:
611
industrial_ci:

.github/workflows/ros2.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: ros2
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types: [opened, synchronize, reopened]
49

510
jobs:
611
industrial_ci:

.github/workflows/sonarcube.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
name: Sonarcube Scan
2+
23
on:
34
push:
45
branches:
56
- master
67
pull_request:
78
types: [opened, synchronize, reopened]
9+
810
jobs:
911
build:
1012
name: Build

CMakeLists.txt

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
99
option(BTCPP_SHARED_LIBS "Build shared libraries" ON)
1010
option(BTCPP_BUILD_TOOLS "Build commandline tools" ON)
1111
option(BTCPP_EXAMPLES "Build tutorials and examples" ON)
12-
option(BTCPP_UNIT_TESTS "Build the unit tests" ON)
12+
option(BUILD_TESTING "Build the unit tests" ON)
1313
option(BTCPP_GROOT_INTERFACE "Add Groot2 connection. Requires ZeroMQ" ON)
1414
option(BTCPP_SQLITE_LOGGING "Add SQLite logging." ON)
1515

@@ -82,15 +82,6 @@ if ( ament_cmake_FOUND )
8282
message(STATUS "BehaviorTree is being built using AMENT.")
8383
message(STATUS "------------------------------------------")
8484
include(cmake/ament_build.cmake)
85-
86-
elseif( CATKIN_DEVEL_PREFIX OR CATKIN_BUILD_BINARY_PACKAGE)
87-
88-
add_definitions( -DUSING_ROS )
89-
message(STATUS "------------------------------------------")
90-
message(STATUS "BehaviorTree is being built using CATKIN.")
91-
message(STATUS "------------------------------------------")
92-
include(cmake/catkin_build.cmake)
93-
set(catkin_FOUND TRUE)
9485
else()
9586
message(STATUS "------------------------------------------")
9687
message(STATUS "BehaviorTree is being built with conan.")
@@ -229,15 +220,16 @@ endif()
229220
#############################################################
230221
message( STATUS "BTCPP_LIB_DESTINATION: ${BTCPP_LIB_DESTINATION} " )
231222
message( STATUS "BTCPP_INCLUDE_DESTINATION: ${BTCPP_INCLUDE_DESTINATION} " )
232-
message( STATUS "BTCPP_UNIT_TESTS: ${BTCPP_UNIT_TESTS} " )
233223

234-
if (BTCPP_UNIT_TESTS OR BTCPP_EXAMPLES)
224+
if (BUILD_TESTING OR BTCPP_EXAMPLES)
235225
add_subdirectory(sample_nodes)
236226
endif()
237227

238228
######################################################
239229

240-
if (BTCPP_UNIT_TESTS)
230+
include(CTest)
231+
message( STATUS "BUILD_TESTING: ${BUILD_TESTING} " )
232+
if (BUILD_TESTING)
241233
add_subdirectory(tests)
242234
endif()
243235

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ If you are looking for a more fancy graphical user interface (and I know you do)
5555

5656
Three build systems are supported:
5757

58-
- **catkin**, if you use ROS
5958
- **colcon (ament)**, if you use ROS2
6059
- **conan** otherwise (Linux/Windows).
6160
- **straight cmake** if you want to be personally responsible for dependencies :)

0 commit comments

Comments
 (0)