Skip to content

Commit af66da0

Browse files
committed
step
1 parent 33d1096 commit af66da0

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

.github/workflows/package_core.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ jobs:
210210
wget -nv https://raw.githubusercontent.com/arduino/arduino-examples/refs/heads/main/examples/01.Basics/Blink/Blink.ino -P Blink/
211211
212212
- name: Compile Blink for ${{ matrix.board }}
213-
uses: pillo79/compile-sketches@main
213+
uses: pillo79/compile-sketches@next
214214
with:
215215
fqbn: ${{ env.FQBN }}
216216
platforms: |
@@ -229,8 +229,7 @@ jobs:
229229
- 'compiler.cpp.extra_flags=-Wno-type-limits -Wno-missing-field-initializers'
230230
verbose: 'false'
231231
enable-deltas-report: 'false'
232-
enable-warnings-report: 'true'
233-
enable-warnings-log: 'true'
232+
enable-issues-report: 'true'
234233

235234
- name: Get job ID
236235
id: job_id

extra/ci_collect_logs.sh

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,17 @@ details_line() {
3131
if echo "$SKETCH_NAME" | grep -qE 'libraries/' ; then
3232
LIB=$(echo "$SKETCH_NAME" | sed -e 's/.*libraries\///' -e 's/\/.*//')
3333
SKETCH=$(echo "$SKETCH_NAME" | sed -e 's/.*libraries\/[^/]*\///')
34-
echo "$ICON \`$LIB\` \`$SKETCH\`: $TEXT"
34+
SUMMARY="$ICON \`$LIB\` \`$SKETCH\`: $TEXT"
3535
else
36-
echo "$ICON \`$SKETCH_NAME\`: $TEXT"
36+
SUMMARY="$ICON \`$SKETCH_NAME\`: $TEXT"
3737
fi
38+
if [ $SKETCH_ISSUES_COUNT -ne 0 ] ; then
39+
SUMMARY="${SUMMARY} with ${SKETCH_ISSUES_COUNT} issues"
40+
BODY="\n\n\`\`\`\n${SKETCH_ISSUES}\`\`\`\n"
41+
else
42+
BODY=""
43+
fi
44+
echo -ne "<details><summary>$SUMMARY</summary>$BODY</details>"
3845
}
3946

4047
ARTIFACTS=$(jq -cr 'map(.artifact) | unique | .[]' <<< ${ALL_BOARD_DATA}) # this avoids the 'zephyr' artifact
@@ -63,32 +70,31 @@ for artifact in $ARTIFACTS ; do
6370
for i in $(seq 0 $((SKETCH_COUNT - 1))) ; do
6471
REPORT=$(echo $REPORTS | jq -cr ".[$i]")
6572
SKETCH_NAME=$(echo $REPORT | jq -cr '.name')
73+
SKETCH_ISSUES=$(echo $REPORT | jq -cr '.issues')
74+
SKETCH_ISSUES_COUNT=$(echo $REPORT | jq -cr '.issues | length')
6675
if ! $(echo $REPORT | jq -cr '.compilation_success') ; then
6776
SKETCH_ERRORS=$((SKETCH_ERRORS + 1))
6877
ARTIFACT_STATUS=error
6978
DETAILS="${DETAILS}$(details_line ":red_circle:" "Compilation failed")\n"
79+
elif [ $SKETCH_ISSUES_COUNT -eq 0 ]; then
80+
[ $ARTIFACT_STATUS == "success" ] && ARTIFACT_STATUS="warning"
81+
DETAILS="${DETAILS}$(details_line ":green_circle:" "Build successful")\n"
7082
else
7183
SKETCH_WARNINGS=$((SKETCH_WARNINGS + 1))
72-
WARNINGS=$(echo $REPORT | jq -cr '.warnings.current.absolute // 0')
73-
if [ $WARNINGS -eq 0 ]; then
74-
[ $ARTIFACT_STATUS == "success" ] && ARTIFACT_STATUS="warning"
75-
DETAILS="${DETAILS}$(details_line ":green_circle:" "Build successful")\n"
76-
else
77-
DETAILS="${DETAILS}$(details_line ":orange_circle:" "$WARNINGS warnings")\n"
78-
fi
84+
DETAILS="${DETAILS}$(details_line ":orange_circle:" "Build successful")\n"
7985
fi
8086
done
8187
fi
8288

8389
case $ARTIFACT_STATUS in
8490
success)
85-
artifact_entry ":green_circle:" "All $SKETCH_COUNT sketches built successfully"
91+
artifact_entry ":white_check_mark:" "All $SKETCH_COUNT sketches built successfully"
8692
;;
8793
warning)
88-
artifact_entry ":orange_circle:" "All $SKETCH_COUNT sketches built ($SKETCH_WARNINGS with warnings)" "$ARTIFACT_LINK"
94+
artifact_entry ":exclamation:" "All $SKETCH_COUNT sketches built ($SKETCH_WARNINGS with warnings)" "$ARTIFACT_LINK"
8995
;;
9096
error)
91-
artifact_entry ":red_circle:" "$SKETCH_ERRORS out of $SKETCH_COUNT sketches failed to build" "$ARTIFACT_LINK"
97+
artifact_entry ":x:" "$SKETCH_ERRORS out of $SKETCH_COUNT sketches failed to build" "$ARTIFACT_LINK"
9298
;;
9399
*)
94100
artifact_entry ":fire:" "Report file missing or unreadable"

0 commit comments

Comments
 (0)