mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
Fixed & improved build scripts (#288)
* Fixed&improved build scripts * Fixes and updates * Fix for esp-idf-ci-action * Build fixes
This commit is contained in:
parent
1593eb80ce
commit
a091923353
2
.github/actions/build-firmware/action.yml
vendored
2
.github/actions/build-firmware/action.yml
vendored
@ -18,7 +18,7 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: cp sdkconfig.board.${{ inputs.board_id }} sdkconfig
|
run: cp sdkconfig.board.${{ inputs.board_id }} sdkconfig
|
||||||
- name: 'Build'
|
- name: 'Build'
|
||||||
uses: espressif/esp-idf-ci-action@main
|
uses: espressif/esp-idf-ci-action@v1
|
||||||
with:
|
with:
|
||||||
esp_idf_version: v5.4
|
esp_idf_version: v5.4
|
||||||
target: ${{ inputs.arch }}
|
target: ${{ inputs.arch }}
|
||||||
|
|||||||
8
.github/actions/build-sdk/action.yml
vendored
8
.github/actions/build-sdk/action.yml
vendored
@ -18,14 +18,18 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: cp sdkconfig.board.${{ inputs.board_id }} sdkconfig
|
run: cp sdkconfig.board.${{ inputs.board_id }} sdkconfig
|
||||||
- name: 'Build'
|
- name: 'Build'
|
||||||
uses: espressif/esp-idf-ci-action@main
|
uses: espressif/esp-idf-ci-action@v1
|
||||||
with:
|
with:
|
||||||
|
# NOTE: Update with ESP-IDF!
|
||||||
esp_idf_version: v5.4
|
esp_idf_version: v5.4
|
||||||
target: ${{ inputs.arch }}
|
target: ${{ inputs.arch }}
|
||||||
path: './'
|
path: './'
|
||||||
- name: 'Release'
|
- name: 'Release'
|
||||||
shell: bash
|
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'
|
- name: 'Upload Artifact'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
@ -19,7 +19,7 @@ function(INIT_TACTILITY_GLOBALS SDKCONFIG_FILE)
|
|||||||
set(id_length 0)
|
set(id_length 0)
|
||||||
math(EXPR id_length "${sdkconfig_board_id_length} - 21")
|
math(EXPR id_length "${sdkconfig_board_id_length} - 21")
|
||||||
string(SUBSTRING ${sdkconfig_board_id} 20 ${id_length} board_id)
|
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")
|
if (board_id STREQUAL "cyd-2432s024c")
|
||||||
set(TACTILITY_BOARD_PROJECT CYD-2432S024C)
|
set(TACTILITY_BOARD_PROJECT CYD-2432S024C)
|
||||||
@ -62,7 +62,7 @@ function(INIT_TACTILITY_GLOBALS SDKCONFIG_FILE)
|
|||||||
if (TACTILITY_BOARD_PROJECT STREQUAL "")
|
if (TACTILITY_BOARD_PROJECT STREQUAL "")
|
||||||
message(FATAL_ERROR "No subproject mapped to \"${TACTILITY_BOARD_ID}\" in root Buildscripts/board.cmake")
|
message(FATAL_ERROR "No subproject mapped to \"${TACTILITY_BOARD_ID}\" in root Buildscripts/board.cmake")
|
||||||
else ()
|
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_PROJECT ${TACTILITY_BOARD_PROJECT})
|
||||||
set_property(GLOBAL PROPERTY TACTILITY_BOARD_ID ${board_id})
|
set_property(GLOBAL PROPERTY TACTILITY_BOARD_ID ${board_id})
|
||||||
endif ()
|
endif ()
|
||||||
|
|||||||
@ -27,12 +27,13 @@ fi
|
|||||||
|
|
||||||
echoNewPhase "Cleaning build folder"
|
echoNewPhase "Cleaning build folder"
|
||||||
|
|
||||||
rm -rf build
|
#rm -rf build
|
||||||
|
|
||||||
echoNewPhase "Building $sdkconfig_file"
|
echoNewPhase "Building $sdkconfig_file"
|
||||||
|
|
||||||
cp $sdkconfig_file sdkconfig
|
cp $sdkconfig_file sdkconfig
|
||||||
if not idf.py build; then
|
idf.py build
|
||||||
|
if [[ $? != 0 ]]; then
|
||||||
fatalError "Failed to build esp32s3 SDK"
|
fatalError "Failed to build esp32s3 SDK"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@ file(READ version.txt TACTILITY_VERSION)
|
|||||||
add_compile_definitions(TT_VERSION="${TACTILITY_VERSION}")
|
add_compile_definitions(TT_VERSION="${TACTILITY_VERSION}")
|
||||||
|
|
||||||
if (DEFINED ENV{ESP_IDF_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($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
|
|
||||||
include("Buildscripts/board.cmake")
|
include("Buildscripts/board.cmake")
|
||||||
|
|||||||
22
Documentation/releasing.md
Normal file
22
Documentation/releasing.md
Normal file
@ -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)
|
||||||
@ -217,7 +217,7 @@ def sdk_download(version, platform):
|
|||||||
print(f"Downloading SDK version {version} for {platform}")
|
print(f"Downloading SDK version {version} for {platform}")
|
||||||
if download_file(sdk_url, filepath):
|
if download_file(sdk_url, filepath):
|
||||||
with zipfile.ZipFile(filepath, "r") as zip_ref:
|
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
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user