diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 03d37b322..de92eecb3 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -26,31 +26,19 @@ 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" - # - 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" @@ -163,15 +151,35 @@ 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}}" + set +e + 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 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 3 ]; then exit 1; else sleep $((60 + RANDOM % 40)); 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 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 3 ]; then exit 1; else sleep $((60 + RANDOM % 40)); 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 @@ -248,11 +256,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" 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