|
1 | | -# Copyright (c) Microsoft Corporation. |
2 | | -# Licensed under the MIT License. |
3 | | -# |
4 | | -# http://go.microsoft.com/fwlink/?LinkId=248929 |
5 | | - |
6 | | -name: "CodeQL" |
7 | | - |
8 | | -on: |
9 | | - push: |
10 | | - branches: "main" |
11 | | - paths-ignore: |
12 | | - - '*.md' |
13 | | - - LICENSE |
14 | | - - '.azuredevops/**' |
15 | | - - '.nuget/*' |
16 | | - - build/*.cmd |
17 | | - - build/*.json |
18 | | - - build/*.props |
19 | | - - build/*.ps1 |
20 | | - - build/*.targets |
21 | | - pull_request: |
22 | | - branches: "main" |
23 | | - paths-ignore: |
24 | | - - '*.md' |
25 | | - - LICENSE |
26 | | - - '.azuredevops/**' |
27 | | - - '.nuget/*' |
28 | | - - build/*.cmd |
29 | | - - build/*.json |
30 | | - - build/*.props |
31 | | - - build/*.ps1 |
32 | | - - build/*.targets |
33 | | - schedule: |
34 | | - - cron: '31 2 * * 5' |
35 | | - |
36 | | -permissions: |
37 | | - contents: read |
38 | | - |
39 | | -jobs: |
40 | | - analyze: |
41 | | - name: Analyze (${{ matrix.language }}) |
42 | | - runs-on: windows-latest |
43 | | - timeout-minutes: 360 |
44 | | - permissions: |
45 | | - actions: read # for github/codeql-action/init to get workflow details |
46 | | - contents: read # for actions/checkout to fetch code |
47 | | - security-events: write # for github/codeql-action/autobuild to send a status report |
48 | | - packages: read |
49 | | - |
50 | | - strategy: |
51 | | - fail-fast: false |
52 | | - matrix: |
53 | | - language: [c-cpp, csharp] |
54 | | - |
55 | | - steps: |
56 | | - - name: Checkout repository |
57 | | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
58 | | - |
59 | | - - if: matrix.language == 'c-cpp' |
60 | | - name: 'Install Ninja' |
61 | | - run: choco install ninja |
62 | | - |
63 | | - - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 |
64 | | - |
65 | | - - name: Initialize CodeQL |
66 | | - uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16 |
67 | | - with: |
68 | | - languages: ${{ matrix.language }} |
69 | | - build-mode: manual |
70 | | - |
71 | | - - if: matrix.language == 'c-cpp' |
72 | | - name: 'Configure CMake (C/C++)' |
73 | | - working-directory: ${{ github.workspace }} |
74 | | - run: cmake --preset=x64-Debug |
75 | | - |
76 | | - - if: matrix.language == 'c-cpp' |
77 | | - name: 'Build (C/C++)' |
78 | | - working-directory: ${{ github.workspace }} |
79 | | - run: cmake --build out\build\x64-Debug |
80 | | - |
81 | | - - if: matrix.language == 'csharp' |
82 | | - name: 'Build (C#)' |
83 | | - working-directory: ./MakeSpriteFont |
84 | | - run: msbuild MakeSpriteFont.csproj /p:Configuration=Debug /p:Platform=AnyCPU |
85 | | - |
86 | | - - name: Perform CodeQL Analysis |
87 | | - uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16 |
88 | | - with: |
89 | | - category: "/language:${{ matrix.language }}" |
| 1 | +# Copyright (c) Microsoft Corporation. |
| 2 | +# Licensed under the MIT License. |
| 3 | +# |
| 4 | +# http://go.microsoft.com/fwlink/?LinkId=248929 |
| 5 | + |
| 6 | +name: "CodeQL" |
| 7 | + |
| 8 | +on: |
| 9 | + push: |
| 10 | + branches: "main" |
| 11 | + paths-ignore: |
| 12 | + - '*.md' |
| 13 | + - LICENSE |
| 14 | + - '.azuredevops/**' |
| 15 | + - '.nuget/*' |
| 16 | + - build/*.cmd |
| 17 | + - build/*.json |
| 18 | + - build/*.props |
| 19 | + - build/*.ps1 |
| 20 | + - build/*.targets |
| 21 | + pull_request: |
| 22 | + branches: "main" |
| 23 | + paths-ignore: |
| 24 | + - '*.md' |
| 25 | + - LICENSE |
| 26 | + - '.azuredevops/**' |
| 27 | + - '.nuget/*' |
| 28 | + - build/*.cmd |
| 29 | + - build/*.json |
| 30 | + - build/*.props |
| 31 | + - build/*.ps1 |
| 32 | + - build/*.targets |
| 33 | + schedule: |
| 34 | + - cron: '31 2 * * 5' |
| 35 | + |
| 36 | +permissions: |
| 37 | + contents: read |
| 38 | + |
| 39 | +jobs: |
| 40 | + analyze: |
| 41 | + name: Analyze (${{ matrix.language }}) |
| 42 | + runs-on: windows-latest |
| 43 | + timeout-minutes: 360 |
| 44 | + permissions: |
| 45 | + actions: read # for github/codeql-action/init to get workflow details |
| 46 | + contents: read # for actions/checkout to fetch code |
| 47 | + security-events: write # for github/codeql-action/autobuild to send a status report |
| 48 | + packages: read |
| 49 | + |
| 50 | + strategy: |
| 51 | + fail-fast: false |
| 52 | + matrix: |
| 53 | + language: [c-cpp, csharp] |
| 54 | + |
| 55 | + steps: |
| 56 | + - name: Checkout repository |
| 57 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 58 | + |
| 59 | + - if: matrix.language == 'c-cpp' |
| 60 | + name: 'Install Ninja' |
| 61 | + run: choco install ninja |
| 62 | + |
| 63 | + - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 |
| 64 | + |
| 65 | + - name: Initialize CodeQL |
| 66 | + uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18 |
| 67 | + with: |
| 68 | + languages: ${{ matrix.language }} |
| 69 | + build-mode: manual |
| 70 | + |
| 71 | + - if: matrix.language == 'c-cpp' |
| 72 | + name: 'Configure CMake (C/C++)' |
| 73 | + working-directory: ${{ github.workspace }} |
| 74 | + run: cmake --preset=x64-Debug |
| 75 | + |
| 76 | + - if: matrix.language == 'c-cpp' |
| 77 | + name: 'Build (C/C++)' |
| 78 | + working-directory: ${{ github.workspace }} |
| 79 | + run: cmake --build out\build\x64-Debug |
| 80 | + |
| 81 | + - if: matrix.language == 'csharp' |
| 82 | + name: 'Build (C#)' |
| 83 | + working-directory: ./MakeSpriteFont |
| 84 | + run: msbuild MakeSpriteFont.csproj /p:Configuration=Debug /p:Platform=AnyCPU |
| 85 | + |
| 86 | + - name: Perform CodeQL Analysis |
| 87 | + uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18 |
| 88 | + with: |
| 89 | + category: "/language:${{ matrix.language }}" |
0 commit comments