Use CMake's MINGW variable instead of checking generator name #3713
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CodeQL Code Scanning | |
| on: [push, pull_request] | |
| jobs: | |
| run-analysis: | |
| strategy: | |
| matrix: | |
| toolset: ["x64"] | |
| build_type: ["Debug"] | |
| host_name: ["Win10", "Linux"] | |
| cmake_args: ["-DDILIGENT_NO_GLSLANG=ON -DDILIGENT_NO_HLSL=ON"] | |
| include: | |
| - host_name: "Win10" | |
| platform: "Win32" | |
| os: "windows-2022" | |
| cmake_generator: "Visual Studio 17 2022" | |
| - host_name: "Linux" | |
| platform: "Linux" | |
| os: "ubuntu-24.04" | |
| cmake_generator: "Ninja" | |
| cc: "clang-18" | |
| cxx: "clang++-18" | |
| runs-on: ${{ matrix.os }} | |
| name: ${{ matrix.host_name }} -> Code QL, ${{ matrix.toolset }}, ${{ matrix.build_type }} | |
| permissions: | |
| # required for all workflows | |
| security-events: write | |
| # only required for workflows in private repositories | |
| actions: read | |
| contents: read | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up build environment | |
| if: success() | |
| uses: DiligentGraphics/github-action/setup-build-env@v9 | |
| with: | |
| platform: ${{ matrix.platform }} | |
| cmake-generator: ${{ matrix.cmake_generator }} | |
| - name: Configure CMake | |
| if: success() | |
| uses: DiligentGraphics/github-action/configure-cmake@v9 | |
| with: | |
| cc: ${{ matrix.cc }} | |
| cxx: ${{ matrix.cxx }} | |
| generator: ${{ matrix.cmake_generator }} | |
| vs-arch: ${{ matrix.toolset }} | |
| build-type: ${{ matrix.build_type }} | |
| cmake-args: ${{ matrix.cmake_args }} | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v3 | |
| with: | |
| languages: cpp | |
| queries: security-and-quality | |
| - name: Build | |
| if: success() | |
| uses: DiligentGraphics/github-action/build@v9 | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v3 |