Skip to content

Commit 8e9f848

Browse files
committed
Don't upload multiple times to same artifact in sketch compilation workflow
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.
1 parent 106b2c6 commit 8e9f848

File tree

2 files changed

+41
-3
lines changed

2 files changed

+41
-3
lines changed

.github/workflows/compile-platform-examples.yml

+39-1
Original file line numberDiff line numberDiff line change
@@ -35,117 +35,155 @@ jobs:
3535
matrix:
3636
board:
3737
- fqbn: arduino:avr:yun
38+
artifact-name-suffix: arduino-avr-yun
3839
serial: true
3940
softwareserial: true
4041
- fqbn: arduino:avr:uno
42+
artifact-name-suffix: arduino-avr-uno
4143
serial: true
4244
softwareserial: true
4345
- fqbn: arduino:avr:diecimila:cpu=atmega328
46+
artifact-name-suffix: arduino-avr-diecimila-cpu-atmega328
4447
serial: true
4548
softwareserial: true
4649
- fqbn: arduino:avr:diecimila:cpu=atmega168
50+
artifact-name-suffix: arduino-avr-diecimila-cpu-atmega168
4751
serial: true
4852
softwareserial: true
4953
- fqbn: arduino:avr:nano:cpu=atmega328
54+
artifact-name-suffix: arduino-avr-nano-cpu-atmega328
5055
serial: true
5156
softwareserial: true
5257
- fqbn: arduino:avr:nano:cpu=atmega328old
58+
artifact-name-suffix: arduino-avr-nano-cpu-atmega328old
5359
serial: true
5460
softwareserial: true
5561
- fqbn: arduino:avr:nano:cpu=atmega168
62+
artifact-name-suffix: arduino-avr-nano-cpu-atmega168
5663
serial: true
5764
softwareserial: true
5865
- fqbn: arduino:avr:mega:cpu=atmega2560
66+
artifact-name-suffix: arduino-avr-mega-cpu-atmega2560
5967
serial: true
6068
softwareserial: true
6169
- fqbn: arduino:avr:mega:cpu=atmega1280
70+
artifact-name-suffix: arduino-avr-mega-cpu-atmega1280
6271
serial: true
6372
softwareserial: true
6473
- fqbn: arduino:avr:megaADK
74+
artifact-name-suffix: arduino-avr-megaADK
6575
serial: true
6676
softwareserial: true
6777
- fqbn: arduino:avr:leonardo
78+
artifact-name-suffix: arduino-avr-leonardo
6879
serial: true
6980
softwareserial: true
7081
- fqbn: arduino:avr:leonardoeth
82+
artifact-name-suffix: arduino-avr-leonardoeth
7183
serial: true
7284
softwareserial: true
7385
- fqbn: arduino:avr:micro
86+
artifact-name-suffix: arduino-avr-micro
7487
serial: true
7588
softwareserial: true
7689
- fqbn: arduino:avr:esplora
90+
artifact-name-suffix: arduino-avr-esplora
7791
serial: true
7892
softwareserial: true
7993
- fqbn: arduino:avr:mini:cpu=atmega328
94+
artifact-name-suffix: arduino-avr-mini-cpu-atmega328
8095
serial: true
8196
softwareserial: true
8297
- fqbn: arduino:avr:mini:cpu=atmega168
98+
artifact-name-suffix: arduino-avr-mini-cpu-atmega168
8399
serial: true
84100
softwareserial: true
85101
- fqbn: arduino:avr:ethernet
102+
artifact-name-suffix: arduino-avr-ethernet
86103
serial: true
87104
softwareserial: true
88105
- fqbn: arduino:avr:fio
106+
artifact-name-suffix: arduino-avr-fio
89107
serial: true
90108
softwareserial: true
91109
- fqbn: arduino:avr:bt:cpu=atmega328
110+
artifact-name-suffix: arduino-avr-bt-cpu-atmega328
92111
serial: true
93112
softwareserial: true
94113
- fqbn: arduino:avr:bt:cpu=atmega168
114+
artifact-name-suffix: arduino-avr-bt-cpu-atmega168
95115
serial: true
96116
softwareserial: true
97117
- fqbn: arduino:avr:LilyPadUSB
118+
artifact-name-suffix: arduino-avr-LilyPadUSB
98119
serial: true
99120
softwareserial: true
100121
- fqbn: arduino:avr:lilypad:cpu=atmega328
122+
artifact-name-suffix: arduino-avr-lilypad-cpu-atmega328
101123
serial: true
102124
softwareserial: true
103125
- fqbn: arduino:avr:lilypad:cpu=atmega168
126+
artifact-name-suffix: arduino-avr-lilypad-cpu-atmega168
104127
serial: true
105128
softwareserial: true
106129
- fqbn: arduino:avr:pro:cpu=16MHzatmega328
130+
artifact-name-suffix: arduino-avr-pro-cpu-16MHzatmega328
107131
serial: true
108132
softwareserial: true
109133
- fqbn: arduino:avr:pro:cpu=8MHzatmega328
134+
artifact-name-suffix: arduino-avr-pro-cpu-8MHzatmega328
110135
serial: true
111136
softwareserial: true
112137
- fqbn: arduino:avr:pro:cpu=16MHzatmega168
138+
artifact-name-suffix: arduino-avr-pro-cpu-16MHzatmega168
113139
serial: true
114140
softwareserial: true
115141
- fqbn: arduino:avr:pro:cpu=8MHzatmega168
142+
artifact-name-suffix: arduino-avr-pro-cpu-8MHzatmega168
116143
serial: true
117144
softwareserial: true
118145
- fqbn: arduino:avr:atmegang:cpu=atmega168
146+
artifact-name-suffix: arduino-avr-atmegang-cpu-atmega168
119147
serial: true
120148
softwareserial: true
121149
- fqbn: arduino:avr:atmegang:cpu=atmega8
150+
artifact-name-suffix: arduino-avr-atmegang-cpu-atmega8
122151
serial: true
123152
softwareserial: false
124153
- fqbn: arduino:avr:robotControl
154+
artifact-name-suffix: arduino-avr-robotControl
125155
serial: true
126156
softwareserial: false
127157
- fqbn: arduino:avr:robotMotor
158+
artifact-name-suffix: arduino-avr-robotMotor
128159
serial: true
129160
softwareserial: false
130161
- fqbn: arduino:avr:gemma
162+
artifact-name-suffix: arduino-avr-gemma
131163
serial: false
132164
softwareserial: false
133165
- fqbn: arduino:avr:circuitplay32u4cat
166+
artifact-name-suffix: arduino-avr-circuitplay32u4cat
134167
serial: true
135168
softwareserial: true
136169
- fqbn: arduino:avr:yunmini
170+
artifact-name-suffix: arduino-avr-yunmini
137171
serial: true
138172
softwareserial: true
139173
- fqbn: arduino:avr:chiwawa
174+
artifact-name-suffix: arduino-avr-chiwawa
140175
serial: true
141176
softwareserial: true
142177
- fqbn: arduino:avr:one
178+
artifact-name-suffix: arduino-avr-one
143179
serial: true
144180
softwareserial: true
145181
- fqbn: arduino:avr:unowifi
182+
artifact-name-suffix: arduino-avr-unowifi
146183
serial: true
147184
softwareserial: true
148185
- fqbn: arduino:avr:unomini
186+
artifact-name-suffix: arduino-avr-unomini
149187
serial: true
150188
softwareserial: true
151189

@@ -206,4 +244,4 @@ jobs:
206244
with:
207245
if-no-files-found: error
208246
path: ${{ env.SKETCHES_REPORTS_PATH }}
209-
name: ${{ env.SKETCHES_REPORTS_PATH }}
247+
name: sketches-report-${{ matrix.board.artifact-name-suffix }}

.github/workflows/report-size-deltas.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ jobs:
2020
- name: Comment size deltas reports to PRs
2121
uses: arduino/report-size-deltas@v1
2222
with:
23-
# The name of the workflow artifact created by the sketch compilation workflow
24-
sketches-reports-source: sketches-reports
23+
# Regex matching the names of the workflow artifacts created by the "Compile Examples" workflow
24+
sketches-reports-source: ^sketches-report-.+

0 commit comments

Comments
 (0)