From cff44def06c3fa2a16081f01a84ebf17a5c6d855 Mon Sep 17 00:00:00 2001 From: SebastianSvanland Date: Fri, 2 Feb 2024 17:20:28 +0100 Subject: [PATCH] Added own clang-format to github actions. --- .github/workflows/clang-tidy.yaml | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/clang-tidy.yaml b/.github/workflows/clang-tidy.yaml index e8ed216e7..1895d5ca6 100644 --- a/.github/workflows/clang-tidy.yaml +++ b/.github/workflows/clang-tidy.yaml @@ -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/clang-format-action@v4.11.0 + - 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 }} \ No newline at end of file + name: clang-format-result + path: /tmp/clang-format-result.txt \ No newline at end of file