codeql-analysis.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. name: "CodeQL"
  2. # @see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags
  3. on: [push, pull_request]
  4. # See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
  5. permissions: write-all
  6. jobs:
  7. analyze:
  8. name: actions-codeql-analyze
  9. runs-on: ubuntu-20.04
  10. strategy:
  11. fail-fast: false
  12. matrix:
  13. language: [ 'cpp' ]
  14. steps:
  15. - name: Checkout repository
  16. uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
  17. # Initializes the CodeQL tools for scanning.
  18. - name: Initialize CodeQL
  19. uses: github/codeql-action/init@515828d97454b8354517688ddc5b48402b723750 # v2.1.38
  20. with:
  21. languages: ${{ matrix.language }}
  22. - name: Build SRS
  23. run: |
  24. echo "pwd: $(pwd), who: $(whoami)"
  25. docker run --rm -v $(pwd):$(pwd) -w $(pwd)/trunk ossrs/srs:ubuntu20-cache \
  26. bash -c "./configure && chmod 777 -R objs"
  27. cd trunk && ./configure && make
  28. - name: Perform CodeQL Analysis
  29. uses: github/codeql-action/analyze@515828d97454b8354517688ddc5b48402b723750 # v2.1.38