Skip to content

Commit 92257e2

Browse files
authored
feat(clang-tidy): source ${{ inputs.underlay-workspace }}/setup.sh if exists (#341)
add underlay-workspace Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
1 parent d3b80b4 commit 92257e2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

clang-tidy/action.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ inputs:
3636
description: Will be part of the cache key
3737
default: default
3838
required: false
39+
underlay-workspace:
40+
description: Path to the underlay workspace containing setup.sh
41+
default: ""
42+
required: false
3943

4044
runs:
4145
using: composite
@@ -80,6 +84,9 @@ runs:
8084
else
8185
rosdep update
8286
fi
87+
if [ -f "${{ inputs.underlay-workspace }}/setup.sh" ]; then
88+
. ${{ inputs.underlay-workspace }}/setup.sh
89+
fi
8390
DEBIAN_FRONTEND=noninteractive rosdep install -yqq --from-paths ${package_paths} --ignore-src --rosdistro ${{ inputs.rosdistro }}
8491
shell: bash
8592

@@ -96,6 +103,9 @@ runs:
96103
if: ${{ steps.restore-build-files.outputs.cache-hit != 'true' }}
97104
run: |
98105
. /opt/ros/${{ inputs.rosdistro }}/setup.sh
106+
if [ -f "${{ inputs.underlay-workspace }}/setup.sh" ]; then
107+
. ${{ inputs.underlay-workspace }}/setup.sh
108+
fi
99109
colcon build --event-handlers console_cohesion+ \
100110
--packages-up-to ${{ inputs.target-packages }} \
101111
--cmake-args -DCMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

0 commit comments

Comments
 (0)