forked from open-telemetry/opentelemetry-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (70 loc) · 2.28 KB
/
codeql-analysis.yml
File metadata and controls
74 lines (70 loc) · 2.28 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"
on:
push:
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
permissions:
contents: read
jobs:
CodeQL-Build:
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/autobuild to send a status report
runs-on: ubuntu-latest
env:
CC: /usr/bin/gcc-14
CXX: /usr/bin/g++-14
CXX_STANDARD: '17'
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: 'recursive'
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends --no-install-suggests \
build-essential \
cmake \
ninja-build \
gcc-14 \
g++-14 \
zlib1g-dev \
libssl-dev \
libcurl4-openssl-dev \
nlohmann-json3-dev \
libabsl-dev \
libprotobuf-dev \
libgrpc++-dev \
protobuf-compiler \
protobuf-compiler-grpc \
libgmock-dev \
libgtest-dev \
libbenchmark-dev
- name: Install rapidyaml
run: |
sudo -E ./ci/install_thirdparty.sh --install-dir /usr/local --tags-file third_party_release --packages "ryml"
- name: Initialize CodeQL
uses: github/codeql-action/init@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
with:
languages: cpp
config: |
paths-ignore:
- third_party
- name: Build (abiv2)
run: |
mkdir -p $HOME/build && cd $HOME/build
cmake -G Ninja \
-C ${GITHUB_WORKSPACE}/test_common/cmake/all-options-abiv2-preview.cmake \
-DWITH_OPENTRACING=OFF \
"${GITHUB_WORKSPACE}"
cmake --build . --parallel
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0