-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (69 loc) · 2.09 KB
/
Copy pathcodeql-cpp.yaml
File metadata and controls
80 lines (69 loc) · 2.09 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
75
76
77
78
79
80
name: codeql-cpp
permissions: {}
on:
push:
branches:
- main
paths:
- cpp/**
- testdata/**
- .github/**
pull_request:
branches:
- main
paths:
- cpp/**
- testdata/**
- .github/**
schedule:
- cron: '48 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:
name: Analyze C++
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: true
- name: ccache
uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24
with:
key: ${{ github.job }}-${{ github.ref }}
append-timestamp: false
save: ${{ github.ref == 'refs/heads/main' }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y nlohmann-json3-dev libgtest-dev libgmock-dev libyaml-cpp-dev
- name: Checkout libfmt
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: fmtlib/fmt
ref: 10.2.1
path: fmt-src
persist-credentials: false
- name: Install libfmt (from source)
run: |
cmake -S fmt-src -B fmt-src/build \
-DCMAKE_BUILD_TYPE=Release \
-DFMT_TEST=OFF -DFMT_DOC=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
cmake --build fmt-src/build
sudo cmake --install fmt-src/build
- uses: github/codeql-action/init@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
with:
languages: c-cpp
build-mode: manual
tools: linked
- name: Configure
run: cmake --workflow --preset host-system
- uses: github/codeql-action/analyze@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
with:
category: "/language:cpp"