Skip to content

Commit a5886de

Browse files
committed
Add CodeQL for C++
1 parent fbaba7d commit a5886de

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed

.github/workflows/CodeQL.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ 'master' ]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [ 'master' ]
9+
schedule:
10+
- cron: '1 16 * * 1'
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
17+
permissions:
18+
actions: read
19+
contents: read
20+
security-events: write
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
language: [ 'cpp' ]
26+
27+
env:
28+
COMPILER: GCC
29+
CC: gcc
30+
CXX: g++
31+
32+
steps:
33+
- name: Clone CloudCompare
34+
uses: actions/checkout@v4
35+
with:
36+
repository: 'CloudCompare/CloudCompare'
37+
ref: fc2fe88a33ca9e406aab43b3bda6a9c6d38a2313
38+
submodules: recursive
39+
40+
- name: Clone PythonRuntime
41+
uses: actions/checkout@v4
42+
with:
43+
path: 'plugins/private/CloudCompare-PythonRuntime'
44+
45+
- name: Install Dependencies
46+
run: |
47+
sudo apt-get update -qq
48+
sudo apt install -y build-essential cmake ninja-build xvfb doxygen graphviz
49+
sudo apt install -y qt6-base-dev qt6-svg-dev qt6-tools-dev qt6-tools-dev-tools pybind11-dev
50+
python3 -m pip install -r plugins/private/CloudCompare-PythonRuntime/requirements-dev.txt
51+
52+
- name: Configure CMake
53+
shell: pwsh
54+
run: |
55+
mkdir build
56+
cmake `
57+
-G Ninja `
58+
-B build `
59+
-DPLUGIN_PYTHON=ON `
60+
-DOPTION_BUILD_CCVIEWER=OFF `
61+
-DCMAKE_BUILD_TYPE=Release `
62+
-DPLUGIN_STANDARD_QM3C2=ON `
63+
.
64+
65+
# Initializes the CodeQL tools for scanning.
66+
- name: Initialize CodeQL
67+
uses: github/codeql-action/init@v4
68+
with:
69+
languages: ${{ matrix.language }}
70+
# If you wish to specify custom queries, you can do so here or in a config file.
71+
# By default, queries listed here will override any specified in a config file.
72+
# Prefix the list here with "+" to use these queries and those in the config file.
73+
74+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
75+
# queries: security-extended,security-and-quality
76+
77+
- name: Build
78+
run: cmake --build build --parallel
79+
80+
- name: Perform CodeQL Analysis
81+
uses: github/codeql-action/analyze@v4
82+
with:
83+
category: "/language:${{matrix.language}}"
84+
checkout_path: 'plugins/private/CloudCompare-PythonRuntime'
85+

0 commit comments

Comments
 (0)