Skip to content

Commit ba830ad

Browse files
committed
wip
1 parent 5a55b11 commit ba830ad

File tree

3 files changed

+22
-49
lines changed

3 files changed

+22
-49
lines changed

.github/workflows/package_core.yml

Lines changed: 15 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -204,31 +204,31 @@ jobs:
204204
tar xf ${CORE_ARTIFACT}.tar.bz2 # will create ArduinoCore-zephyr/
205205
echo "REPORT_FILE=$(echo ${FQBN} | tr ':' '-').json" >> $GITHUB_ENV
206206
207-
- name: Create Blink sketch
207+
- name: Get Blink sketch
208208
run: |
209209
mkdir Blink/
210210
wget -nv https://raw.githubusercontent.com/arduino/arduino-examples/refs/heads/main/examples/01.Basics/Blink/Blink.ino -P Blink/
211211
212-
- name: Compile Blink for ${{ matrix.board }}
213-
uses: pillo79/compile-sketches@main
212+
- name: Compile tests for ${{ matrix.board }}
213+
uses: pillo79/compile-sketches@next
214214
with:
215215
fqbn: ${{ env.FQBN }}
216216
platforms: |
217-
# Use Board Manager to install the latest release of Arduino Zephyr Boards to get the toolchain
218-
- name: "arduino:zephyr"
219-
source-url: "https://downloads.arduino.cc/packages/package_zephyr_index.json"
217+
# Use Board Manager version first, to install the toolchain
218+
- name: ${{ env.PLAT }}
220219
- name: ${{ env.PLAT }}
221220
source-path: "ArduinoCore-zephyr"
222-
sketch-paths: Blink
221+
sketch-paths: |
222+
- Blink
223+
- ArduinoCore-zephyr/libraries
223224
cli-compile-flags: |
224225
- '--build-property'
225226
- 'compiler.c.extra_flags=-Wno-type-limits -Wno-missing-field-initializers'
226227
- '--build-property'
227228
- 'compiler.cpp.extra_flags=-Wno-type-limits -Wno-missing-field-initializers'
228229
verbose: 'false'
229230
enable-deltas-report: 'false'
230-
enable-warnings-report: 'true'
231-
enable-warnings-log: 'true'
231+
enable-issues-report: 'true'
232232

233233
- name: Get job ID
234234
id: job_id
@@ -267,49 +267,18 @@ jobs:
267267
env:
268268
ALL_BOARD_DATA: ${{ needs.build-env.outputs.ALL_BOARD_DATA }}
269269
steps:
270+
- uses: actions/checkout@v4
271+
with:
272+
fetch-depth: 0
273+
persist-credentials: false
274+
270275
- uses: actions/download-artifact@v4
271276
with:
272277
path: .
273278
pattern: test-report-*
274279
merge-multiple: true
275280

