Skip to content

Commit 6cf7ca4

Browse files
Merge branch 'main' into eth_wrapper_fix
2 parents 3605386 + 56a1686 commit 6cf7ca4

126 files changed

Lines changed: 6682 additions & 5904 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
# EXTRA_ZEPHYR_MODULES.
2727

2828
steps:
29-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@v6
3030
with:
3131
fetch-depth: 0
3232
persist-credentials: false

.github/workflows/format_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout code
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
2323
with:
2424
submodules: false
2525
persist-credentials: false

.github/workflows/package_core.yml

Lines changed: 78 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
sudo apt-get update
5656
sudo apt-get install -y --no-install-recommends git cmake wget python3-pip ninja-build
5757
58-
- uses: actions/checkout@v4
58+
- uses: actions/checkout@v6
5959
with:
6060
submodules: 'recursive'
6161
fetch-depth: 0
@@ -75,7 +75,7 @@ jobs:
7575
# needs the above env vars
7676
run: |
7777
echo "## Building \`$CORE_VER\`" >> "$GITHUB_STEP_SUMMARY"
78-
echo "CORE_TAG=$(git describe --tags --exact-match 2>/dev/null || echo $CORE_HASH)" >> "$GITHUB_ENV"
78+
echo "CORE_TAG=$(git describe --tags --exact-match --exclude '*/*' 2>/dev/null || echo $CORE_HASH)" >> "$GITHUB_ENV"
7979
echo "ALL_BOARD_FQBNS=$(jq -c 'map((. + {link_mode: "static"}), (. + {link_mode: "dynamic"}))' <<< ${ALL_BOARD_DATA})" >> "$GITHUB_ENV"
8080
echo "ARTIFACTS=$(jq -c '["zephyr"] + (map(.artifact) | unique)' <<< ${ALL_BOARD_DATA})" >> "$GITHUB_ENV"
8181
echo "SUB_ARCHES=$(jq -c 'map(.subarch) | unique' <<< ${ALL_BOARD_DATA})" >> "$GITHUB_ENV"
@@ -85,18 +85,20 @@ jobs:
8585
tar cphf - cores/arduino/api | zstd > arduino-api.tar.zstd
8686
8787
- name: Archive build environment
88-
uses: actions/upload-artifact@v4
88+
uses: actions/upload-artifact@v7
8989
with:
9090
name: build-env
9191
path: ~/build-env.tar.zstd
9292
retention-days: 1
93+
archive: false
9394

9495
- name: Archive API snapshot
95-
uses: actions/upload-artifact@v4
96+
uses: actions/upload-artifact@v7
9697
with:
9798
name: arduino-api
9899
path: arduino-api.tar.zstd
99100
retention-days: 1
101+
archive: false
100102

101103

102104

@@ -124,10 +126,10 @@ jobs:
124126
fail-fast: false
125127
steps:
126128

127-
- uses: actions/download-artifact@v4
129+
- uses: actions/download-artifact@v8
128130
with:
129131
path: /home/runner
130-
name: build-env
132+
name: build-env.tar.zstd
131133

132134
- name: Restore build environment
133135
run: |
@@ -137,7 +139,7 @@ jobs:
137139
(cd ~ && tar --use-compress-program=unzstd -xpf build-env.tar.zstd && rm build-env.tar.zstd)
138140
139141
- name: ccache
140-
uses: hendrikmuhs/ccache-action@v1.2
142+
uses: hendrikmuhs/ccache-action@v1.2.21
141143
with:
142144
verbose: 1
143145
key: ${{ github.job }}-${{ matrix.board }} # independent caches
@@ -191,16 +193,17 @@ jobs:
191193
192194
- name: Archive board binaries
193195
if: ${{ !cancelled() }}
194-
uses: actions/upload-artifact@v4
196+
uses: actions/upload-artifact@v7
195197
with:
196198
# prefix the name with 'failed-' if the build failed, so that it is not removed
197199
name: ${{ format('{0}binaries-{1}', (job.status == 'failure') && 'failed-' || '', env.ARTIFACT_TAG) }}
198200
path: binaries-${{ env.ARTIFACT_TAG }}.tar.zstd
199201
retention-days: 7 # for failed build inspection
202+
archive: false
200203

