From 4f74af8fb73753871ae55632852966040a2e2b85 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Thu, 3 Nov 2022 11:39:18 +0100 Subject: [PATCH] Show clang-tidy results --- .github/workflows/ci.yaml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ded2a005..b30d2ddc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,7 +22,7 @@ jobs: NAME: ccov TARGET_CMAKE_ARGS: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="--coverage" - IMAGE: noetic-source - CLANG_TIDY: pedantic + CLANG_TIDY: true TARGET_CMAKE_ARGS: >- -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Werror -Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls" @@ -35,7 +35,7 @@ jobs: env: CATKIN_LINT: true - CLANG_TIDY_ARGS: --fix --fix-errors --format-style=file + CLANG_TIDY_ARGS: -quiet -export-fixes ${{ github.workspace }}/.work/clang-tidy-fixes.yaml DOCKER_IMAGE: moveit/moveit:${{ matrix.env.IMAGE }} UNDERLAY: /root/ws_moveit/install DOWNSTREAM_WORKSPACE: "github:ubi-agni/mtc_demos#master github:TAMS-Group/mtc_pour#master" @@ -65,15 +65,29 @@ jobs: - id: ici name: Run industrial_ci - uses: ros-industrial/industrial_ci@master + uses: rhaschke/industrial_ci@clang-tidy env: ${{ matrix.env }} + - name: Show clang-tidy warnings + if: always() && matrix.env.CLANG_TIDY + uses: asarium/clang-tidy-action@v1 + with: + fixesFile: ${{ env.BASEDIR }}/clang-tidy-fixes.yaml + + - name: Upload clang-tidy fixes (on failure) + uses: actions/upload-artifact@v3 + if: failure() && (steps.ici.outputs.clang_tidy_checks) + with: + name: clang-tidy-fixes.yaml + path: ${{ env.BASEDIR }}/clang-tidy-fixes.yaml + - name: Upload test artifacts (on failure) uses: actions/upload-artifact@v3 if: failure() && (steps.ici.outputs.run_target_test || steps.ici.outputs.target_test_results) with: name: test-results-${{ matrix.env.IMAGE }} path: ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml + - name: Generate codecov report uses: rhaschke/lcov-action@main if: contains(matrix.env.TARGET_CMAKE_ARGS, '--coverage') && steps.ici.outputs.target_test_results == '0'