You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.1KB

  1. name: CodeQL
  2. on: [push, pull_request]
  3. jobs:
  4. analyze:
  5. name: Analyze
  6. runs-on: ubuntu-20.04
  7. permissions:
  8. actions: read
  9. contents: read
  10. security-events: write
  11. strategy:
  12. fail-fast: false
  13. matrix:
  14. language: [ 'cpp', 'javascript' ]
  15. # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
  16. # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
  17. steps:
  18. - uses: actions/checkout@v1
  19. - name: Initialize CodeQL
  20. uses: github/codeql-action/init@v2
  21. with:
  22. languages: ${{ matrix.language }}
  23. # If you wish to specify custom queries, you can do so here or in a config file.
  24. # By default, queries listed here will override any specified in a config file.
  25. # Prefix the list here with "+" to use these queries and those in the config file.
  26. # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
  27. # queries: security-extended,security-and-quality
  28. - name: 下载submodule源码
  29. run: mv -f .gitmodules_github .gitmodules && git submodule sync && git submodule update --init
  30. - name: apt-get安装依赖库(非必选)
  31. run: sudo apt-get update && sudo apt-get install -y cmake libssl-dev libsdl-dev libavcodec-dev libavutil-dev libswscale-dev libresample-dev
  32. - name: 下载 SRTP
  33. uses: actions/checkout@v2
  34. with:
  35. repository: cisco/libsrtp
  36. fetch-depth: 1
  37. ref: v2.3.0
  38. path: 3rdpart/libsrtp
  39. - name: 编译 SRTP
  40. run: cd 3rdpart/libsrtp && ./configure --enable-openssl && make -j4 && sudo make install
  41. - name: 编译
  42. run: mkdir -p linux_build && cd linux_build && cmake .. -DENABLE_WEBRTC=true -DENABLE_FFMPEG=true && make -j $(nproc)
  43. - name: 运行MediaServer
  44. run: pwd && cd release/linux/Debug && sudo ./MediaServer -d &
  45. - name: Perform CodeQL Analysis
  46. uses: github/codeql-action/analyze@v2