Skip to content

Commit b3ad381

Browse files
committed
ci:add codeql.yml
1 parent 4e72dbd commit b3ad381

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: "CodeQL Advanced"
2+
3+
on:
4+
push:
5+
branches:
6+
- 'develop'
7+
8+
jobs:
9+
analyze:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
# required for all workflows
13+
security-events: write
14+
# required to fetch internal or private CodeQL packs
15+
packages: read
16+
# only required for workflows in private repositories
17+
actions: read
18+
contents: read
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
- language: c-cpp
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Checkout dependency repository (xengine)
30+
uses: actions/checkout@v4
31+
with:
32+
repository: libxengine/libxengine
33+
path: libxengine
34+
35+
- name: sub module checkout (opensource)
36+
run: |
37+
git submodule init
38+
git submodule update
39+
40+
- name: Set up Dependency Environment
41+
run: |
42+
cd libxengine
43+
chmod 777 *
44+
sudo ./XEngine_LINEnv.sh -i 3
45+
46+
- name: Initialize CodeQL
47+
uses: github/codeql-action/init@v3
48+
with:
49+
languages: ${{ matrix.language }}
50+
51+
- name: make
52+
run: |
53+
cd XEngine_Source
54+
make
55+
56+
- name: Perform CodeQL Analysis
57+
uses: github/codeql-action/analyze@v3
58+
with:
59+
category: "/language:${{matrix.language}}"
60+
61+
- name: Upload CodeQL results
62+
uses: github/codeql-action/upload-sarif@v2
63+
with:
64+
sarif_file: results/cpp.sarif

0 commit comments

Comments
 (0)