From f797cab4619fe70c8dc53f884819f26a8cd12ab8 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Fri, 26 Jul 2024 12:24:50 -0700 Subject: [PATCH] Add C# CodeQL to GitHub Actoins --- .github/workflows/codeql.yml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 8d19b5d9..e49199b7 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -25,18 +25,24 @@ on: jobs: analyze: - name: Analyze (C/C++) + name: Analyze (${{ matrix.language }}) runs-on: windows-latest timeout-minutes: 360 permissions: security-events: write packages: read + strategy: + fail-fast: false + matrix: + language: [c-cpp, csharp] + steps: - name: Checkout repository uses: actions/checkout@v4 - - name: 'Install Ninja' + - if: matrix.language == 'c-cpp' + name: 'Install Ninja' run: choco install ninja - uses: ilammy/msvc-dev-cmd@v1 @@ -44,18 +50,25 @@ jobs: - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: - languages: c-cpp + languages: ${{ matrix.language }} build-mode: manual - - name: 'Configure CMake' + - if: matrix.language == 'c-cpp' + name: 'Configure CMake (C/C++)' working-directory: ${{ github.workspace }} run: cmake --preset=x64-Debug - - name: 'Build' + - if: matrix.language == 'c-cpp' + name: 'Build (C/C++)' working-directory: ${{ github.workspace }} run: cmake --build out\build\x64-Debug + - if: matrix.language == 'csharp' + name: 'Build (C#)' + working-directory: ./MakeSpriteFont + run: msbuild MakeSpriteFont.csproj /p:Configuration=Debug /p:Platform=AnyCPU + - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 with: - category: "/language:c-cpp" + category: "/language:${{ matrix.language }}"