Skip to content

Commit

Permalink
Release/v5.1 (#115)
Browse files Browse the repository at this point in the history
* Rework the lib-builder for ESP-IDF v5.1

* Update package json with tolls matching the ESP-IDF version

* fix: rainmaker examples crashing on s3 due to low stack memory. (#106) (#107)

* Update scripts with the latest requirements

* Update configs + SR Support

* Add esp-elf-gdp to the list of packages

* Fix RainMaker builds and new sr models path

* Temporary force arduino branch for CI to work

* fix target branch

* Delete esp-dl component manifest for requiring IDF 4.4.x

* Temporary changes to allow Cron CI to run

* Support builds based on ESP-IDF tag

* Push to esp32-arduino-libs

* Update repository_dispatch.sh

* Rework scripts to allow build when either dst needs it

* Github complains when pushing to the libs repo

* Authenticate to the libs repo

* Attempt at splitting SDK from Arduino

* Archive only the result and reorder deploy commands

* Update cron.sh

* Fix script and zip paths

* Fix download URL and json merger

* Change sdk folder structure and fix json generation

* Switch output folder from sdk to esp32-arduino-libs

* arduino_tinyusb: compile support for DFU mode (#116)

* Update PlatformIO build script templates (#118)

Adds support for new package with precompiled SDK libraries

* Autogenerate PlatformIO manifest file for prebuilt SDK libs (#119)

* Autogenerate PlatformIO manifest file for prebuilt SDK libs

- Add a special Python script that generates "package.json" with IDF revision from the "version.txt" according to SemVer

* Tidy up

* Refactor manifest generator

Now IDF version and commit hash are passed directly from Git client instead of reading from a pregenerated "version.txt" file

* Move IDF definitions to be available with any build

* Use more components from registry and add mp3 decoder

* esp-sr component requires clearing before each build

* revert ESP_SR from component manager

* Build ESP_SR only for ESP32-S3 for now

* [TinyUSB] Update esp32sx dcd and add dwc2 option

* Workaround for recent change in ESP-Insights

* Add initial support for ESP32-C6

* Run build tests on ESP32-C6

* Remove -mlongcalls for non-xtensa chips

* Temp fix for ESP-Insights on C6

* Add support for ESP32H2

* Added tflite-micro component (#128)

* Update build badge in README.md

* Added tflite-micro component

---------

Co-authored-by: Me No Dev <[email protected]>

* Make cron rebuild the libs if they need to be pushed to Arduino

For when we change something in the lib-builder, but no new updates are available in ESP-IDF

* Update build actions

* Fix permissions

* Do not build for obsolete Flash modes

* Try separate detect for cron builds

* Add permissions to github api

* Try more basic commit detection

* another try to pass vars and get commit

* Update push.yml

* Update config.sh

* Enable builds again

* Update build.sh

* Combine the artifacts from all jobs

* fix and test deploy check

* Update push.yml

* Disable Memprot to allow loading external elfs

* Fix archive name

* Disable coredump to flash

* Enable SPI ETH KSZ8851SNL

* Add temporary support for Arduino SPI Ethernet

* Add a temporary fix for relative include in BT lib

* Enable Classic BT HID Host and Device for ESP32

* Revert "Enable Classic BT HID Host and Device for ESP32"

This reverts commit aa0040a.

* C6 was added to ESP-SR

* Update Ethernet and remove SR workaround

* Pin RainMaker version

* Update target branch

* Add back cron.sh

---------

Co-authored-by: Sanket Wadekar <[email protected]>
Co-authored-by: Luca Burelli <[email protected]>
Co-authored-by: Valerii Koval <[email protected]>
  • Loading branch information
4 people authored Oct 5, 2023
1 parent 45a4845 commit 4ef80a8
Show file tree
Hide file tree
Showing 43 changed files with 3,960 additions and 410 deletions.
102 changes: 99 additions & 3 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
# * * * * *
- cron: '0 */6 * * *'

defaults:
run:
shell: bash

jobs:
run:
name: Build with IDF ${{ matrix.idf_branch }}
Expand All @@ -22,7 +26,7 @@ jobs:
matrix:
idf_branch: [release/v5.1, release/v4.4] #, release/v3.3]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Install dependencies
run: bash ./tools/prepare-ci.sh
- name: Build
Expand All @@ -31,9 +35,101 @@ jobs:
GIT_AUTHOR_EMAIL: ${{ secrets.PUSH_EMAIL }}
GIT_COMMITTER_EMAIL: ${{ secrets.PUSH_EMAIL }}
IDF_BRANCH: ${{ matrix.idf_branch }}
run: bash ./tools/cron.sh
run: |
git checkout ${{ matrix.idf_branch }}
bash ./tools/cron.sh
- name: Upload archive
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: artifacts
path: dist


# check:
# name: Check if result should be deployed
# runs-on: ubuntu-latest
# strategy:
# matrix:
# branch: [release/v5.1, release/v4.4] #, release/v3.3]
# outputs:
# idf_branch: ${{ steps.check.outputs.idf_branch }}
# idf_commit: ${{ steps.check.outputs.idf_commit }}
# ar_branch: ${{ steps.check.outputs.ar_branch }}
# ar_new_commit_message: ${{ steps.check.outputs.ar_new_commit_message }}
# ar_new_branch_name: ${{ steps.check.outputs.ar_new_branch_name }}
# ar_new_pr_title: ${{ steps.check.outputs.ar_new_pr_title }}
# ar_has_commit: ${{ steps.check.outputs.ar_has_commit }}
# ar_has_branch: ${{ steps.check.outputs.ar_has_branch }}
# ar_has_pr: ${{ steps.check.outputs.ar_has_pr }}
# libs_version: ${{ steps.check.outputs.libs_version }}
# libs_has_commit: ${{ steps.check.outputs.libs_has_commit }}
# libs_has_branch: ${{ steps.check.outputs.libs_has_branch }}
# steps:
# - uses: actions/checkout@v3
# - id: check
# env:
# GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
# GIT_AUTHOR_EMAIL: ${{ secrets.PUSH_EMAIL }}
# GIT_COMMITTER_EMAIL: ${{ secrets.PUSH_EMAIL }}
# IDF_BRANCH: ${{ matrix.idf_branch }}
# run: bash ./tools/check-deploy-needed.sh

# build:
# name: Build Libs for ${{ matrix.target }}
# runs-on: ubuntu-latest
# needs: check
# if: needs.check.outputs.libs_has_commit == '0' || needs.check.outputs.ar_has_commit == '0'
# strategy:
# matrix:
# target: [esp32, esp32s2, esp32s3, esp32c3, esp32c6, esp32h2]
# fail-fast: false
# steps:
# - uses: actions/checkout@v3
# # - name: Install dependencies
# # run: bash ./tools/prepare-ci.sh
# - shell: bash
# name: Build Libs for ${{ matrix.target }}
# run: echo ${{ matrix.target }}
# # run: bash ./build.sh -t ${{ matrix.target }}
# # - name: Upload archive
# # uses: actions/upload-artifact@v3
# # with:
# # name: artifacts
# # path: dist

# deploy:
# name: Deploy build
# runs-on: ubuntu-latest
# needs: [check, build]
# steps:
# - uses: actions/checkout@v3
# - shell: bash
# env:
# GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
# GIT_AUTHOR_EMAIL: ${{ secrets.PUSH_EMAIL }}
# GIT_COMMITTER_EMAIL: ${{ secrets.PUSH_EMAIL }}
# IDF_BRANCH: ${{ needs.check.outputs.idf_branch }}
# IDF_COMMIT: ${{ needs.check.outputs.idf_commit }}
# AR_BRANCH: ${{ needs.check.outputs.ar_branch }}
# AR_NEW_COMMIT_MESSAGE: ${{ needs.check.outputs.ar_new_commit_message }}
# AR_NEW_BRANCH_NAME: ${{ needs.check.outputs.ar_new_branch_name }}
# AR_NEW_PR_TITLE: ${{ needs.check.outputs.ar_new_pr_title }}
# AR_HAS_COMMIT: ${{ needs.check.outputs.ar_has_commit }}
# AR_HAS_BRANCH: ${{ needs.check.outputs.ar_has_branch }}
# AR_HAS_PR: ${{ needs.check.outputs.ar_has_pr }}
# LIBS_VERSION: ${{ needs.check.outputs.libs_version }}
# LIBS_HAS_COMMIT: ${{ needs.check.outputs.libs_has_commit }}
# LIBS_HAS_BRANCH: ${{ needs.check.outputs.libs_has_branch }}
# run: |
# echo "IDF_COMMIT: $IDF_COMMIT"
# echo "AR_BRANCH: $AR_BRANCH"
# echo "AR_NEW_COMMIT_MESSAGE: $AR_NEW_COMMIT_MESSAGE"
# echo "AR_NEW_BRANCH_NAME: $AR_NEW_BRANCH_NAME"
# echo "AR_NEW_PR_TITLE: $AR_NEW_PR_TITLE"
# echo "AR_HAS_COMMIT: $AR_HAS_COMMIT"
# echo "AR_HAS_BRANCH: $AR_HAS_BRANCH"
# echo "AR_HAS_PR: $AR_HAS_PR"
# echo "LIBS_VERSION: $LIBS_VERSION"
# echo "LIBS_HAS_COMMIT: $LIBS_HAS_COMMIT"
# echo "LIBS_HAS_BRANCH: $LIBS_HAS_BRANCH"

37 changes: 33 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,50 @@ concurrency:
cancel-in-progress: true

jobs:

build-libs:
name: Build Libs for ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
matrix:
target: [esp32, esp32s2, esp32s3, esp32c3]
target: [esp32, esp32s2, esp32s3, esp32c3, esp32c6, esp32h2]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: bash ./tools/prepare-ci.sh
- name: Build Libs for ${{ matrix.target }}
run: bash ./build.sh -t ${{ matrix.target }}
run: bash ./build.sh -e -t ${{ matrix.target }}
- name: Upload archive
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: artifacts-${{ matrix.target }}
name: artifacts
path: dist

combine-artifacts:
name: Combine artifacts
needs: build-libs
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: artifacts
path: dist
- shell: bash
run: |
mkdir -p out
find dist -name 'arduino-esp32-libs-esp*.tar.gz' -exec tar zxvf {} -C out \;
cd out/tools/esp32-arduino-libs && tar zcf ../../../dist/esp32-arduino-libs.tar.gz * && cd ../../..
cp out/package_esp32_index.template.json dist/package_esp32_index.template.json
- name: Upload full esp32-arduino-libs archive
uses: actions/upload-artifact@v3
with:
name: esp32-arduino-libs
path: dist/esp32-arduino-libs.tar.gz
- name: Upload package_esp32_index.template.json
uses: actions/upload-artifact@v3
with:
name: package-esp32-index-json
path: dist/package_esp32_index.template.json

4 changes: 2 additions & 2 deletions .github/workflows/repository_dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: Dispatch Event
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Install dependencies
run: bash ./tools/prepare-ci.sh
- name: Handle Event
Expand All @@ -17,7 +17,7 @@ jobs:
GIT_COMMITTER_EMAIL: ${{ secrets.PUSH_EMAIL }}
run: bash ./tools/repository_dispatch.sh
- name: Upload archive
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: artifacts
path: dist
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ components/esp-rainmaker/
components/espressif__esp-dsp/
components/esp-insights/
components/arduino_tinyusb/tinyusb/
components/tflite-micro/
esp-idf/
out/
build/
Expand All @@ -19,3 +20,5 @@ sdkconfig
sdkconfig.old
version.txt
dependencies.lock
managed_components/
target/
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
cmake_minimum_required(VERSION 3.5)

set(RMAKER_PATH ${CMAKE_SOURCE_DIR}/components/esp-rainmaker)
set(EXTRA_COMPONENT_DIRS ${RMAKER_PATH}/components/esp-insights/components ${RMAKER_PATH}/components ${CMAKE_SOURCE_DIR}/components/esp-insights/components)
set(INSIGHTS_PATH ${RMAKER_PATH}/components/esp-insights)
set(TFLITE_PATH ${CMAKE_SOURCE_DIR}/components/tflite-micro)

set(EXTRA_COMPONENT_DIRS ${INSIGHTS_PATH}/components ${RMAKER_PATH}/components ${TFLITE_PATH}/components)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(arduino-lib-builder)
Expand All @@ -13,7 +16,7 @@ idf_build_get_property(elf EXECUTABLE GENERATOR_EXPRESSION)
add_custom_command(
OUTPUT "idf_libs"
COMMAND ${CMAKE_SOURCE_DIR}/tools/copy-libs.sh ${IDF_TARGET} "${CONFIG_LIB_BUILDER_FLASHMODE}" "${CONFIG_SPIRAM_MODE_OCT}" "${CONFIG_IDF_TARGET_ARCH_XTENSA}"
DEPENDS ${elf}
DEPENDS all
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
VERBATIM
)
Expand Down
Loading

0 comments on commit 4ef80a8

Please sign in to comment.