codeql.yml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. name: "CodeQL"
  2. on:
  3. push:
  4. branches: [ 'master' ]
  5. pull_request:
  6. # The branches below must be a subset of the branches above
  7. branches: [ 'master' ]
  8. schedule:
  9. - cron: '1 16 * * 1'
  10. jobs:
  11. analyze:
  12. name: Analyze
  13. runs-on: ubuntu-latest
  14. permissions:
  15. actions: read
  16. contents: read
  17. security-events: write
  18. strategy:
  19. fail-fast: false
  20. matrix:
  21. language: [ 'cpp' ]
  22. # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
  23. # Use only 'java' to analyze code written in Java, Kotlin or both
  24. # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
  25. # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
  26. env:
  27. SCALAR_DOUBLE: ON
  28. COMPILER: GCC
  29. CC: gcc
  30. CXX: g++
  31. steps:
  32. - name: Checkout
  33. uses: actions/checkout@v4
  34. with:
  35. submodules: recursive
  36. - name: Install Dependencies
  37. run: |
  38. sudo apt-get update -qq
  39. sudo apt-get install -qy cmake ninja-build libqt5svg5-dev libqt5opengl5-dev qttools5-dev qttools5-dev-tools libqt5websockets5-dev libtbb-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libboost-program-options-dev libboost-thread-dev libeigen3-dev libcgal-dev libcgal-qt5-dev libgdal-dev libpcl-dev libdlib-dev libproj-dev libxerces-c-dev xvfb libjsoncpp-dev liblaszip-dev
  40. - name: Configure cmake
  41. run: |
  42. mkdir build
  43. cmake \
  44. -B build \
  45. -S . \
  46. -G Ninja \
  47. -DEIGEN_ROOT_DIR=/usr/include/eigen3 \
  48. -DJSON_ROOT_DIR=/usr/include/jsoncpp \
  49. -DDLIB_ROOT=/usr/include \
  50. -DCCCORELIB_SCALAR_DOUBLE=${{ matrix.scalar_double }} \
  51. -DCCCORELIB_USE_TBB=ON \
  52. -DPLUGIN_EXAMPLE_GL=ON \
  53. -DPLUGIN_EXAMPLE_IO=ON \
  54. -DPLUGIN_EXAMPLE_STANDARD=ON \
  55. -DPLUGIN_GL_QEDL=ON \
  56. -DPLUGIN_GL_QSSAO=ON \
  57. -DPLUGIN_IO_QADDITIONAL=ON \
  58. -DPLUGIN_IO_QCORE=ON \
  59. -DPLUGIN_IO_QE57=ON \
  60. -DPLUGIN_IO_QPHOTOSCAN=ON \
  61. -DPLUGIN_IO_QLAS=ON \
  62. -DPLUGIN_IO_QRDB=ON \
  63. -DPLUGIN_IO_QRDB_FETCH_DEPENDENCY=ON \
  64. -DPLUGIN_IO_QRDB_INSTALL_DEPENDENCY=ON \
  65. -DPLUGIN_STANDARD_QANIMATION=ON \
  66. -DQANIMATION_WITH_FFMPEG_SUPPORT=OFF \
  67. -DPLUGIN_STANDARD_QBROOM=ON \
  68. -DPLUGIN_STANDARD_QCANUPO=ON \
  69. -DPLUGIN_STANDARD_QCOMPASS=ON \
  70. -DPLUGIN_STANDARD_QCSF=ON \
  71. -DPLUGIN_STANDARD_QFACETS=ON \
  72. -DPLUGIN_STANDARD_QHOUGH_NORMALS=ON \
  73. -DPLUGIN_STANDARD_QHPR=ON \
  74. -DPLUGIN_STANDARD_QM3C2=ON \
  75. -DPLUGIN_STANDARD_QPCV=ON \
  76. -DPLUGIN_STANDARD_QPOISSON_RECON=ON \
  77. -DPLUGIN_STANDARD_QSRA=ON \
  78. -DPLUGIN_STANDARD_QRANSAC_SD=ON \
  79. -DPLUGIN_STANDARD_QPCL=ON \
  80. -DPLUGIN_STANDARD_QCLOUDLAYERS=ON \
  81. -DBUILD_TESTING=ON
  82. # Initializes the CodeQL tools for scanning.
  83. - name: Initialize CodeQL
  84. uses: github/codeql-action/init@v2
  85. with:
  86. languages: ${{ matrix.language }}
  87. # If you wish to specify custom queries, you can do so here or in a config file.
  88. # By default, queries listed here will override any specified in a config file.
  89. # Prefix the list here with "+" to use these queries and those in the config file.
  90. # For more 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
  91. # queries: security-extended,security-and-quality
  92. - name: Build
  93. run: cmake --build build --parallel
  94. - name: Perform CodeQL Analysis
  95. uses: github/codeql-action/analyze@v2
  96. with:
  97. category: "/language:${{matrix.language}}"