forked from Open-KO/KnightOnline
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (50 loc) · 1.85 KB
/
codeql.yml
File metadata and controls
62 lines (50 loc) · 1.85 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
name: "CodeQL Advanced"
on:
schedule:
- cron: '0 0 * * 0'
pull_request:
types: [labeled]
workflow_dispatch:
env:
# We use a debug build for slightly faster build times
BUILD_CONFIGURATION: Debug
BUILD_PLATFORM: Win32
jobs:
analyze:
if: |
github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-analysis')
name: Analyze (cpp)
runs-on: 'windows-latest'
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
# only required for workflows in private repositories
actions: read
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
# Fetch and build all required third party dependencies before initializing CodeQL.
# We do not want CodeQL to be tracking our external dependencies which would otherwise be built
# as needed from within All.sln; this ensures they're built first so they won't build again during
# CodeQL monitoring.
- name: Build third party dependencies
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /p:Configuration="${{env.BUILD_CONFIGURATION}}" /p:Platform="${{env.BUILD_PLATFORM}}" ThirdParty.sln
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: c-cpp
build-mode: manual
- name: Build all
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /p:Configuration="${{env.BUILD_CONFIGURATION}}" /p:Platform="${{env.BUILD_PLATFORM}}" /p:NO_CLIENT_ASSETS="1" All.sln
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "cpp"