-
-
Notifications
You must be signed in to change notification settings - Fork 24
74 lines (63 loc) · 1.85 KB
/
Copy pathcodeql-cpp.yaml
File metadata and controls
74 lines (63 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
63
64
65
66
67
68
69
70
71
72
73
74
name: codeql-cpp
permissions: { }
on:
push:
branches:
- main
paths:
- cpp/**
- testdata/**
- .github/**
pull_request:
branches:
- main
paths:
- cpp/**
- testdata/**
- .github/**
schedule:
- cron: '21 5 * * 0'
concurrency:
# Cancels in-progress runs only for pull requests
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
analyze:
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CPM_SOURCE_CACHE: ${{ github.workspace }}/.cpm
name: Analyze C++
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install build tools
run: |
sudo apt-get update
sudo apt-get install -y ccache
- name: Cache CPM packages
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ env.CPM_SOURCE_CACHE }}
key: cpm-${{ hashFiles('cpp/cmake/dependencies.cpm.cmake') }}
- name: Cache ccache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-analysis-${{ github.ref }}
restore-keys: ccache-analysis-
- uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
with:
languages: c-cpp
build-mode: manual
tools: linked
- name: Configure
working-directory: cpp
run: cmake --workflow host
- uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
with:
category: "/language:cpp"