201204
- name: Archive build reports
202205
if: ${{ !cancelled() }}
203-
uses: actions/upload-artifact@v4
206+
uses: actions/upload-artifact@v7
204207
with:
205208
name: build-report-${{ env.ARTIFACT_TAG }}
206209
path: ${{ env.REPORT_FILES }}
@@ -221,7 +224,7 @@ jobs:
221224
- build-board
222225
env:
223226
ALL_BOARD_DATA: ${{ needs.build-env.outputs.ALL_BOARD_DATA }}
224-
CORE_ARTIFACT: ArduinoCore-${{ matrix.artifact }}-${{ needs.build-env.outputs.CORE_HASH }}
227+
CORE_ARTIFACT: ArduinoCore-${{ matrix.artifact }}-${{ needs.build-env.outputs.CORE_HASH }}.tar.bz2
225228
CORE_TAG: ${{ needs.build-env.outputs.CORE_TAG }}
226229
strategy:
227230
matrix:
@@ -230,21 +233,21 @@ jobs:
230233
if: ${{ !cancelled() && needs.build-env.result == 'success' }}
231234
steps:
232235

233-
- uses: actions/checkout@v4
236+
- uses: actions/checkout@v6
234237
with:
235238
submodules: 'recursive'
236239
fetch-depth: 0
237240
persist-credentials: false
238241
fetch-tags: true
239242

240243
# Get the API snapshot
241-
- uses: actions/download-artifact@v4
244+
- uses: actions/download-artifact@v8
242245
with:
243246
path: .
244-
name: arduino-api
247+
name: arduino-api.tar.zstd
245248

246249
# Get all built binaries
247-
- uses: actions/download-artifact@v4
250+
- uses: actions/download-artifact@v8
248251
with:
249252
path: .
250253
pattern: binaries-*
@@ -259,13 +262,14 @@ jobs:
259262
tar --use-compress-program=unzstd -xpf $f
260263
done
261264
# Create the core artifact for this set of boards
262-
./extra/package_core.sh ${{ matrix.artifact }} ${CORE_TAG} distrib/${CORE_ARTIFACT}.tar.bz2
265+
./extra/package_core.sh ${{ matrix.artifact }} ${CORE_TAG} distrib/${CORE_ARTIFACT}
263266
264-
- uses: actions/upload-artifact@v4
267+
- uses: actions/upload-artifact@v7
265268
if: ${{ success() || failure() }}
266269
with:
267270
name: ${{ env.CORE_ARTIFACT }}
268-
path: distrib/${{ env.CORE_ARTIFACT }}.tar.bz2
271+
path: distrib/${{ env.CORE_ARTIFACT }}
272+
archive: false
269273

270274

271275

@@ -279,12 +283,12 @@ jobs:
279283
- package-core
280284
steps:
281285

282-
- uses: geekyeggo/delete-artifact@v5.1.0
286+
- uses: geekyeggo/delete-artifact@v6
283287
with:
284288
name: |
285-
arduino-api
289+
arduino-api.tar.zstd
286290
binaries-*
287-
build-env
291+
build-env.tar.zstd
288292
failOnError: false
289293

290294

@@ -308,27 +312,27 @@ jobs:
308312
env:
309313
PLAT: arduino:${{ matrix.subarch }}
310314
FQBN: arduino:${{ matrix.subarch }}:${{ matrix.board }}:link_mode=${{ matrix.link_mode }}
311-
CORE_ARTIFACT: ArduinoCore-${{ matrix.artifact }}-${{ needs.build-env.outputs.CORE_HASH }}
315+
CORE_ARTIFACT: ArduinoCore-${{ matrix.artifact }}-${{ needs.build-env.outputs.CORE_HASH }}.tar.bz2
312316
ARTIFACT_TAG: ${{ needs.build-env.outputs.CORE_HASH }}-${{ matrix.board }}-${{ matrix.link_mode }}
313317
if: ${{ !cancelled() && needs.build-env.result == 'success' }}
314318
steps:
315319

