浏览代码

chore: codeql analysis

Almamu 1 年之前
父节点
当前提交
9003599f75
共有 1 个文件被更改,包括 13 次插入 和 0 次删除
  1. 13 0
      .github/workflows/cmake.yml

+ 13 - 0
.github/workflows/cmake.yml

@@ -25,6 +25,7 @@ jobs:
     strategy:
       matrix:
         os: [ubuntu-22.04, ubuntu-24.04]
+
     # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
     # You can convert this to a matrix build if you need cross-platform coverage.
     # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
@@ -52,9 +53,15 @@ jobs:
       run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
 
   build-x11-wayland:
+    permissions:
+      actions: read
+      contents: read
+      security-events: write
+
     strategy:
       matrix:
         os: [ubuntu-22.04, ubuntu-24.04]
+        language: ['cpp']
     # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
     # You can convert this to a matrix build if you need cross-platform coverage.
     # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
@@ -82,6 +89,12 @@ jobs:
         # Build your program with the given configuration
         run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
 
+      - name: Initialize CodeQL
+        # Initializes the CodeQL tools for scanning.
+        uses: github/codeql-action/init@v1
+        with:
+          languages: ${{ matrix.language }}
+
       - name: Perform CodeQL Analysis
         uses: github/codeql-action/analyze@v2