Skip to content

Bump actions/upload-artifact from 3 to 4 #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Don't upload multiple times to same artifact in sketch compilation wo…
…rkflow

The "Compile Examples" GitHub Actions workflow is configured to compile the example sketches for each of the supported
boards. This is done by using a job matrix in the GitHub Actions workflow to generate a parallel job for each board.

A GitHub Actions workflow artifact is used to transfer the sketches report files generated by the
"arduino/compile-sketches" action between this workflow's job and the "Report Size Deltas" workflow that uses the
"arduino/report-size-deltas" action to publish the data. The "actions/upload-artifact" action is used to upload the
sketches report files to the workflow artifact.

Previously, the sketches reports from all the boards were uploaded to a single artifact. However, support for uploading
multiple times to a single artifact was dropped in version 4.0.0 of the "actions/upload-artifact" action. So it is now
necessary for each of the jobs to use a separate artifact. The "arduino/report-size-deltas" action is configured to
recognize these multiple artifacts by a regular expression that matches against a standardized prefix on the artifact
names.
  • Loading branch information
per1234 committed Oct 9, 2024
commit 8693c9ccd3981139c09327ee39b785c9af31e6ca
14 changes: 13 additions & 1 deletion .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,40 @@ jobs:
matrix:
board:
- fqbn: "arduino:samd:mkr1000"
artifact-name-suffix: arduino-samd-mkr1000
platform-name: arduino:samd
- fqbn: "arduino:samd:mkrwifi1010"
artifact-name-suffix: arduino-samd-mkrwifi1010
platform-name: arduino:samd
- fqbn: "arduino:samd:nano_33_iot"
artifact-name-suffix: arduino-samd-nano_33_iot
platform-name: arduino:samd
- fqbn: "arduino:samd:mkrgsm1400"
artifact-name-suffix: arduino-samd-mkrgsm1400
platform-name: arduino:samd
- fqbn: "arduino:samd:mkrnb1500"
artifact-name-suffix: arduino-samd-mkrnb1500
platform-name: arduino:samd
- fqbn: "arduino:mbed_portenta:envie_m7"
artifact-name-suffix: arduino-mbed_portenta-envie_m7
platform-name: arduino:mbed_portenta
- fqbn: arduino:mbed_nano:nanorp2040connect
artifact-name-suffix: arduino-mbed_nano-nanorp2040connect
platform-name: arduino:mbed_nano
- fqbn: arduino:mbed_nicla:nicla_vision
artifact-name-suffix: arduino-mbed_nicla-nicla_vision
platform-name: arduino:mbed_nicla
- fqbn: arduino:mbed_opta:opta
artifact-name-suffix: arduino-mbed_opta-opta
platform-name: arduino:mbed_opta
- fqbn: arduino:mbed_giga:giga
artifact-name-suffix: arduino-mbed_giga-giga
platform-name: arduino:mbed_giga
- fqbn: arduino:renesas_portenta:portenta_c33
artifact-name-suffix: arduino-renesas_portenta-portenta_c33
platform-name: arduino:renesas_portenta
- fqbn: arduino:renesas_uno:unor4wifi
artifact-name-suffix: arduino-renesas_uno-unor4wifi
platform-name: arduino:renesas_uno

include:
Expand Down Expand Up @@ -136,6 +148,6 @@ jobs:
- name: Save memory usage change report as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.SKETCHES_REPORTS_PATH }}
name: sketches-report-${{ matrix.board.artifact-name-suffix }}
if-no-files-found: error
path: ${{ env.SKETCHES_REPORTS_PATH }}
4 changes: 2 additions & 2 deletions .github/workflows/report-size-deltas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ jobs:
- name: Comment size deltas reports to PRs
uses: arduino/report-size-deltas@v1
with:
# The name of the workflow artifact created by the "Compile Examples" workflow
sketches-reports-source: sketches-reports
# Regex matching the names of the workflow artifacts created by the "Compile Examples" workflow
sketches-reports-source: ^sketches-report-.+
Loading