-
Notifications
You must be signed in to change notification settings - Fork 49
57 lines (48 loc) · 1.35 KB
/
codeql-analysis.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
---
name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '21 13 * * 4'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Ensure vcpkg builtin registry is up-to-date
- name: Update vcpkg builtin registry
run: |
cd $VCPKG_INSTALLATION_ROOT
git reset --hard
git pull
- name: Setup .NET SDK v8.0.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: cpp, csharp
# Expose GitHub Runtime environment variables for vcpkg caching.
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
- name: Build C++ library and CSharp projects
run: |
./build_unix.sh
dotnet build csharp.benchmark --configuration=Release
dotnet build csharp.test --configuration=Release
dotnet build csharp --configuration=Release
env:
VCPKG_BINARY_SOURCES: clear;x-gha,readwrite
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3