@@ -26,31 +26,19 @@ jobs:
26
26
arduino-platform :
27
27
[
28
28
" feather_esp32s2" ,
29
+ " feather_esp32s2_reverse_tft" ,
30
+ " feather_esp32s2_tft" ,
29
31
" funhouse_noota" ,
30
- " esp32s3_devkitc_1_n8" ,
31
- " xiao_esp32s3" ,
32
32
" magtag" ,
33
33
" metroesp32s2" ,
34
- " feather_esp32s2_tft" ,
35
- " feather_esp32s2_reverse_tft" ,
36
34
" qtpy_esp32s2" ,
35
+ " esp32s3_devkitc_1_n8" ,
36
+ " feather_esp32s3_4mbflash_2mbpsram" ,
37
+ " feather_esp32s3_reverse_tft" ,
38
+ " feather_esp32s3_tft" ,
39
+ " qtpy_esp32s3_n4r2" ,
40
+ " xiao_esp32s3" ,
37
41
]
38
- # include:
39
- # - offset: "0x0"
40
- # - offset: "0x1000"
41
- # arduino-platform: "funhouse_noota"
42
- # - offset: "0x1000"
43
- # arduino-platform: "feather_esp32s2"
44
- # - offset: "0x1000"
45
- # arduino-platform: "metroesp32s2"
46
- # - offset: "0x1000"
47
- # arduino-platform: "magtag"
48
- # - offset: "0x1000"
49
- # arduino-platform: "feather_esp32s2_tft"
50
- # - offset: "0x1000"
51
- # arduino-platform: "feather_esp32s2_reverse_tft"
52
- # - offset: "0x1000"
53
- # arduino-platform: "qtpy_esp32s2"
54
42
55
43
steps :
56
44
- name : " skip if unwanted"
@@ -163,15 +151,35 @@ jobs:
163
151
} >> "$GITHUB_OUTPUT"
164
152
- name : fetch tinyuf2 combined.bin
165
153
run : |
166
- DOWNLOAD_URL=$(curl -s https://api.github.com/repos/adafruit/tinyuf2/releases/latest | \
167
- jq -r '.assets[] | select(.browser_download_url | contains("tinyuf2-'${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}'-") and endswith(".zip")) | .browser_download_url')
168
- if [ -z "$DOWNLOAD_URL" ]; then
169
- echo "Error: Could not find the latest tinyuf2 release for board ${fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}."
170
- exit 1
171
- fi
172
- wget "$DOWNLOAD_URL" -O tinyuf2.zip
173
- unzip -o tinyuf2.zip -d .
174
-
154
+ BOARD_NAME="${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}"
155
+ set +e
156
+ for attempt in 1 2 3; do
157
+ echo "Attempt $attempt: Fetching tinyuf2 release info for board $BOARD_NAME"
158
+ API_RESPONSE=$(curl --silent --fail https://api.github.com/repos/adafruit/tinyuf2/releases/latest)
159
+ if [ $? -ne 0 ]; then
160
+ echo "Attempt $attempt: curl failed to fetch release info."
161
+ if [ "$attempt" -eq 3 ]; then exit 1; else sleep $((60 + RANDOM % 40)); continue; fi
162
+ fi
163
+ DOWNLOAD_URL=$(echo "$API_RESPONSE" | jq -r '.assets[] | select(.browser_download_url | contains("tinyuf2-'$BOARD_NAME'-") and endswith(".zip")) | .browser_download_url // empty'); JQ_EXIT=$?
164
+ if [ $JQ_EXIT -ne 0 ] || [ -z "$DOWNLOAD_URL" ]; then
165
+ echo "Attempt $attempt: jq failed or no matching zip found."
166
+ if [ "$attempt" -eq 3 ]; then exit 1; else sleep $((60 + RANDOM % 40)); continue; fi
167
+ fi
168
+ echo "Attempt $attempt: Downloading $DOWNLOAD_URL"
169
+ wget "$DOWNLOAD_URL" -O tinyuf2.zip
170
+ if [ $? -eq 0 ]; then
171
+ unzip -o tinyuf2.zip -d .
172
+ if [ $? -ne 0 ]; then
173
+ echo "Attempt $attempt: unzip failed"
174
+ if [ "$attempt" -eq 3 ]; then exit 1; else sleep $((60 + RANDOM % 40)); continue; fi
175
+ fi
176
+ break
177
+ else
178
+ echo "Attempt $attempt: wget failed to download $DOWNLOAD_URL"
179
+ if [ "$attempt" -eq 3 ]; then exit 1; else sleep $((60 + RANDOM % 40)); fi
180
+ fi
181
+ done
182
+ set -e
175
183
- name : move partition and bootloader files for tinyuf2 (to match flash_args)
176
184
run : |
177
185
# Copy files where they're expected to make flash_args happy
@@ -248,11 +256,7 @@ jobs:
248
256
[
249
257
" metro_esp32s3" ,
250
258
" feather_esp32s3" ,
251
- " feather_esp32s3_4mbflash_2mbpsram" ,
252
- " feather_esp32s3_reverse_tft" ,
253
- " feather_esp32s3_tft" ,
254
259
" qtpy_esp32s3" ,
255
- " qtpy_esp32s3_n4r2" ,
256
260
]
257
261
steps :
258
262
- name : " skip if unwanted"
0 commit comments