@@ -13,22 +13,8 @@ permissions:
1313 actions : read
1414
1515jobs :
16- init-comment :
17- if : github.event_name == 'pull_request'
18- runs-on : ubuntu-latest
19- steps :
20- - uses : marocchino/sticky-pull-request-comment@v2
21- with :
22- header : kernel-warnings
23- message : |
24- ### 🚀 Kernel Build Started
25- _Builds are running... detailed status below:_
26- | Job | Status |
27- | :--- | :--- |
28-
2916 build :
30- needs : init-comment
31- if : always() && (needs.init-comment.result == 'success' || needs.init-comment.result == 'skipped')
17+ if : always()
3218 name : Build ${{ matrix.arch }} ${{ matrix.compiler }} ${{ matrix.config }}
3319 runs-on : ubuntu-latest
3420 container :
@@ -119,14 +105,6 @@ jobs:
119105 echo "url=$JOB_URL" >> "$GITHUB_OUTPUT"
120106 echo "build_step_num=$BUILD_STEP_NUM" >> "$GITHUB_OUTPUT"
121107
122- - name : Notify Job Start
123- if : github.event_name == 'pull_request'
124- uses : marocchino/sticky-pull-request-comment@v2
125- with :
126- header : kernel-warnings
127- append : true
128- message : " | ${{ matrix.arch }} ${{ matrix.compiler }} | ⏳ [In Progress](${{ steps.job-link.outputs.url }}) |"
129-
130108 - name : Setup Ccache
131109 uses :
hendrikmuhs/[email protected] 132110 with :
@@ -229,41 +207,3 @@ jobs:
229207 name : warnings-${{ matrix.arch }}-${{ matrix.compiler }}-${{ matrix.config }}
230208 path : " warnings-${{ matrix.arch }}-${{ matrix.compiler }}.txt"
231209
232- report-warnings :
233- needs : build
234- if : always() && github.event_name == 'pull_request'
235- runs-on : ubuntu-latest
236- permissions :
237- pull-requests : write
238- steps :
239- - name : Download Warning Artifacts
240- uses : actions/download-artifact@v4
241- with :
242- pattern : warnings-*
243- merge-multiple : true
244- path : warnings
245-
246- - name : Generate Summary Markdown
247- run : |
248- echo "### 🛡️ Kernel Build Warnings Report" > comment.md
249- echo "" >> comment.md
250- echo "| Arch | Compiler | Warnings | Status |" >> comment.md
251- echo "| :--- | :--- | :---: | :---: |" >> comment.md
252- # Sort by Arch (col 2), then Compiler Version (col 3)
253- # -k 2,2b : sort 2nd column, ignore leading whitespace
254- # -k 3,3Vb: sort 3rd column, Version sort, ignore whitespace
255- cat warnings/*.txt | sort -t '|' -k 2,2b -k 3,3Vb >> comment.md
256- if grep -q "❌" warnings/*.txt; then
257- echo "" >> comment.md
258- echo "❌ **One or more builds failed.**" >> comment.md
259- fi
260- # Use awk to find '[**NUMBER**]' and sum up the values (m[1])
261- TOTAL=$(awk -F'|' 'match($4, /\[\*\*([0-9]+)\*\*\]/, m) { sum += m[1] } END { print sum+0 }' warnings/*.txt)
262- echo "" >> comment.md
263- echo "**Total Warnings: $TOTAL**" >> comment.md
264-
265- - name : Post Sticky Comment
266- uses : marocchino/sticky-pull-request-comment@v2
267- with :
268- header : kernel-warnings
269- path : comment.md
0 commit comments