Skip to content

Commit 3174fcd

Browse files
supperthomasmysterywolf
authored andcommitted
[action] update cppcheck version
1 parent 175a2ff commit 3174fcd

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

.github/workflows/static_code_analysis.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1+
#
2+
# Copyright (c) 2006-2024, RT-Thread Development Team
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
# Change Logs:
7+
# Date Author Notes
8+
# 2024-09-04 Supperthomas add cppcheck use the latest release version
9+
#
110
name: Static code analysis
211

312
on:
13+
workflow_dispatch:
414
pull_request:
515
branches:
616
- master
@@ -25,11 +35,22 @@ jobs:
2535
shell: bash
2636
run: |
2737
sudo apt-get update
28-
sudo apt-get -qq install cppcheck
2938
pip install click PyYaml
39+
git clone https://github.com/danmar/cppcheck.git
40+
cd cppcheck
41+
git fetch --tags
42+
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
43+
echo "Latest release tag: $latest_tag"
44+
git checkout $latest_tag
45+
mkdir build
46+
cd build
47+
cmake ..
48+
make
49+
sudo make install
50+
cppcheck --version
51+
cd ../../
3052
git remote -v
3153
git fetch origin
32-
cppcheck --version
3354
ls
3455
git branch -a
35-
python tools/ci/cpp_check.py check
56+
python tools/ci/cpp_check.py check

0 commit comments

Comments
 (0)