Skip to content

Commit ff60115

Browse files
committed
Fix
1 parent 6e72b71 commit ff60115

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

.github/workflows/pr-code-style-check.yml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ jobs:
99
runs-on: ubuntu-latest
1010
container: ghcr.io/kpi-rover/kpi-rover-bbb-check:latest
1111
steps:
12-
- name: Checkout Code
12+
- name: Checkout Code with Submodules
1313
uses: actions/checkout@v3
14+
with:
15+
submodules: recursive # ✅ Ensures all submodules are pulled
16+
fetch-depth: 0 # ✅ Ensures full history
1417

1518
- name: Configure CMake
16-
run: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B build/check
19+
run: cmake -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B build/check
1720

1821
- name: Verify compile_commands.json exists
1922
run: ls build/check/compile_commands.json
@@ -32,26 +35,20 @@ jobs:
3235

3336
- name: Report Status
3437
if: always()
38+
env:
39+
FORMAT_STATUS: ${{ steps.clang-format.outcome }}
40+
TIDY_STATUS: ${{ steps.clang-tidy.outcome }}
3541
uses: actions/github-script@v6
3642
with:
3743
script: |
38-
const formatStatus = ${{ steps.clang-format.outcome == 'success' }};
39-
const tidyStatus = ${{ steps.clang-tidy.outcome == 'success' }};
44+
const formatStatus = process.env.FORMAT_STATUS === 'success';
45+
const tidyStatus = process.env.TIDY_STATUS === 'success';
4046
const conclusion = (formatStatus && tidyStatus) ? 'success' : 'failure';
4147
4248
let summary = '';
43-
if (formatStatus) {
44-
summary += '✅ Clang-Format check passed\n';
45-
} else {
46-
summary += '❌ Clang-Format check failed\n';
47-
}
48-
49-
if (tidyStatus) {
50-
summary += '✅ Clang-Tidy check passed\n';
51-
} else {
52-
summary += '❌ Clang-Tidy check failed\n';
53-
}
54-
49+
summary += formatStatus ? '✅ Clang-Format check passed\n' : '❌ Clang-Format check failed\n';
50+
summary += tidyStatus ? '✅ Clang-Tidy check passed\n' : '❌ Clang-Tidy check failed\n';
51+
5552
github.rest.checks.create({
5653
owner: context.repo.owner,
5754
repo: context.repo.repo,

0 commit comments

Comments
 (0)