coverity.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Static Analysis using Coverity Scan
  2. name: coverity
  3. on:
  4. push:
  5. branches: coverity
  6. pull_request:
  7. branches: coverity
  8. jobs:
  9. coverity:
  10. name: Static analysis
  11. runs-on: ubuntu-latest
  12. env:
  13. COVERITY_URL: https://scan.coverity.com
  14. COVERITY_PROJECT: bee2
  15. COVERITY_USER: ${{secrets.COVERITY_USER}}
  16. COVERITY_EMAIL: ${{secrets.COVERITY_EMAIL}}
  17. COVERITY_TOKEN: ${{secrets.COVERITY_TOKEN}}
  18. steps:
  19. - name: Get source
  20. uses: actions/checkout@v3
  21. - name: Coverity download
  22. run: |
  23. mkdir ${{github.workspace}}/cov-analysis-linux64
  24. curl -fLsS $COVERITY_URL/download/linux64 \
  25. --data "token=$COVERITY_TOKEN&project=$COVERITY_USER%2F$COVERITY_PROJECT" | \
  26. tar xz --strip 1 -C ${{github.workspace}}/cov-analysis-linux64
  27. - name: Coverity build
  28. run: |
  29. mkdir ${{github.workspace}}/build && cd ${{github.workspace}}/build
  30. export PATH=$PATH:${{github.workspace}}/cov-analysis-linux64/bin
  31. CC=gcc cmake -DCMAKE_BUILD_TYPE=Debug ..
  32. cov-build --dir cov-int make
  33. tar czf $COVERITY_PROJECT.tgz cov-int
  34. - name: Coverity upload
  35. working-directory: ${{github.workspace}}/build
  36. run: >
  37. curl --form token=$COVERITY_TOKEN
  38. --form email=$COVERITY_EMAIL
  39. --form file=@$COVERITY_PROJECT.tgz
  40. --form version=$GITHUB_SHA
  41. --form description=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
  42. $COVERITY_URL/builds?project=$COVERITY_USER%2F$COVERITY_PROJECT