Repository navigation
73 lines (69 loc) · 2.23 KB
/
Copy pathcodeql.yml
File metadata and controls
73 lines (69 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: CodeQL
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '27 5 * * 1'
workflow_dispatch:
permissions:
contents: read
security-events: write
actions: read
concurrency:
group: codeql-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ${{ matrix.os }}
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
include:
- language: python
os: ubuntu-24.04
build-mode: none
- language: rust
os: ubuntu-24.04
build-mode: none
- language: csharp
os: windows-2025
build-mode: manual
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
persist-credentials: false
- name: Install .NET SDK
if: matrix.language == 'csharp'
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5
with:
dotnet-version: '10.0.x'
- name: Prepare pinned C# dependencies
if: matrix.language == 'csharp'
shell: pwsh
run: python tools/codeql_build_helpers.py prepare --work "$env:RUNNER_TEMP/renderlock-codeql"
- name: Initialize CodeQL
uses: github/codeql-action/init@f051dc808ef3645eb0d08647ec751634ec2304ac # v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Compile every RenderLock C# helper
if: matrix.language == 'csharp'
shell: pwsh
run: python tools/codeql_build_helpers.py build --work "$env:RUNNER_TEMP/renderlock-codeql"
- name: Analyze
uses: github/codeql-action/analyze@f051dc808ef3645eb0d08647ec751634ec2304ac # v4
with:
category: '/language:${{ matrix.language }}'
output: codeql-results
- name: Retain C# analysis diagnostics
if: always() && matrix.language == 'csharp'
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: codeql-csharp-diagnostics
path: codeql-results/*.sarif
retention-days: 7
if-no-files-found: warn