Skip to content

Commit caf0b43

Browse files
update workflows and configs
1 parent e33b5bf commit caf0b43

File tree

4 files changed

+60
-10
lines changed

4 files changed

+60
-10
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,11 @@ jobs:
115115
-DCPPUTEST_HOME:PATH=/usr
116116
117117
- name: Build
118-
run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} -j$(nproc)
118+
run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} -j"$(nproc)"
119119

120120
- name: Test
121121
working-directory: ${{ github.workspace }}/build
122-
run: ctest -C ${{ env.BUILD_TYPE }} --output-on-failure --parallel $(nproc)
122+
run: ctest -C ${{ env.BUILD_TYPE }} --output-on-failure --parallel "$(nproc)"
123123

124124
- name: Generate Coverage Reports
125125
run: |
@@ -174,4 +174,4 @@ jobs:
174174
with:
175175
name: build-artifacts
176176
path: ${{ github.workspace }}/build
177-
retention-days: 7
177+
retention-days: 7

.github/workflows/exhaustive-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ jobs:
123123
-DCMAKE_C_FLAGS="-O2 -Wall -Wextra -Werror"
124124
125125
- name: Build
126-
run: cmake --build ${{ github.workspace }}/build --config Release -j$(nproc)
126+
run: cmake --build ${{ github.workspace }}/build --config Release -j"$(nproc)"
127127

128128
- name: Test
129129
working-directory: ${{ github.workspace }}/build
130-
run: ctest -C Release --output-on-failure --parallel $(nproc)
130+
run: ctest -C Release --output-on-failure --parallel "$(nproc)"
131131

132132
- name: Generate Release Coverage
133133
run: |
@@ -144,4 +144,4 @@ jobs:
144144
coverage-release*.html
145145
coverage-release.xml
146146
coverage-release-summary.txt
147-
retention-days: 90
147+
retention-days: 90

.mega-linter.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ FILEIO_REPORTER: false
88

99
# Apply fixes
1010
APPLY_FIXES: all
11-
APPLY_FIXES_EVENT: pull_request
12-
APPLY_FIXES_MODE: commit
1311

1412
# Linters configuration
1513
DISABLE_LINTERS:
@@ -19,8 +17,6 @@ DISABLE_LINTERS:
1917
CLANG_FORMAT_ARGUMENTS: "--style=file"
2018

2119
# Cppcheck configuration
22-
# Note: CPPCHECK_ARGUMENTS will be overridden by workflow env vars
23-
# for conditional standard vs exhaustive analysis
2420
CPPCHECK_FILE_EXTENSIONS:
2521
- .c
2622
- .h

.pre-commit-config.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v6.0.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-json
9+
- id: check-toml
10+
11+
- repo: https://github.com/pre-commit/mirrors-clang-format
12+
rev: v21.1.6
13+
hooks:
14+
- id: clang-format
15+
types_or: [c, c++, header]
16+
args: ["-i"]
17+
18+
- repo: https://github.com/pocc/pre-commit-hooks
19+
rev: v1.3.5
20+
hooks:
21+
- id: clang-tidy
22+
args: ["-p=build"]
23+
types_or: [c, c++, header]
24+
25+
- repo: https://github.com/cpplint/cpplint
26+
rev: 2.0.2
27+
hooks:
28+
- id: cpplint
29+
types_or: [c, c++, header]
30+
args:
31+
- "--filter=-whitespace/line_length"
32+
- "--recursive"
33+
34+
- repo: https://github.com/pocc/pre-commit-hooks
35+
rev: v1.3.5
36+
hooks:
37+
- id: cppcheck
38+
name: cppcheck
39+
args:
40+
- "--enable=all"
41+
- "--inconclusive"
42+
- "--force"
43+
- "--suppress=missingIncludeSystem"
44+
types_or: [c, c++, header]
45+
46+
- repo: https://github.com/shellcheck-py/shellcheck-py
47+
rev: v0.11.0.1
48+
hooks:
49+
- id: shellcheck
50+
51+
- repo: https://github.com/rhysd/actionlint
52+
rev: v1.7.9
53+
hooks:
54+
- id: actionlint

0 commit comments

Comments
 (0)