codeql.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. name: "CodeQL"
  2. on:
  3. push:
  4. branches: [ "github" ]
  5. schedule:
  6. - cron: '39 14 * * 1'
  7. jobs:
  8. analyze:
  9. name: Analyze
  10. runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
  11. timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
  12. permissions:
  13. security-events: write
  14. strategy:
  15. fail-fast: false
  16. matrix:
  17. language: [ 'c-cpp' ]
  18. steps:
  19. - name: Checkout repository
  20. uses: actions/checkout@v4
  21. - name: Initialize CodeQL
  22. uses: github/codeql-action/init@v3
  23. with:
  24. languages: ${{ matrix.language }}
  25. - name: Install dependencies
  26. run: |
  27. sudo apt-get update
  28. sudo add-apt-repository --yes ppa:mhier/libboost-latest
  29. sudo apt-get install --yes build-essential git meson ninja-build cmake libboost1.81-dev libboost-log1.81-dev libyaml-cpp-dev libpcap-dev libtins-dev googletest
  30. git clone https://github.com/LaKabane/libtuntap.git /tmp/libtuntap/
  31. cd /tmp/
  32. cmake -DCMAKE_BUILD_TYPE=Release -B build -S "libtuntap"
  33. cmake --build build
  34. sudo cmake --install build --prefix /usr
  35. - name: Build
  36. run: |
  37. make
  38. - name: Perform CodeQL Analysis
  39. uses: github/codeql-action/analyze@v3
  40. with:
  41. category: "/language:${{matrix.language}}"