Skip to content

Commit 3983500

Browse files
authoredFeb 7, 2024
Add codeql code scanning configuration (#10)
1 parent 71077b8 commit 3983500

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed
 

‎.github/workflows/codeql-analysis.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
name: "CodeQL"
21+
22+
on:
23+
push:
24+
branches: [ "main" ]
25+
pull_request:
26+
branches: [ "main" ]
27+
schedule:
28+
- cron: '16 21 * * 2'
29+
30+
jobs:
31+
analyze:
32+
name: Analyze
33+
runs-on: ubuntu-22.04
34+
permissions:
35+
actions: read
36+
contents: read
37+
security-events: write
38+
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
language: [ 'cpp' ]
43+
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v3
47+
with:
48+
fetch-depth: 0
49+
submodules: recursive
50+
51+
# Initializes the CodeQL tools for scanning.
52+
- name: Initialize CodeQL
53+
uses: github/codeql-action/init@v3
54+
with:
55+
languages: ${{ matrix.language }}
56+
57+
- name: Install deps
58+
run: |
59+
sudo apt-get update -y
60+
sudo apt-get install -y libcurl4-openssl-dev libssl-dev \
61+
protobuf-compiler libprotobuf-dev libboost-dev \
62+
libboost-dev libboost-program-options-dev \
63+
libzstd-dev libsnappy-dev
64+
65+
- name: Build
66+
run: |
67+
cmake . -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=OFF -DBUILD_STATIC_LIB=OFF -DBUILD_PERF_TOOLS=ON
68+
cmake --build . -j8
69+
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v3
72+
with:
73+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)
Please sign in to comment.