From 390de6925a0ede39ca024b835d54efea198ee246 Mon Sep 17 00:00:00 2001 From: Max SCHMELLER Date: Wed, 4 Dec 2024 16:46:18 +0900 Subject: [PATCH] upload all needed file for infer, disable diff analysis for now Signed-off-by: Max SCHMELLER --- .../build-and-test-differential.yaml | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-and-test-differential.yaml b/.github/workflows/build-and-test-differential.yaml index 8d17910ae..2785839ae 100644 --- a/.github/workflows/build-and-test-differential.yaml +++ b/.github/workflows/build-and-test-differential.yaml @@ -19,8 +19,6 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v3 - with: - fetch-depth: 0 - name: Remove exec_depend uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 @@ -38,13 +36,20 @@ jobs: target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} build-depends-repos: ${{ matrix.build-depends-repos }} - - name: Upload compilation database + - name: Upload build artifacts for static analysis if: ${{ steps.build.outcome == 'success' }} - id: upload-compile-db uses: actions/upload-artifact@v4 with: - name: compilation-database-diff-${{ github.sha }} - path: build/compile_commands.json + name: static-analysis-resources-${{ github.sha }} + path: | + build/compile_commands.json + build/**/*.c + build/**/*.cc + build/**/*.cpp + build/**/*.h + build/**/*.hh + build/**/*.hpp + dependency_ws/ if-no-files-found: error - name: Test @@ -71,13 +76,17 @@ jobs: needs: [build-and-test-differential] if: ${{ needs.build-and-test-differential.result }} steps: - - name: Download compilation database + - name: Download static analysis resources id: download-compile-db uses: actions/download-artifact@v4 with: - name: compilation-database-diff-${{ github.sha }} + name: static-analysis-resources-${{ github.sha }} continue-on-error: true + - name: Check out repository + if: ${{ steps.download-compile-db.outcome == 'success' }} + uses: actions/checkout@v3 + - name: Install FB Infer id: fb-infer-install if: ${{ steps.download-compile-db.outcome == 'success' }} @@ -93,8 +102,7 @@ jobs: id: fb-infer-run if: ${{ steps.fb-infer-install.outcome == 'success' }} run: | - git diff --name-only ${{ github.head_ref }}..${{ github.base_ref }} > changed-files.txt - infer run --changed-files-index changed-files.txt --compilation-database ./compile_commands.json + infer run --compilation-database build/compile_commands.json - name: Upload FB Infer Report id: fb-infer-upload