Skip to content

Commit

Permalink
Added own clang-format to github actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianSvanland committed Feb 2, 2024
1 parent 19b8c17 commit cff44de
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/clang-tidy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,26 @@ jobs:
name: clang-tidy-result
path: /tmp/clang-tidy-result/

- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/[email protected]
- name: Install clang-format
run: |
sudo apt-get -yqq update
sudo apt-get -yqq install clang-format
shell: bash

- name: Run clang-format style check.
id: clang-format
run: |
clang-format ${{ steps.target-files.outputs.all }} > /tmp/clang-format-result.txt || true
- name: Check if the clang-format-result.txt file exists
id: check-clang-format-result-existence
uses: autowarefoundation/autoware-github-actions/check-file-existence@v1
with:
files: /tmp/clang-format-result.txt

- name: Upload artifacts
if: ${{ steps.check-clang-format-result-existence.outputs.exists == 'true' }}
uses: actions/upload-artifact@v4
with:
clang-format-version: '13'
check-path: ${{ steps.target-files.outputs.all }}
name: clang-format-result
path: /tmp/clang-format-result.txt

0 comments on commit cff44de

Please sign in to comment.