-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (49 loc) · 1.69 KB
/
Copy pathcodeql.yml
File metadata and controls
61 lines (49 loc) · 1.69 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
name: CodeQL
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '30 1 * * 0'
jobs:
analyze:
name: Analyze (c-cpp)
runs-on: ubuntu-latest
permissions:
security-events: write
packages: read
actions: read
contents: read
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg-bincache
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Initialize CodeQL
uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
with:
languages: c-cpp
build-mode: manual
- name: Create vcpkg binary cache directory
run: mkdir -p "${{ env.VCPKG_DEFAULT_BINARY_CACHE }}"
- name: Cache vcpkg binary cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: vcpkg-bincache-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-bincache-${{ runner.os }}-
- name: Clone and bootstrap vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git "${VCPKG_ROOT}"
"${VCPKG_ROOT}/bootstrap-vcpkg.sh" -disableMetrics
- name: Configure (CMake preset "default")
run: cmake --preset default
- name: Build
run: cmake --build build -j"$(nproc)"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
with:
category: "/language:c-cpp"