-
Notifications
You must be signed in to change notification settings - Fork 64
90 lines (74 loc) · 2.39 KB
/
codeql.yml
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: "CodeQL"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main", "feature/*"]
schedule:
- cron: '20 3 * * 1'
# only allow one instance of this workflow to be running per PR or branch, cancels any that are already running
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
analyze-dotnet:
name: Analyze .NET
runs-on: windows-latest
timeout-minutes: 120
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
env:
fullagent_solution_path: ${{ github.workspace }}\FullAgent.sln
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: csharp
- name: Build .NET Agent Solution
run: |
dotnet build ${{ env.fullagent_solution_path }}
shell: powershell
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:csharp"
analyze-cpp:
name: Analyze C++
runs-on: windows-2019
timeout-minutes: 120
permissions:
actions: read
contents: read
security-events: write
env:
profiler_solution_path: ${{ github.workspace }}\src\Agent\NewRelic\Profiler\NewRelic.Profiler.sln
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: c-cpp
- name: Add msbuild to PATH for Profiler build
uses: microsoft/setup-msbuild@1ff57057b5cfdc39105cd07a01d78e9b0ea0c14c # v1.3.1
- name: Build Profiler
run: |
Write-Host "List NuGet Sources"
dotnet nuget list source # For unknown reasons, this step is necessary to avoid subsequent problems with NuGet package restore
Write-Host "MSBuild.exe -restore -m -p:Platform=x64 ${{ env.profiler_solution_path }}"
MSBuild.exe -restore -m -p:Platform=x64 ${{ env.profiler_solution_path }}
shell: powershell
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:c-cpp"