Skip to content

Commit 49211c3

Browse files
committed
WIP
1 parent ff0b05f commit 49211c3

File tree

346 files changed

+1678
-68
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

346 files changed

+1678
-68
lines changed

.cmake/common.cmake

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
set(CMAKE_VERBOSE_MAKEFILE ON)
2+
3+
set(ARILES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../ariles")
4+
5+
6+
#-----
7+
# ARILES
8+
set(ARILES_VISITORS_DEFAULT_MODE "OFF" CACHE STRING "")
9+
set(ARILES_CCACHE "OFF" CACHE STRING "")
10+
11+
set(ARILES_BUILD_REGRESSION_TESTS "${ARILES_ROS_ENABLE_TESTS}" CACHE STRING "")
12+
13+
foreach(ARILES_COMPONENT ${ARILES_COMPONENTS})
14+
string(REGEX REPLACE "-" "_" ARILES_VISITOR "${ARILES_COMPONENT}")
15+
16+
if (ARILES_COMPONENT STREQUAL "core")
17+
set(ARILES_ENABLE_CORE "ON" CACHE STRING "")
18+
else()
19+
set(ARILES_ENABLE_CORE "OFF" CACHE STRING "")
20+
set(ARILES_VISITOR_${ARILES_VISITOR} "ON" CACHE STRING "")
21+
endif()
22+
endforeach()
23+
#-----
24+
25+
26+
if(ARILES_ROS_ENABLE_TESTS)
27+
enable_testing()
28+
endif()
29+
30+
add_subdirectory("${ARILES_DIR}" "./ariles2_${CMAKE_PROJECT_NAME}")
31+
32+
33+
set(ARILES_ROS_CONFIG_INSTALL_DESTINATION "share/${CMAKE_PROJECT_NAME}/cmake/")
34+
35+
include(CMakePackageConfigHelpers)
36+
configure_package_config_file( "${CMAKE_CURRENT_SOURCE_DIR}/../.cmake/config.cmake.in"
37+
"${PROJECT_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake"
38+
INSTALL_DESTINATION "${ARILES_ROS_CONFIG_INSTALL_DESTINATION}"
39+
NO_SET_AND_CHECK_MACRO
40+
NO_CHECK_REQUIRED_COMPONENTS_MACRO)
41+
42+
write_basic_package_version_file(
43+
${PROJECT_BINARY_DIR}/${CMAKE_PROJECT_NAME}ConfigVersion.cmake
44+
VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
45+
COMPATIBILITY SameMajorVersion)
46+
47+
install(FILES package.xml DESTINATION share/${CMAKE_PROJECT_NAME}) # ?
48+
install(FILES "${PROJECT_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake"
49+
DESTINATION ${ARILES_ROS_CONFIG_INSTALL_DESTINATION})
50+
install(FILES "${PROJECT_BINARY_DIR}/${CMAKE_PROJECT_NAME}ConfigVersion.cmake"
51+
DESTINATION ${ARILES_ROS_CONFIG_INSTALL_DESTINATION})

.cmake/config.cmake.in

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
set (@CMAKE_PROJECT_NAME@_VERSION @PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@)
2+
3+
@PACKAGE_INIT@
4+
5+
find_package(ariles2-core REQUIRED)
6+
7+
foreach(ARILES_COMPONENT @ARILES_COMPONENTS@)
8+
find_package(ariles2-${ARILES_COMPONENT} REQUIRED)
9+
10+
list(APPEND @CMAKE_PROJECT_NAME@_LIBRARIES "ariles2::${ARILES_COMPONENT}")
11+
12+
get_target_property(COMPONENT_INCLUDE_DIRS "ariles2::${ARILES_COMPONENT}" INTERFACE_INCLUDE_DIRECTORIES)
13+
if (COMPONENT_INCLUDE_DIRS)
14+
list(APPEND @CMAKE_PROJECT_NAME@_INCLUDE_DIRS "${COMPONENT_INCLUDE_DIRS}")
15+
endif()
16+
endforeach()

.github/workflows/head_2.yml

Lines changed: 67 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
pull_request:
88
types: [opened, reopened]
99

10+
defaults:
11+
run:
12+
shell: bash
13+
1014
env:
1115
APT: sudo apt install -y --no-install-recommends
1216
# Set the python path manually to include /usr/-/python2.7/dist-packages
@@ -181,56 +185,73 @@ jobs:
181185
- run: make clangcheck SCANBUILD=scan-build-20 OPTIONS=noros_tidy TC=clang
182186

183187

188+
# focal
189+
focal_noetic_catkin_old:
190+
container: ros:noetic-ros-base-focal
191+
runs-on: ubuntu-latest
192+
steps:
193+
- uses: actions/checkout@v5
194+
- run: rm -Rf visitor_ros2param visitor_nlohmann_json visitor_rosparam/CATKIN_IGNORE
195+
- run: |
196+
source /opt/ros/noetic/setup.bash
197+
make catkin_test_old ROS_DISTRO=noetic UBUNTU_DISTRO=focal
198+
199+
focal_noetic_catkin_new:
200+
container: ros:noetic-ros-base-focal
201+
runs-on: ubuntu-latest
202+
steps:
203+
- uses: actions/checkout@v5
204+
- run: rm -Rf visitor_rosparam/CATKIN_IGNORE
205+
- run: |
206+
source /opt/ros/noetic/setup.bash
207+
make catkin_test_new ROS_DISTRO=noetic UBUNTU_DISTRO=focal
208+
209+
# does not work with ros2param (rclcpp dependency)
210+
#prerelease:
211+
# runs-on: ubuntu-20.04
212+
# steps:
213+
# - uses: actions/checkout@v5
214+
# with:
215+
# fetch-depth: 0
216+
# - run: make ros_prerelease ROS_DISTRO=noetic UBUNTU_DISTRO=focal BRANCH=`git branch --show-current`
217+
# env:
218+
# CCACHE_DIR: ${GITHUB_WORKSPACE}/.ccache
219+
184220
jammy_ccws:
185-
runs-on: ubuntu-22.04
221+
container: asherikov/ccws_jammy
222+
runs-on: ubuntu-latest
223+
env:
224+
WORKSPACE_SRC: ${GITHUB_WORKSPACE}
186225
steps:
187226
- uses: actions/checkout@v5
188-
with:
189-
repository: asherikov/ccws
190-
- uses: actions/checkout@v5
191-
with:
192-
ref: pkg_ws_2
193-
path: src/ariles_ws
194-
- run: cd src/ariles_ws; make update VERSION=${GITHUB_SHA}; rm -Rf ariles2_rosparam_ws demo
195-
- run: make bp_install_build BUILD_PROFILE=static_checks
196-
- run: make BUILD_PROFILE=static_checks
197-
- run: make bp_install_build BUILD_PROFILE=scan_build
198-
- run: make dep_install PKG=ariles2_core_ws
199-
- run: make dep_install PKG=ariles2_graphviz_ws
200-
- run: make dep_install PKG=ariles2_namevalue2_ws
201-
- run: make dep_install PKG=ariles2_octave_ws
202-
- run: make dep_install PKG=ariles2_pugixml_ws
203-
- run: make dep_install PKG=ariles2_rapidjson_ws
204-
- run: make dep_install PKG=ariles2_ros2param_ws
205-
- run: make dep_install PKG=ariles2_yamlcpp_ws
206-
- run: make _ws BUILD_PROFILE=scan_build
207-
- run: make bp_install_build BUILD_PROFILE=cppcheck
208-
- run: make BUILD_PROFILE=static_checks BASE_BUILD_PROFILE=scan_build
227+
- run: rm demo_plain/CATKIN_IGNORE
228+
- run: |
229+
cd /ccws
230+
apt update
231+
make dep_install
232+
make ariles2_plain_demo ariles2_ros2param_ws
233+
- run: |
234+
cd /ccws
235+
make BUILD_PROFILE=static_checks
236+
make _ws BUILD_PROFILE=scan_build
237+
make BUILD_PROFILE=static_checks BASE_BUILD_PROFILE=scan_build
209238
210239
noble_ccws:
211-
runs-on: ubuntu-24.04
240+
container: asherikov/ccws_noble
241+
runs-on: ubuntu-latest
242+
env:
243+
WORKSPACE_SRC: ${GITHUB_WORKSPACE}
212244
steps:
213245
- uses: actions/checkout@v5
214-
with:
215-
repository: asherikov/ccws
216-
- uses: actions/checkout@v5
217-
with:
218-
ref: pkg_ws_2
219-
path: src/ariles_ws
220-
- run: cd src/ariles_ws; make update VERSION=${GITHUB_SHA}; rm -Rf ariles2_rosparam_ws demo
221-
- run: make bp_install_build BUILD_PROFILE=static_checks
222-
- run: make BUILD_PROFILE=static_checks
223-
- run: make bp_install_build BUILD_PROFILE=scan_build
224-
- run: make dep_install PKG=ariles2_core_ws
225-
- run: make dep_install PKG=ariles2_graphviz_ws
226-
- run: make dep_install PKG=ariles2_namevalue2_ws
227-
- run: make dep_install PKG=ariles2_octave_ws
228-
- run: make dep_install PKG=ariles2_pugixml_ws
229-
- run: make dep_install PKG=ariles2_rapidjson_ws
230-
- run: make dep_install PKG=ariles2_ros2param_ws
231-
- run: make dep_install PKG=ariles2_yamlcpp_ws
232-
# disable due to https://github.com/Tencent/rapidjson/issues/2347
233-
- run: touch src/ariles_ws/ariles2_rapidjson_ws/COLCON_IGNORE
234-
- run: make _ws BUILD_PROFILE=scan_build
235-
- run: make bp_install_build BUILD_PROFILE=cppcheck
236-
- run: make BUILD_PROFILE=static_checks BASE_BUILD_PROFILE=scan_build
246+
- run: rm demo_plain/CATKIN_IGNORE
247+
- run: |
248+
cd /ccws
249+
apt update
250+
make dep_install
251+
make ariles2_plain_demo ariles2_ros2param_ws
252+
- run: |
253+
cd /ccws
254+
make BUILD_PROFILE=static_checks
255+
make _ws BUILD_PROFILE=scan_build
256+
make BUILD_PROFILE=static_checks BASE_BUILD_PROFILE=scan_build
257+

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[submodule "doc/dox"]
2-
path = doc/dox
2+
path = ariles/doc/dox
33
url = ../ariles.git
44
branch = gh-pages

.make/common.mk

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
help:
2+
-@grep --color -Ev "(^ )|(^$$)" Makefile
3+
-@grep --color -Ev "(^ )|(^$$)" make/*.mk
4+
5+
6+
# release
7+
#----------------------------------------------
8+
9+
update_version:
10+
sed -i -e "s=\(project([ a-zA-Z0-9_-]* VERSION\) [0-9]*\.[0-9]*\.[0-9]*)=\1 ${VERSION})=" */CMakeLists.txt
11+
#done automatically
12+
sed -i -e "s=<version>[0-9]*\.[0-9]*\.[0-9]*</version>=<version>${VERSION}</version>=" */package.xml
13+

0 commit comments

Comments
 (0)