316320
# only needs the test list generator and artifact information
317-
- uses: actions/checkout@v4
321+
- uses: actions/checkout@v6
318322
with:
319323
fetch-depth: 0
320324
persist-credentials: false
321325
sparse-checkout: |
322326
extra/ci_test_list.sh
323327
extra/artifacts/
324328
325-
- uses: actions/download-artifact@v4
329+
- uses: actions/download-artifact@v8
326330
with:
327331
name: ${{ env.CORE_ARTIFACT }}
328332

329333
- name: Set up core
330334
run: |
331-
tar xf ${CORE_ARTIFACT}.tar.bz2 # will create ArduinoCore-zephyr/
335+
tar xf ${CORE_ARTIFACT} # will create ArduinoCore-zephyr/
332336
echo "REPORT_FILE=$(echo ${FQBN} | tr ':' '-').json" >> $GITHUB_ENV
333337
334338
- name: Get test sketches
@@ -337,7 +341,7 @@ jobs:
337341
extra/ci_test_list.sh ${{ matrix.artifact }} ${{ matrix.variant }}
338342
339343
- name: Compile tests for ${{ matrix.board }}
340-
uses: pillo79/compile-sketches@4a1dead03155c17ddedc373699d7aa80a78a6c7d # next
344+
uses: pillo79/compile-sketches@next
341345
with:
342346
fqbn: ${{ env.FQBN }}
343347
platforms: |
@@ -369,7 +373,7 @@ jobs:
369373
sed -i -e 's!/home/runner/.arduino15/packages/arduino/hardware/zephyr/[^/]*/!!g' sketches-reports/${REPORT_FILE}
370374
371375
# archive the compile report for later
372-
- uses: actions/upload-artifact@v4
376+
- uses: actions/upload-artifact@v7
373377
if: ${{ success() || failure() }}
374378
with:
375379
name: test-report-${{ env.ARTIFACT_TAG }}
@@ -395,23 +399,25 @@ jobs:
395399
GH_REPO: ${{ github.repository }}
396400
steps:
397401

398-
- uses: actions/checkout@v4
402+
- uses: actions/checkout@v6
399403
with:
400404
fetch-depth: 0
401405
persist-credentials: false
402406
fetch-tags: true
403407

404-
- uses: actions/download-artifact@v4
408+
- uses: actions/download-artifact@v8
405409
with:
406410
path: .
407411
pattern: "*-report-*"
408412
merge-multiple: true
409413

410-
- run: |
414+
- name: Generate workflow summary
415+
run: |
411416
# gather the array of job metadata (especially name and ID) for the current workflow run
412417
export WORKFLOW_JOBS=$(gh run view ${{ github.run_id }} --attempt ${{ github.run_attempt }} --json jobs --jq '.jobs')
413418
# Run the log inspection script
414419
extra/ci_inspect_logs.py result summary full_log
420+
cat result
415421
416422
# Display the summary and full log in the step summary
417423
cat summary >> $GITHUB_STEP_SUMMARY
@@ -426,15 +432,45 @@ jobs:
426432
cat summary | sed -e 's!\${\\color{\S*}\(.*\)}\$!\1!g' -e 's!\\%!%!g' >> comment-request/comment_body
427433
fi
428434
435+
# Prepare latest size artifact file on push events
436+
if [ "${{ github.event_name }}" == "push" ]; then
437+
tar jchf size-reports-${{ needs.build-env.outputs.CORE_HASH }}.tar.bz2 arduino-*.json
438+
fi
439+
440+
- name: Compute code size changes
441+
if: ${{ github.event_name == 'pull_request' }}
442+
run: |
443+
export GITHUB_BASE_SHA=$(git describe --always origin/${GITHUB_BASE_REF})
444+
extra/ci_calc_size_reports.py ${GITHUB_BASE_SHA} sketches-reports/
445+
429446
# upload comment request artifact (will be retrieved by leave_pr_comment.yml)
430447
- name: Archive comment information
431-
uses: actions/upload-artifact@v4
448+
uses: actions/upload-artifact@v7
432449
if: ${{ github.event_name == 'pull_request' }}
433450
with:
434451
name: comment-request
435452
path: comment-request/
436453
retention-days: 1
437454

