From 30481d0ebc5903a1006c4da2a21b9914b1678f4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Mal=C3=BD?= Date: Sat, 16 Sep 2023 01:35:13 +0200 Subject: [PATCH] codeql --- .github/workflows/codeql.yml | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..c24a7403 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,54 @@ +name: "CodeQL" +on: [push, pull_request] + +jobs: + analyze: + name: Analyze + runs-on: 'ubuntu-latest' + permissions: + actions: read + contents: read + security-events: write + env: + CC: ${{ matrix.compiler.cc }} + CXX: ${{ matrix.compiler.cxx }} + strategy: + fail-fast: false + matrix: + language: [ 'cpp' ] + compiler: + - { + cc: clang-15, + cxx: clang++-15, + install: clang-15 + } + + steps: + - name: Install packages + run: | + sudo apt-get update + sudo apt-get install -y xorg-dev nasm libssl-dev ${{ matrix.compiler.install }} + + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + + - name: Configure + run: | + mkdir build + cd build + cmake -DCMAKE_BUILD_TYPE=DEBUG .. + + - name: Build + run: | + cd build + cmake --build . -- -j3 + + - name: CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}"