Skip to content

Commit

Permalink
upload all needed file for infer, disable diff analysis for now
Browse files Browse the repository at this point in the history
Signed-off-by: Max SCHMELLER <[email protected]>
  • Loading branch information
mojomex committed Dec 4, 2024
1 parent 029932e commit 390de69
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/build-and-test-differential.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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' }}
Expand All @@ -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
Expand Down

0 comments on commit 390de69

Please sign in to comment.