455+
# upload size delta report artifact (will be retrieved by report_size_deltas.yml)
456+
- name: Archive size deltas report information
457+
uses: actions/upload-artifact@v7
458+
if: ${{ github.event_name == 'pull_request' }}
459+
with:
460+
name: sketches-reports
461+
path: sketches-reports/
462+
retention-days: 1
463+
464+
# upload new official test size artifact (for AWS storage)
465+
- name: Archive sketch report information
466+
uses: actions/upload-artifact@v7
467+
if: ${{ github.event_name == 'push' }}
468+
with:
469+
name: size-reports
470+
path: size-reports-${{ needs.build-env.outputs.CORE_HASH }}.tar.bz2
471+
retention-days: 1
472+
archive: false
473+
438474
# The last line makes the job fail if the 'result' file does not contain "PASSED".
439475
# No further actions are allowed in case of error.
440476
- run: |
@@ -457,7 +493,7 @@ jobs:
457493
steps:
458494

459495
- name: Clean up intermediate artifacts
460-
uses: geekyeggo/delete-artifact@v5.1.0
496+
uses: geekyeggo/delete-artifact@v6
461497
with:
462498
name: |
463499
build-report-*
@@ -482,14 +518,19 @@ jobs:
482518
contents: read
483519
steps:
484520

485-
- uses: actions/download-artifact@v4
521+
- uses: actions/download-artifact@v8
486522
with:
487523
path: .
488524
pattern: ArduinoCore-*
489525
merge-multiple: true
490526

527+
- uses: actions/download-artifact@v8
528+
with:
529+
path: .
530+
pattern: size-reports-*.tar.bz2
531+
491532
- name: Configure AWS credentials
492-
uses: aws-actions/configure-aws-credentials@v4
533+
uses: aws-actions/configure-aws-credentials@v6
493534
with:
494535
role-to-assume: ${{ secrets.IAM_ROLE }}
495536
aws-region: ${{ secrets.AWS_REGION }}
@@ -499,6 +540,7 @@ jobs:
499540
for f in ArduinoCore-*.tar.bz2 ; do
500541
aws s3 cp $f s3://${{ secrets.S3_BUCKET }}/
501542
done
543+
aws s3 cp size-reports-*.tar.bz2 s3://${{ secrets.S3_BUCKET }}/size-reports/
502544
503545
# Prepare the package index JSON snippets for the newly built core packages.
504546

@@ -515,13 +557,13 @@ jobs:
515557
ARTIFACTS: ${{ needs.build-env.outputs.ARTIFACTS }}
516558
steps:
517559

518-
- uses: actions/checkout@v4
560+
- uses: actions/checkout@v6
519561
with:
520562
fetch-depth: 0
521563
persist-credentials: false
522564
fetch-tags: true
523565

524-
- uses: actions/download-artifact@v4
566+
- uses: actions/download-artifact@v8
525567
with:
526568
path: .
527569
pattern: ArduinoCore-*
@@ -538,7 +580,7 @@ jobs:
538580
done
539581
540582
- name: Archive package index snippets
541-
uses: actions/upload-artifact@v4
583+
uses: actions/upload-artifact@v7
542584
with:
543585
name: ArduinoCore-zephyr-${{ env.CORE_TAG }}-jsons
544586
path: ArduinoCore-*-${{ env.CORE_TAG }}.json

0 commit comments

Comments
 (0)