codeql.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. name: "CodeQL"
  2. on:
  3. push:
  4. branches: [ "master", "3.1", "3.2", "3.3", "4.0", "4.1", "4.2", "4.3", "4.4", "5.0", "5.1", "5.2", "5.3", "5.4", "5.5", "5.6" ]
  5. pull_request:
  6. branches: [ "master" ]
  7. schedule:
  8. - cron: "35 19 * * 3"
  9. jobs:
  10. analyze:
  11. name: Analyze
  12. runs-on: ubuntu-latest
  13. permissions:
  14. actions: read
  15. contents: read
  16. security-events: write
  17. strategy:
  18. fail-fast: false
  19. matrix:
  20. language: [ javascript, cpp, python ]
  21. steps:
  22. - name: Checkout
  23. uses: actions/checkout@v3
  24. with:
  25. submodules: recursive
  26. - name: Install Packages (cpp)
  27. if: ${{ matrix.language == 'cpp' }}
  28. run: |
  29. sudo apt-get update
  30. sudo apt-get install --yes bison default-libmysqlclient-dev flex libcurl4-openssl-dev libjansson-dev libhiredis-dev libevent-dev liblua5.1-0-dev libpcre3-dev libncurses5-dev libpq-dev libreadline-dev libssl-dev libunistring-dev libxml2-dev pkg-config python3 python3-dev uuid-dev zlib1g-dev
  31. - name: Configure (cpp)
  32. if: ${{ matrix.language == 'cpp' }}
  33. run: make include_modules='app_lua app_python3 cnxcc db_mysql db_postgres db_redis dialplan http_client jansson lcr ndb_redis presence presence_xml presence_dialoginfo pua pua_dialoginfo topos_redis uuid websocket xmlops' cfg
  34. - name: After Prepare (cpp)
  35. if: ${{ matrix.language == 'cpp' }}
  36. run: export PKG_CONFIG_PATH=$RUNNER_TEMP/usr/lib/pkgconfig:$PKG_CONFIG_PATH && echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
  37. - name: Initialize CodeQL
  38. uses: github/codeql-action/init@v2
  39. with:
  40. languages: ${{ matrix.language }}
  41. queries: +security-and-quality
  42. - name: Autobuild
  43. uses: github/codeql-action/autobuild@v2
  44. if: ${{ matrix.language == 'javascript' || matrix.language == 'python' }}
  45. - name: Build cpp
  46. if: ${{ matrix.language == 'cpp' }}
  47. run: make all
  48. - name: Perform CodeQL Analysis
  49. uses: github/codeql-action/analyze@v2
  50. with:
  51. category: "/language:${{ matrix.language }}"