pvsstudio.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: PVS-Studio build analysis
  2. on: workflow_dispatch
  3. jobs:
  4. build-analyze:
  5. runs-on: ubuntu-latest
  6. env:
  7. FBT_NO_SYNC: "true"
  8. TARGETS: f7
  9. DEFAULT_TARGET: f7
  10. steps:
  11. - name: 'Decontaminate previous build leftovers'
  12. run: |
  13. if [ -d .git ]; then
  14. git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
  15. fi
  16. - uses: actions/checkout@v2
  17. with:
  18. fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
  19. submodules: 'recursive'
  20. - name: Install tools
  21. run: |
  22. wget -q -O - https://files.pvs-studio.com/etc/pubkey.txt \
  23. | sudo apt-key add -
  24. sudo wget -O /etc/apt/sources.list.d/viva64.list \
  25. https://files.pvs-studio.com/etc/viva64.list
  26. sudo apt update
  27. sudo apt install pvs-studio
  28. pvs-studio-analyzer credentials ${{ secrets.PVS_STUDIO_CREDENTIALS }}
  29. - name: Build
  30. run: |
  31. ./pvs-build
  32. - name: Analyze
  33. run: |
  34. pvs-studio-analyzer analyze @.pvsoptions -j$(grep -c processor /proc/cpuinfo) -f flipperzero-firmware_unleashed/build/f7-firmware-DC/compile_commands.json
  35. - name: Convert report
  36. run: |
  37. plog-converter -t sarif -o pvs-report.sarif PVS-Studio.log
  38. - name: Publish report
  39. uses: github/codeql-action/upload-sarif@v1
  40. with:
  41. sarif_file: pvs-report.sarif
  42. category: PVS-Studio