276-
- run: |
277-
ARTIFACTS=$(jq -cr 'map(.artifact) | unique | .[]' <<< ${ALL_BOARD_DATA}) # this avoids the 'zephyr' artifact
278-
for artifact in $ARTIFACTS ; do
279-
echo "### \`$artifact\` test results:" >> "$GITHUB_STEP_SUMMARY"
280-
jq -c "map(select(.artifact == \"$artifact\")) | .[]" <<< ${ALL_BOARD_DATA} | while read -r BOARD_DATA; do
281-
BOARD=$(echo $BOARD_DATA | jq -cr '.board')
282-
VARIANT=$(echo $BOARD_DATA | jq -cr '.variant')
283-
SUBARCH=$(echo $BOARD_DATA | jq -cr '.subarch')
284-
FQBN="arduino:$SUBARCH:$BOARD"
285-
REPORT_FILE="$(echo $FQBN | tr ':' '-').json"
286-
if [ ! -f $REPORT_FILE ]; then
287-
echo "* :x: $BOARD (\`$VARIANT\`) - No report found?" >> "$GITHUB_STEP_SUMMARY"
288-
else
289-
REPORT=$(jq -cr '.boards[0].sketches[0]' $REPORT_FILE)
290-
JOB_ID=$(echo $REPORT | jq -cr '.job_id')
291-
JOB_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${JOB_ID}#step:5:2"
292-
if ! $(echo $REPORT | jq -cr '.compilation_success') ; then
293-
echo "* :x: [$BOARD]($JOB_URL) (\`$VARIANT\`) - Build failed" >> "$GITHUB_STEP_SUMMARY"
294-
else
295-
WARNINGS=$(echo $REPORT | jq -cr '.warnings.current.absolute // 0')
296-
if [ $WARNINGS -eq 0 ]; then
297-
echo "* :white_check_mark: $BOARD (\`$VARIANT\`) - Build successful" >> "$GITHUB_STEP_SUMMARY"
298-
else
299-
echo >> "$GITHUB_STEP_SUMMARY"
300-
echo "<details><summary>&nbsp;&nbsp; :warning: <a href=\"$JOB_URL\">$BOARD</a> (<tt>$VARIANT</tt>) - $WARNINGS warnings:</summary>" >> "$GITHUB_STEP_SUMMARY"
301-
echo >> "$GITHUB_STEP_SUMMARY"
302-
echo "\`\`\`" >> "$GITHUB_STEP_SUMMARY"
303-
echo $REPORT | jq -cr '.warnings_log[]' >> "$GITHUB_STEP_SUMMARY"
304-
echo "\`\`\`" >> "$GITHUB_STEP_SUMMARY"
305-
echo >> "$GITHUB_STEP_SUMMARY"
306-
echo "</details>" >> "$GITHUB_STEP_SUMMARY"
307-
echo >> "$GITHUB_STEP_SUMMARY"
308-
fi
309-
fi
310-
fi
311-
done
312-
done
281+
- run: extra/ci_collect_logs.sh > $GITHUB_STEP_SUMMARY
313282

314283
- name: Clean up intermediate artifacts
315284
uses: geekyeggo/[email protected]

extra/package_core.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ cat platform.txt > ${TEMP_PLATFORM}
5959
sed -ie "s/^version=.*/version=$(extra/get_core_version.sh)/" ${TEMP_PLATFORM}
6060

6161
declutter_file() {
62-
# remove comments and empty lines
62+
# remove comments, whitespace at EOL, '/' dir terminators and empty lines
6363
[ -f "$1" ] || return 0
64-
cat "$1" | sed -e 's/\s*#.*//' | grep -v '^\s*$'
64+
cat "$1" | sed -e 's/\s*#.*//' -e 's/\s*$//' -e 's/\/$//' | grep -v '^\s*$'
6565
}
6666

6767
# create the list of files and directories to include
@@ -70,6 +70,7 @@ echo ${TEMP_BOARDS} >> ${TEMP_INC}
7070
echo ${TEMP_PLATFORM} >> ${TEMP_INC}
7171
declutter_file extra/artifacts/_common.inc >> ${TEMP_INC}
7272
declutter_file extra/artifacts/$ARTIFACT.inc >> ${TEMP_INC}
73+
declutter_file extra/artifacts/$ARTIFACT.only >> ${TEMP_INC}
7374
for variant in $INCLUDED_VARIANTS ; do
7475
echo "- ${variant}"
7576
echo "variants/${variant}/" >> ${TEMP_INC}
@@ -84,6 +85,9 @@ done
8485
TEMP_EXC=$(mktemp -p . | sed 's/\.\///')
8586
declutter_file extra/artifacts/_common.exc >> ${TEMP_EXC}
8687
declutter_file extra/artifacts/$ARTIFACT.exc >> ${TEMP_EXC}
88+
for f in $(ls extra/artifacts/*.only | grep -v "$ARTIFACT.only") ; do
89+
declutter_file $f >> ${TEMP_EXC}
90+
done
8791

8892
mkdir -p $(dirname ${OUTPUT_FILE})
8993
tar -cjhf ${OUTPUT_FILE} -X ${TEMP_EXC} -T ${TEMP_INC} \

libraries/Arduino_LED_Matrix/library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ paragraph=This library provides a simple interface for controlling the LED matri
77
category=Communication
88
url=https://www.arduino.cc/
99
architectures=*
10-
depends=
10+
depends=ArduinoGraphics

0 commit comments

Comments
 (0)