Skip to content

Commit c9aa5e0

Browse files
HansRobopalas21
authored andcommitted
chore(ci): fix errors in clang-tidy-differential job in build-and-test-differential workflow when all diffs are deletion (autowarefoundation#7737)
* chore(ci): fix errors in clang-tidy-differential job in build-and-test-differential workflow when all diffs are deletion Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com> * chore: delete lidar_centerpoint_tvm package for test Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com> * Revert "chore: delete lidar_centerpoint_tvm package for test" This reverts commit 339519a. Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com> --------- Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com> Signed-off-by: palas21 <palas21@itu.edu.tr>
1 parent 5177e95 commit c9aa5e0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/build-and-test-differential.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,19 @@ jobs:
142142
id: get-modified-packages
143143
uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1
144144

145-
- name: Get modified files
146-
id: get-modified-files
145+
- name: Get changed files (existing files only)
146+
id: get-changed-files
147147
run: |
148-
echo "changed_files=$(git diff --name-only "origin/${{ github.base_ref }}"...HEAD | grep -E '\.(cpp|hpp)$' | tr '\n' ' ' || true)" >> $GITHUB_OUTPUT
148+
echo "changed-files=$(git diff --name-only "origin/${{ github.base_ref }}"...HEAD | grep -E '\.(cpp|hpp)$' | while read -r file; do [ -e "$file" ] && echo -n "$file "; done)" >> $GITHUB_OUTPUT
149149
shell: bash
150150

151151
- name: Run clang-tidy
152-
if: ${{ steps.get-modified-files.outputs.changed_files != '' }}
152+
if: ${{ steps.get-changed-files.outputs.changed-files != '' }}
153153
uses: autowarefoundation/autoware-github-actions/clang-tidy@v1
154154
with:
155155
rosdistro: humble
156156
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
157-
target-files: ${{ steps.get-modified-files.outputs.changed_files }}
157+
target-files: ${{ steps.get-changed-files.outputs.changed-files }}
158158
clang-tidy-config-url: https://raw.githubusercontent.com/autowarefoundation/autoware/main/.clang-tidy
159159
build-depends-repos: build_depends.repos
160160
cache-key-element: cuda

0 commit comments

Comments
 (0)