Skip to content

Commit

Permalink
feat(clang-tidy, colcon-build): make CMAKE_BUILD_TYPE optional (#185)
Browse files Browse the repository at this point in the history
* fix(clang-tidy, colcon-build): use RelWithDebInfo for CMAKE_BUILD_TYPE

Signed-off-by: Kenji Miyake <[email protected]>

* use Debug

Signed-off-by: Kenji Miyake <[email protected]>

* make cmake-build-type optional

Signed-off-by: Kenji Miyake <[email protected]>

Signed-off-by: Kenji Miyake <[email protected]>
  • Loading branch information
kenji-miyake authored Sep 28, 2022
1 parent c3e0ce4 commit ebc6112
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions clang-tidy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
| target-packages | true | The target packages to analyze by Clang-Tidy. |
| target-files | false | The target files. |
| build-depends-repos | false | The `.repos` file that includes build dependencies. |
| cmake-build-type | false | The value for `CMAKE_BUILD_TYPE`. |
| token | false | The token for build dependencies and `.clang-tidy`. |

## Outputs
Expand Down
6 changes: 5 additions & 1 deletion clang-tidy/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ inputs:
build-depends-repos:
description: ""
required: false
cmake-build-type:
description: ""
required: false
default: Release
token:
description: ""
required: false
Expand Down Expand Up @@ -85,7 +89,7 @@ runs:
. /opt/ros/${{ inputs.rosdistro }}/setup.sh
colcon build --event-handlers console_cohesion+ \
--packages-up-to ${{ inputs.target-packages }} \
--cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
--cmake-args -DCMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
shell: bash

- name: Retrieve .clang-tidy
Expand Down
1 change: 1 addition & 0 deletions colcon-build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
| rosdistro | true | ROS distro. |
| target-packages | true | The target packages to build. |
| build-depends-repos | false | The `.repos` file that includes build dependencies. |
| cmake-build-type | false | The value for `CMAKE_BUILD_TYPE`. |
| token | false | The token for build dependencies. |

## Outputs
Expand Down
6 changes: 5 additions & 1 deletion colcon-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ inputs:
build-depends-repos:
description: ""
required: false
cmake-build-type:
description: ""
required: false
default: Release
token:
description: ""
required: false
Expand Down Expand Up @@ -62,7 +66,7 @@ runs:
. /opt/ros/${{ inputs.rosdistro }}/setup.sh
colcon build --event-handlers console_cohesion+ \
--packages-above-and-dependencies ${{ inputs.target-packages }} \
--cmake-args -DCMAKE_BUILD_TYPE=Release \
--cmake-args -DCMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} \
--mixin coverage-gcc coverage-pytest compile-commands
shell: bash

Expand Down

0 comments on commit ebc6112

Please sign in to comment.