From effe76b2e1256f741f65b2a7fca33a1d1c292a28 Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Tue, 22 Jul 2025 16:34:57 +0100 Subject: [PATCH 1/8] Switch 4MB S3 boards to esptool job --- .github/workflows/build-clang-doxy.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 03d37b322..b312d1f85 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -34,6 +34,10 @@ jobs: "feather_esp32s2_tft", "feather_esp32s2_reverse_tft", "qtpy_esp32s2", + "feather_esp32s3_4mbflash_2mbpsram", + "feather_esp32s3_reverse_tft", + "feather_esp32s3_tft", + "qtpy_esp32s3_n4r2", ] # include: # - offset: "0x0" @@ -248,11 +252,7 @@ jobs: [ "metro_esp32s3", "feather_esp32s3", - "feather_esp32s3_4mbflash_2mbpsram", - "feather_esp32s3_reverse_tft", - "feather_esp32s3_tft", "qtpy_esp32s3", - "qtpy_esp32s3_n4r2", ] steps: - name: "skip if unwanted" From 6a98837c3c9608fcd5e1fdc74a47eec3d70da22b Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Tue, 22 Jul 2025 16:36:24 +0100 Subject: [PATCH 2/8] Reorder targets in esptool job by chip then alpha --- .github/workflows/build-clang-doxy.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index b312d1f85..940fc378a 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -26,18 +26,18 @@ jobs: arduino-platform: [ "feather_esp32s2", + "feather_esp32s2_reverse_tft", + "feather_esp32s2_tft", "funhouse_noota", - "esp32s3_devkitc_1_n8", - "xiao_esp32s3", "magtag", "metroesp32s2", - "feather_esp32s2_tft", - "feather_esp32s2_reverse_tft", "qtpy_esp32s2", + "esp32s3_devkitc_1_n8", "feather_esp32s3_4mbflash_2mbpsram", "feather_esp32s3_reverse_tft", "feather_esp32s3_tft", "qtpy_esp32s3_n4r2", + "xiao_esp32s3", ] # include: # - offset: "0x0" From 81f43d589edb1fae2048702d4c50a52c3be5d7e1 Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Tue, 22 Jul 2025 16:37:51 +0100 Subject: [PATCH 3/8] Remove bootloader offsets as now in tinyuf2 flash_args file --- .github/workflows/build-clang-doxy.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 940fc378a..2d34e314b 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -39,22 +39,6 @@ jobs: "qtpy_esp32s3_n4r2", "xiao_esp32s3", ] - # include: - # - offset: "0x0" - # - offset: "0x1000" - # arduino-platform: "funhouse_noota" - # - offset: "0x1000" - # arduino-platform: "feather_esp32s2" - # - offset: "0x1000" - # arduino-platform: "metroesp32s2" - # - offset: "0x1000" - # arduino-platform: "magtag" - # - offset: "0x1000" - # arduino-platform: "feather_esp32s2_tft" - # - offset: "0x1000" - # arduino-platform: "feather_esp32s2_reverse_tft" - # - offset: "0x1000" - # arduino-platform: "qtpy_esp32s2" steps: - name: "skip if unwanted" From d8595b215c9d7ed994fd39ddff1961b21f79c2d9 Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Tue, 22 Jul 2025 16:39:11 +0100 Subject: [PATCH 4/8] Update version to 1.0.0-beta.109 --- library.properties | 2 +- src/Wippersnapper.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library.properties b/library.properties index 52f817f16..01e9c7813 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Adafruit WipperSnapper -version=1.0.0-beta.108 +version=1.0.0-beta.109 author=Adafruit maintainer=Adafruit sentence=Arduino application for Adafruit.io WipperSnapper diff --git a/src/Wippersnapper.h b/src/Wippersnapper.h index c8af86984..cf62df218 100644 --- a/src/Wippersnapper.h +++ b/src/Wippersnapper.h @@ -142,7 +142,7 @@ #endif #define WS_VERSION \ - "1.0.0-beta.108" ///< WipperSnapper app. version (semver-formatted) + "1.0.0-beta.109" ///< WipperSnapper app. version (semver-formatted) // Reserved Adafruit IO MQTT topics #define TOPIC_IO_THROTTLE "/throttle" ///< Adafruit IO Throttle MQTT Topic From c7c007b6b9ed55301d7e3ee110211e90a54d8c36 Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Tue, 22 Jul 2025 17:21:44 +0100 Subject: [PATCH 5/8] Provide more info if tinyuf2 release fetch failure --- .github/workflows/build-clang-doxy.yml | 32 ++++++++++++++++++-------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 2d34e314b..b75fbf2e7 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -151,15 +151,29 @@ jobs: } >> "$GITHUB_OUTPUT" - name: fetch tinyuf2 combined.bin run: | - DOWNLOAD_URL=$(curl -s https://api.github.com/repos/adafruit/tinyuf2/releases/latest | \ - jq -r '.assets[] | select(.browser_download_url | contains("tinyuf2-'${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}'-") and endswith(".zip")) | .browser_download_url') - if [ -z "$DOWNLOAD_URL" ]; then - echo "Error: Could not find the latest tinyuf2 release for board ${fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}." - exit 1 - fi - wget "$DOWNLOAD_URL" -O tinyuf2.zip - unzip -o tinyuf2.zip -d . - + BOARD_NAME="${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}" + for attempt in 1 2; do + echo "Attempt $attempt: Fetching tinyuf2 release info for board $BOARD_NAME" + API_RESPONSE=$(curl -s https://api.github.com/repos/adafruit/tinyuf2/releases/latest) + if [ $? -ne 0 ]; then + echo "Attempt $attempt: curl failed to fetch release info." + if [ "$attempt" -eq 2 ]; then exit 1; else sleep 2; continue; fi + fi + DOWNLOAD_URL=$(echo "$API_RESPONSE" | jq -r '.assets[] | select(.browser_download_url | contains("tinyuf2-'$BOARD_NAME'-") and endswith(".zip")) | .browser_download_url // empty') + if [ -z "$DOWNLOAD_URL" ]; then + echo "Attempt $attempt: No matching tinyuf2 zip found for board $BOARD_NAME." + if [ "$attempt" -eq 2 ]; then exit 1; else sleep 2; continue; fi + fi + echo "Attempt $attempt: Downloading $DOWNLOAD_URL" + wget "$DOWNLOAD_URL" -O tinyuf2.zip + if [ $? -eq 0 ]; then + unzip -o tinyuf2.zip -d . + break + else + echo "Attempt $attempt: wget failed to download $DOWNLOAD_URL" + if [ "$attempt" -eq 2 ]; then exit 1; else sleep 2; fi + fi + done - name: move partition and bootloader files for tinyuf2 (to match flash_args) run: | # Copy files where they're expected to make flash_args happy From 00ca0190f65046c80b2a49d684ab66f50235aab6 Mon Sep 17 00:00:00 2001 From: tyeth Date: Tue, 22 Jul 2025 17:46:53 +0100 Subject: [PATCH 6/8] Make curl fail properly with bad http status codes --- .github/workflows/build-clang-doxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index b75fbf2e7..d9d683e77 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -154,7 +154,7 @@ jobs: BOARD_NAME="${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}" for attempt in 1 2; do echo "Attempt $attempt: Fetching tinyuf2 release info for board $BOARD_NAME" - API_RESPONSE=$(curl -s https://api.github.com/repos/adafruit/tinyuf2/releases/latest) + API_RESPONSE=$(curl --silent --fail https://api.github.com/repos/adafruit/tinyuf2/releases/latest) if [ $? -ne 0 ]; then echo "Attempt $attempt: curl failed to fetch release info." if [ "$attempt" -eq 2 ]; then exit 1; else sleep 2; continue; fi From ca3d5c7d19c8d2c14281962a9e970b856495ca1c Mon Sep 17 00:00:00 2001 From: tyeth Date: Wed, 23 Jul 2025 20:22:25 +0100 Subject: [PATCH 7/8] Add error catching to tinyuf2 steps --- .github/workflows/build-clang-doxy.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index d9d683e77..17e07d1c9 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -152,6 +152,7 @@ jobs: - name: fetch tinyuf2 combined.bin run: | BOARD_NAME="${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}" + set +e for attempt in 1 2; do echo "Attempt $attempt: Fetching tinyuf2 release info for board $BOARD_NAME" API_RESPONSE=$(curl --silent --fail https://api.github.com/repos/adafruit/tinyuf2/releases/latest) @@ -159,21 +160,26 @@ jobs: echo "Attempt $attempt: curl failed to fetch release info." if [ "$attempt" -eq 2 ]; then exit 1; else sleep 2; continue; fi fi - DOWNLOAD_URL=$(echo "$API_RESPONSE" | jq -r '.assets[] | select(.browser_download_url | contains("tinyuf2-'$BOARD_NAME'-") and endswith(".zip")) | .browser_download_url // empty') - if [ -z "$DOWNLOAD_URL" ]; then - echo "Attempt $attempt: No matching tinyuf2 zip found for board $BOARD_NAME." + 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=$? + if [ $JQ_EXIT -ne 0 ] || [ -z "$DOWNLOAD_URL" ]; then + echo "Attempt $attempt: jq failed or no matching zip found." if [ "$attempt" -eq 2 ]; then exit 1; else sleep 2; continue; fi fi echo "Attempt $attempt: Downloading $DOWNLOAD_URL" wget "$DOWNLOAD_URL" -O tinyuf2.zip if [ $? -eq 0 ]; then unzip -o tinyuf2.zip -d . + if [ $? -ne 0 ]; then + echo "Attempt $attempt: unzip failed" + if [ "$attempt" -eq 2 ]; then exit 1; else sleep 2; continue; fi + fi break else echo "Attempt $attempt: wget failed to download $DOWNLOAD_URL" if [ "$attempt" -eq 2 ]; then exit 1; else sleep 2; fi fi done + set -e - name: move partition and bootloader files for tinyuf2 (to match flash_args) run: | # Copy files where they're expected to make flash_args happy From 4dd956eee91e698dcd6cda4dbe56d90abe7cb472 Mon Sep 17 00:00:00 2001 From: tyeth Date: Wed, 23 Jul 2025 20:49:01 +0100 Subject: [PATCH 8/8] Adjust sleep retry to be >60s with fuzz --- .github/workflows/build-clang-doxy.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 17e07d1c9..de92eecb3 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -153,17 +153,17 @@ jobs: run: | BOARD_NAME="${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}" set +e - for attempt in 1 2; do + for attempt in 1 2 3; do echo "Attempt $attempt: Fetching tinyuf2 release info for board $BOARD_NAME" API_RESPONSE=$(curl --silent --fail https://api.github.com/repos/adafruit/tinyuf2/releases/latest) if [ $? -ne 0 ]; then echo "Attempt $attempt: curl failed to fetch release info." - if [ "$attempt" -eq 2 ]; then exit 1; else sleep 2; continue; fi + if [ "$attempt" -eq 3 ]; then exit 1; else sleep $((60 + RANDOM % 40)); continue; fi fi 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=$? if [ $JQ_EXIT -ne 0 ] || [ -z "$DOWNLOAD_URL" ]; then echo "Attempt $attempt: jq failed or no matching zip found." - if [ "$attempt" -eq 2 ]; then exit 1; else sleep 2; continue; fi + if [ "$attempt" -eq 3 ]; then exit 1; else sleep $((60 + RANDOM % 40)); continue; fi fi echo "Attempt $attempt: Downloading $DOWNLOAD_URL" wget "$DOWNLOAD_URL" -O tinyuf2.zip @@ -171,12 +171,12 @@ jobs: unzip -o tinyuf2.zip -d . if [ $? -ne 0 ]; then echo "Attempt $attempt: unzip failed" - if [ "$attempt" -eq 2 ]; then exit 1; else sleep 2; continue; fi + if [ "$attempt" -eq 3 ]; then exit 1; else sleep $((60 + RANDOM % 40)); continue; fi fi break else echo "Attempt $attempt: wget failed to download $DOWNLOAD_URL" - if [ "$attempt" -eq 2 ]; then exit 1; else sleep 2; fi + if [ "$attempt" -eq 3 ]; then exit 1; else sleep $((60 + RANDOM % 40)); fi fi done set -e