-
Notifications
You must be signed in to change notification settings - Fork 18
67 lines (54 loc) · 1.75 KB
/
codeql.yml
File metadata and controls
67 lines (54 loc) · 1.75 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
name: CodeQL
on:
push:
branches: ["main", "release/*"]
pull_request:
branches: ["main", "release/*"]
schedule:
- cron: '22 2 * * 6'
jobs:
analyze:
name: Analyze
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 360
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@v3
- name: Install MSVC Build Tools Insiders
if: runner.os == 'Windows'
shell: pwsh
run: |
$installer = Join-Path $env:TEMP 'vs_buildtools.exe'
Invoke-WebRequest -Uri 'https://aka.ms/vs/insiders/vs_buildtools.exe' -OutFile $installer
$process = Start-Process -FilePath $installer -ArgumentList `
'--quiet','--wait','--norestart','--nocache', `
'--add','Microsoft.VisualStudio.Workload.VCTools', `
'--includeRecommended' -Wait -PassThru
$exitCode = $process.ExitCode
if ($exitCode -ne 0 -and $exitCode -ne 3010 -and $exitCode -ne 3015) {
throw "MSVC Build Tools Insiders installation failed with exit code $exitCode"
}
- name: Use GitHub Actions provided vcpkg
shell: pwsh
run: Add-Content "$env:GITHUB_ENV" "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: cpp
- name: Configure CMake
shell: pwsh
run: cmake "--preset=ci-$("${{matrix.os}}".split("-")[0])"
-D CMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --config Release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:cpp