Skip to content

Commit f866d6e

Browse files
committed
added:cpp check support
1 parent 182fb47 commit f866d6e

File tree

4 files changed

+53
-9
lines changed

4 files changed

+53
-9
lines changed

.github/workflows/cppcheck.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: cpp check workflows
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
paths:
8+
- 'XEngine_Source/**'
9+
- 'XEngine_Release/**'
10+
- '.github/**'
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout main repository code
18+
uses: actions/checkout@v4
19+
with:
20+
ref: 'master'
21+
22+
- name: Create static_analysis directory
23+
run: mkdir -p static_analysis
24+
25+
- name: Run Cppcheck
26+
run: |
27+
sudo apt-get install -y cppcheck
28+
cppcheck --enable=all --inconclusive --force --language=c++ ../../XEngine_Source/ &> static_analysis/cppcheck.txt
29+
continue-on-error: true
30+
31+
- name: Upload Cppcheck Results
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: cppcheck_results
35+
path: static_analysis/cppcheck.txt

.github/workflows/macbuild.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ name: macos build workflows
22

33
on:
44
push:
5-
branches: [ "master" ]
6-
7-
permissions:
8-
contents: read
5+
branches:
6+
- 'master'
7+
paths:
8+
- 'XEngine_Source/**'
9+
- 'XEngine_Release/**'
10+
- '.github/**'
911

1012
jobs:
1113
build:

.github/workflows/msbuild.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ name: windows build workflows
22

33
on:
44
push:
5-
branches: [ "master" ]
6-
7-
permissions:
8-
contents: read
5+
branches:
6+
- 'master'
7+
paths:
8+
- 'XEngine_Source/**'
9+
- 'XEngine_Release/**'
10+
- '.github/**'
911

1012
jobs:
1113
build:

.github/workflows/ubuntubuild.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ name: ubuntu build workflows
22

33
on:
44
push:
5-
branches: [ "master" ]
5+
branches:
6+
- 'master'
7+
paths:
8+
- 'XEngine_Source/**'
9+
- 'XEngine_Release/**'
10+
- '.github/**'
611

712
permissions:
813
contents: read

0 commit comments

Comments
 (0)