codeql.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: CodeQL
  2. on:
  3. schedule:
  4. - cron: '23 3 * * 1'
  5. workflow_dispatch:
  6. permissions:
  7. contents: read
  8. jobs:
  9. analyze:
  10. name: Analyze C++
  11. runs-on: ubuntu-24.04
  12. permissions:
  13. actions: read
  14. contents: read
  15. security-events: write
  16. steps:
  17. - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
  18. with:
  19. submodules: true
  20. - name: ccache
  21. uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24
  22. with:
  23. key: ${{ github.job }}
  24. - name: Install dependencies
  25. run: sudo apt-get update && sudo apt-get -y install libxrandr-dev libxinerama-dev libxcomposite-dev libxdamage-dev libxcursor-dev libxi-dev libgl-dev libglew-dev freeglut3-dev libsdl2-dev liblz4-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libxxf86vm-dev libglm-dev libglfw3-dev libmpv-dev mpv libmpv2 libpulse-dev libpulse0 libfftw3-dev libfreetype-dev libdbus-1-dev libnode-dev wayland-scanner++ wayland-protocols libwayland-dev
  26. - name: Initialize CodeQL
  27. uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4
  28. with:
  29. languages: c-cpp
  30. build-mode: manual
  31. queries: security-extended
  32. config: |
  33. paths-ignore:
  34. - src/External
  35. - name: Build
  36. run: |
  37. cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=1 -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
  38. cmake --build build --target linux-wallpaperengine -j"$(nproc)"
  39. - name: Perform CodeQL analysis
  40. uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4
  41. with:
  42. category: /language:c-cpp