diff --git a/.github/actions/build-firmware/action.yml b/.github/actions/build-firmware/action.yml index 4c44b347..fbf826c6 100644 --- a/.github/actions/build-firmware/action.yml +++ b/.github/actions/build-firmware/action.yml @@ -18,7 +18,7 @@ runs: shell: bash run: cp sdkconfig.board.${{ inputs.board_id }} sdkconfig - name: 'Build' - uses: espressif/esp-idf-ci-action@main + uses: espressif/esp-idf-ci-action@v1 with: esp_idf_version: v5.4 target: ${{ inputs.arch }} diff --git a/.github/actions/build-sdk/action.yml b/.github/actions/build-sdk/action.yml index 4348680a..96de2367 100644 --- a/.github/actions/build-sdk/action.yml +++ b/.github/actions/build-sdk/action.yml @@ -18,14 +18,18 @@ runs: shell: bash run: cp sdkconfig.board.${{ inputs.board_id }} sdkconfig - name: 'Build' - uses: espressif/esp-idf-ci-action@main + uses: espressif/esp-idf-ci-action@v1 with: + # NOTE: Update with ESP-IDF! esp_idf_version: v5.4 target: ${{ inputs.arch }} path: './' - name: 'Release' shell: bash - run: Buildscripts/release-sdk.sh release/TactilitySDK + env: + # NOTE: Update with ESP-IDF! + ESP_IDF_VERSION: '5.4' + run: Buildscripts/release-sdk.sh release/TactilitySDK - name: 'Upload Artifact' uses: actions/upload-artifact@v4 with: diff --git a/Buildscripts/board.cmake b/Buildscripts/board.cmake index 1dc297da..29afb107 100644 --- a/Buildscripts/board.cmake +++ b/Buildscripts/board.cmake @@ -19,7 +19,7 @@ function(INIT_TACTILITY_GLOBALS SDKCONFIG_FILE) set(id_length 0) math(EXPR id_length "${sdkconfig_board_id_length} - 21") string(SUBSTRING ${sdkconfig_board_id} 20 ${id_length} board_id) - message("Building board: ${Cyan}${board_id}${ColorReset}") + message("Board name: ${Cyan}${board_id}${ColorReset}") if (board_id STREQUAL "cyd-2432s024c") set(TACTILITY_BOARD_PROJECT CYD-2432S024C) @@ -62,7 +62,7 @@ function(INIT_TACTILITY_GLOBALS SDKCONFIG_FILE) if (TACTILITY_BOARD_PROJECT STREQUAL "") message(FATAL_ERROR "No subproject mapped to \"${TACTILITY_BOARD_ID}\" in root Buildscripts/board.cmake") else () - message("Board project: ${Cyan}Boards/${TACTILITY_BOARD_PROJECT}${ColorReset}\n") + message("Board path: ${Cyan}Boards/${TACTILITY_BOARD_PROJECT}${ColorReset}\n") set_property(GLOBAL PROPERTY TACTILITY_BOARD_PROJECT ${TACTILITY_BOARD_PROJECT}) set_property(GLOBAL PROPERTY TACTILITY_BOARD_ID ${board_id}) endif () diff --git a/Buildscripts/build.sh b/Buildscripts/build.sh index 9f7b4af3..b4abca05 100755 --- a/Buildscripts/build.sh +++ b/Buildscripts/build.sh @@ -27,12 +27,13 @@ fi echoNewPhase "Cleaning build folder" -rm -rf build +#rm -rf build echoNewPhase "Building $sdkconfig_file" cp $sdkconfig_file sdkconfig -if not idf.py build; then +idf.py build +if [[ $? != 0 ]]; then fatalError "Failed to build esp32s3 SDK" fi diff --git a/CMakeLists.txt b/CMakeLists.txt index d7907658..6ff5f4c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ file(READ version.txt TACTILITY_VERSION) add_compile_definitions(TT_VERSION="${TACTILITY_VERSION}") if (DEFINED ENV{ESP_IDF_VERSION}) - message("Building with ESP-IDF ${Cyan}v$ENV{ESP_IDF_VERSION}${ColorReset}") + message("Using ESP-IDF ${Cyan}v$ENV{ESP_IDF_VERSION}${ColorReset}") include($ENV{IDF_PATH}/tools/cmake/project.cmake) include("Buildscripts/board.cmake") diff --git a/Documentation/releasing.md b/Documentation/releasing.md new file mode 100644 index 00000000..d5fb207e --- /dev/null +++ b/Documentation/releasing.md @@ -0,0 +1,22 @@ +# Releasing Tactility + +1. Test the latest version on several devices +2. Build the SDK locally and test it with `ExternalApps/HelloWorld` +3. Test the latest SDK build from GitHub with the CDN: + 1. Download it from the [main branch](https://github.com/ByteWelder/Tactility/actions/workflows/build-sdk.yml) + 2. Upload it to the [CDN](https://dash.cloudflare.com) + 3. Update `sdk.json` from [TactilityTool](https://github.com/ByteWelder/TactilityTool) and upload it to [CDN](https://dash.cloudflare.com) + 4. Test it with `ExternalApps/HelloWorld` (clear all its cache and update the SDK version) +4. Download the latest firmwares [main branch](https://github.com/ByteWelder/Tactility/actions/workflows/build-firmware.yml) +5. Prepare a new version of [TactilityWebInstaller](https://github.com/ByteWelder/TactilityWebInstaller) locally +6. Test the firmwares on all devices with the local web installer +7. If all went well: release the web installer +8. Test web installer in production (use popular devices) +9. Make a new version of the docs available at [TactilityDocs](https://github.com/ByteWelder/TactilityDocs) +10. Make a new [GitHub release](https://github.com/ByteWelder/Tactility/releases/new) + +### Post-release + +1. Mention on Discord +2. Consider notifying vendors/stakeholders +3. Remove dev versions in `sdk.json`from [TactilityTool](https://github.com/ByteWelder/TactilityTool) and upload it to [CDN](https://dash.cloudflare.com) \ No newline at end of file diff --git a/ExternalApps/HelloWorld/tactility.py b/ExternalApps/HelloWorld/tactility.py index c41b2040..e27ed647 100644 --- a/ExternalApps/HelloWorld/tactility.py +++ b/ExternalApps/HelloWorld/tactility.py @@ -217,7 +217,7 @@ def sdk_download(version, platform): print(f"Downloading SDK version {version} for {platform}") if download_file(sdk_url, filepath): with zipfile.ZipFile(filepath, "r") as zip_ref: - zip_ref.extractall(sdk_root_dir) + zip_ref.extractall(os.path.join(sdk_root_dir, "TactilitySDK")) return True else: return False