@@ -26,20 +26,16 @@ jobs:
2626 arduino-platform :
2727 [
2828 " feather_esp32s2" ,
29- " feather_esp32s2_reverse_tft" ,
30- " feather_esp32s2_tft" ,
3129 " funhouse_noota" ,
32- " magtag" ,
33- " metroesp32s2" ,
34- " qtpy_esp32s2" ,
3530 " esp32s3_devkitc_1_n8" ,
36- " feather_esp32s3_4mbflash_2mbpsram" ,
37- " feather_esp32s3_reverse_tft" ,
38- " feather_esp32s3_tft" ,
39- " qtpy_esp32s3_n4r2" ,
4031 " xiao_esp32s3" ,
4132 ]
42-
33+ include :
34+ - offset : " 0x0"
35+ - offset : " 0x1000"
36+ arduino-platform : " funhouse_noota"
37+ - offset : " 0x1000"
38+ arduino-platform : " feather_esp32s2"
4339 steps :
4440 - name : " skip if unwanted"
4541 continue-on-error : true
@@ -151,15 +147,29 @@ jobs:
151147 } >> "$GITHUB_OUTPUT"
152148 - name : fetch tinyuf2 combined.bin
153149 run : |
154- DOWNLOAD_URL=$(curl -s https://api.github.com/repos/adafruit/tinyuf2/releases/latest | \
155- jq -r '.assets[] | select(.browser_download_url | contains("tinyuf2-'${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}'-") and endswith(".zip")) | .browser_download_url')
156- if [ -z "$DOWNLOAD_URL" ]; then
157- echo "Error: Could not find the latest tinyuf2 release for board ${fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}."
158- exit 1
159- fi
160- wget "$DOWNLOAD_URL" -O tinyuf2.zip
161- unzip -o tinyuf2.zip -d .
162-
150+ BOARD_NAME="${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}"
151+ for attempt in 1 2; do
152+ echo "Attempt $attempt: Fetching tinyuf2 release info for board $BOARD_NAME"
153+ API_RESPONSE=$(curl -s https://api.github.com/repos/adafruit/tinyuf2/releases/latest)
154+ if [ $? -ne 0 ]; then
155+ echo "Attempt $attempt: curl failed to fetch release info."
156+ if [ "$attempt" -eq 2 ]; then exit 1; else sleep 2; continue; fi
157+ fi
158+ DOWNLOAD_URL=$(echo "$API_RESPONSE" | jq -r '.assets[] | select(.browser_download_url | contains("tinyuf2-'$BOARD_NAME'-") and endswith(".zip")) | .browser_download_url // empty')
159+ if [ -z "$DOWNLOAD_URL" ]; then
160+ echo "Attempt $attempt: No matching tinyuf2 zip found for board $BOARD_NAME."
161+ if [ "$attempt" -eq 2 ]; then exit 1; else sleep 2; continue; fi
162+ fi
163+ echo "Attempt $attempt: Downloading $DOWNLOAD_URL"
164+ wget "$DOWNLOAD_URL" -O tinyuf2.zip
165+ if [ $? -eq 0 ]; then
166+ unzip -o tinyuf2.zip -d .
167+ break
168+ else
169+ echo "Attempt $attempt: wget failed to download $DOWNLOAD_URL"
170+ if [ "$attempt" -eq 2 ]; then exit 1; else sleep 2; fi
171+ fi
172+ done
163173 - name : move partition and bootloader files for tinyuf2 (to match flash_args)
164174 run : |
165175 # Copy files where they're expected to make flash_args happy
@@ -234,9 +244,18 @@ jobs:
234244 matrix :
235245 arduino-platform :
236246 [
247+ " magtag" ,
248+ " metroesp32s2" ,
237249 " metro_esp32s3" ,
250+ " feather_esp32s2_tft" ,
251+ " feather_esp32s2_reverse_tft" ,
238252 " feather_esp32s3" ,
253+ " feather_esp32s3_4mbflash_2mbpsram" ,
254+ " feather_esp32s3_tft" ,
239255 " qtpy_esp32s3" ,
256+ " qtpy_esp32s2" ,
257+ " feather_esp32s3_reverse_tft" ,
258+ " qtpy_esp32s3_n4r2" ,
240259 ]
241260 steps :
242261 - name : " skip if unwanted"
0 commit comments