File tree 2 files changed +45
-0
lines changed
2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git).
2
+ # For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst)
3
+
4
+ name : CI
5
+
6
+ on :
7
+ workflow_dispatch :
8
+ pull_request :
9
+ push :
10
+ branches :
11
+ - ros2
12
+
13
+ jobs :
14
+ ci :
15
+ strategy :
16
+ fail-fast : false
17
+ matrix :
18
+ env :
19
+ - TARGET_CMAKE_ARGS : -DENABLE_SANITIZER_ADDRESS=ON -DCMAKE_BUILD_TYPE=Debug
20
+ NAME : Address Sanitizer
21
+ - TARGET_CMAKE_ARGS : -DENABLE_SANITIZER_THREAD=ON -DCMAKE_BUILD_TYPE=Debug
22
+ NAME : Thread Sanitizer
23
+ env :
24
+ ROS_DISTRO : rolling
25
+ runs-on : ubuntu-latest
26
+ name : ${{ matrix.env.NAME }}
27
+ steps :
28
+ - uses : actions/checkout@v2
29
+ - uses : ' ros-industrial/industrial_ci@master'
30
+ env : ${{matrix.env}}
Original file line number Diff line number Diff line change @@ -10,6 +10,21 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
10
10
add_compile_options (-Wall -Wextra -Wpedantic)
11
11
endif ()
12
12
13
+ option (ENABLE_SANITIZER_ADDRESS "Enable address sanitizer" OFF )
14
+ if (ENABLE_SANITIZER_ADDRESS)
15
+ add_compile_options (-fsanitize=address)
16
+ add_link_options (-fsanitize=address)
17
+ endif ()
18
+
19
+ option (ENABLE_SANITIZER_THREAD "Enable thread sanitizer" OFF )
20
+ if (ENABLE_SANITIZER_THREAD)
21
+ if (ENABLE_SANITIZER_ADDRESS)
22
+ message (WARNING "Thread sanitizer does not work with Address sanitizer enabled" )
23
+ endif ()
24
+ add_compile_options (-fsanitize=thread)
25
+ add_link_options (-fsanitize=thread)
26
+ endif ()
27
+
13
28
set (CLASS_LOADER_IGNORE_AMENT FALSE CACHE BOOL
14
29
"Do not use ament when building this package." )
15
30
if (NOT CLASS_LOADER_IGNORE_AMENT)
You can’t perform that action at this time.
0 commit comments