File tree Expand file tree Collapse file tree 3 files changed +30
-5
lines changed
Expand file tree Collapse file tree 3 files changed +30
-5
lines changed Original file line number Diff line number Diff line change 11name : CI
22
33on :
4- push :
5- branches :
6- - ' **'
74 pull_request :
85 branches : [main]
96
1512 - name : install g++
1613 run : sudo apt install -y g++
1714 - name : check build
18- run : source ./compile.sh
15+ run : source ./compile.sh
Original file line number Diff line number Diff line change 1+ name : cpp-check
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - " main"
7+
8+ jobs :
9+ cpp-check :
10+ strategy :
11+ fail-fast : false
12+ runs-on : [ubuntu-22.04]
13+ name : cpp check
14+ steps :
15+ - uses : actions/checkout@v2
16+ - name : Install dependencies
17+ run : |
18+ sudo apt update -y
19+ sudo apt install -y cppcheck
20+ - name : cpp check
21+ run : |
22+ cppcheck --force --inline-suppr --output-file=report.txt exercises/
23+ if [ -s report.txt ]; then # if file is not empty
24+ cat report.txt
25+ exit 1 # let github action fails
26+ fi
Original file line number Diff line number Diff line change 1- .vscode /
1+ .vscode /
2+ report.txt
3+
You can’t perform that action at this time.
0 commit comments