codeql-analysis.yml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # For most projects, this workflow file will not need changing; you simply need
  2. # to commit it to your repository.
  3. #
  4. # You may wish to alter this file to override the set of languages analyzed,
  5. # or to provide custom queries or build logic.
  6. #
  7. # ******** NOTE ********
  8. # We have attempted to detect the languages in your repository. Please check
  9. # the `language` matrix defined below to confirm you have the correct set of
  10. # supported CodeQL languages.
  11. #
  12. name: "CodeQL"
  13. on:
  14. workflow_dispatch:
  15. push:
  16. branches: [ master ]
  17. pull_request:
  18. # The branches below must be a subset of the branches above
  19. branches: [ master ]
  20. schedule:
  21. - cron: '20 18 * * 6'
  22. jobs:
  23. analyze:
  24. name: Analyze
  25. runs-on: ubuntu-20.04
  26. permissions:
  27. actions: read
  28. contents: read
  29. security-events: write
  30. strategy:
  31. fail-fast: false
  32. matrix:
  33. language: [ 'python' ]
  34. # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
  35. # Learn more about CodeQL language support at https://git.io/codeql-language-support
  36. steps:
  37. - name: Checkout repository
  38. uses: actions/checkout@v2
  39. - name: Set up Python
  40. uses: actions/setup-python@v2
  41. with:
  42. python-version: '3.8'
  43. - name: Install dependencies
  44. run: |
  45. sudo apt-get install -y gcc g++ make openssl supervisor libgmp-dev libmpfr-dev libmpc-dev libaio1 libaio-dev numactl autoconf automake libtool libffi-dev libssl-dev liblz4-1 liblz4-dev liblz4-tool zlib1g-dev
  46. python -m pip install --upgrade pip
  47. if [ -f python/requirements.txt ];
  48. then python -m pip install -r python/requirements.txt;
  49. fi
  50. # Set the `CODEQL-PYTHON` environment variable to the Python executable
  51. # that includes the dependencies
  52. echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
  53. # Initializes the CodeQL tools for scanning.
  54. - name: Initialize CodeQL
  55. uses: github/codeql-action/init@v1
  56. with:
  57. languages: ${{ matrix.language }}
  58. setup-python-dependencies: false
  59. # If you wish to specify custom queries, you can do so here or in a config file.
  60. # By default, queries listed here will override any specified in a config file.
  61. # Prefix the list here with "+" to use these queries and those in the config file.
  62. # queries: ./path/to/local/query, your-org/your-repo/queries@main
  63. # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
  64. # If this step fails, then you should remove it and run the build manually (see below)
  65. - name: Autobuild
  66. uses: github/codeql-action/autobuild@v1
  67. # ℹ️ Command-line programs to run using the OS shell.
  68. # 📚 https://git.io/JvXDl
  69. # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
  70. # and modify them (or add more) to build your code if your project
  71. # uses a compiled language
  72. #- run: |
  73. # make bootstrap
  74. # make release
  75. - name: Perform CodeQL Analysis
  76. uses: github/codeql-action/analyze@v1