Skip to content

Using most IDF Managed Components instead of git-clone #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Nov 9, 2023

Conversation

SuGlider
Copy link
Contributor

@SuGlider SuGlider commented Nov 6, 2023

This PR makes 2 main changes:
1- Fixes CMakeFiles and the build.sh + copy-libs.sh to work with WSL Ubuntu
2- Removes RainMaker and other git-cloned component in order to use them from the Managed Components Registry.

This change demands that Arduino Repository also change in orde to reflect the use of Managed Components.
espressif/arduino-esp32#8842

Removes RainMaker and replaces "all" to get it working with WSL Ubuntu
Moving SR files copy from tools/copy-libs.sh to /build.sh :: WSL fix
Commenting out all cloned components that are now part of the Managed Components.
Lib builder Managed Components for the top level (not in Arduino as IDF Component level). Includes only Tensor Flow and Deep Learning.
All other managed component will be added to ESP32-Arduino repository.
@SuGlider SuGlider added the enhancement New feature or request label Nov 6, 2023
@SuGlider SuGlider requested a review from me-no-dev November 6, 2023 21:01
@SuGlider SuGlider self-assigned this Nov 6, 2023
@@ -187,6 +187,19 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$idf_libs_configs" idf_libs
if [ $? -ne 0 ]; then exit 1; fi

if [ "$target" == "esp32s3" ]; then
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$idf_libs_configs" srmodels_bin
Copy link
Contributor Author

@SuGlider SuGlider Nov 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@me-no-dev - It sounds like CI is failing here... It works in my computer, though! :-)

https://github.com/espressif/esp32-arduino-lib-builder/actions/runs/6776484660/job/18438277663?pr=145

-- Build files have been written to: /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/build
ninja: error: unknown target 'srmodels_bin'
ninja failed with exit code 1, output of the command is in the /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/build/log/idf_py_stderr_output_20115 and /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/build/log/idf_py_stdout_output_20115
Error: Process completed with exit code 1.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not nice. We need a proper workaround

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try to figure out a way to fix CI.

Copy link
Contributor Author

@SuGlider SuGlider Nov 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@me-no-dev - I found out what is the issue here.
In order to add SR component to the CI here (current PR), I need that the PR #8842 is merged, because it adds SR to the Arduino yml file.
After SR is listed in the managed components(from Arduino side), it will run CI corretly here at Lib Builder CI.

As a way to test it, I've added SR to the local Lib Bulder yml file in a "testing" commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it shows an Arduino esp32-hal-sr.c error:

-c /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/components/arduino/libraries/ESP_SR/src/esp32-hal-sr.c
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/components/arduino/libraries/ESP_SR/src/esp32-hal-sr.c:10:2: warning: #warning Compatible partition must be selected for ESP_SR to work [-Wcpp]
10 | #warning Compatible partition must be selected for ESP_SR to work
| ^~~~~~~
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/components/arduino/libraries/ESP_SR/src/esp32-hal-sr.c:27:10: fatal error: esp_mn_speech_commands.h: No such file or directory
27 | #include "esp_mn_speech_commands.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My suggestion is that we merge Arduino espressif/arduino-esp32#8842 and then check how CI will work here at Lib Builder.

Copy link
Contributor Author

@SuGlider SuGlider Nov 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/espressif/arduino-esp32/actions/runs/6800936891/job/18490657761?pr=8842

Specific CI for the S3 is passing fine in the Arduino PR #8842
It shall run fine here as well.

Eveidence from the CI:
[1237/1323] Building CXX object esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/libraries/ESP_SR/src/ESP_SR.cpp.obj
With no error.

@SuGlider
Copy link
Contributor Author

SuGlider commented Nov 8, 2023

@me-no-dev - This is the 1st output of the PACMAN when using the lastest change (it gets the Camera from GH, latest commit)

Processing 23 dependencies:
[1/23] chmorgan/esp-libhelix-mp3 (1.0.3)
[2/23] espressif/cbor (0.6.0~1)
[3/23] espressif/esp-dl (*)
[4/23] espressif/esp-dsp (1.4.8)
[5/23] espressif/esp-nn (1.0.2)
[6/23] espressif/esp-sr (1.5.0)
[7/23] espressif/esp-tflite-micro (1.2.0)
[8/23] espressif/esp32-camera (2.0.5)
[9/23] espressif/esp32-camera (efe711df9a348c56e56e5d7b8961836d94a0f9c1)
[10/23] espressif/esp_diag_data_store (1.0.1)
[11/23] espressif/esp_diagnostics (1.0.1)
[12/23] espressif/esp_insights (1.0.1)
[13/23] espressif/esp_rainmaker (1.0.0)
[14/23] espressif/esp_schedule (1.0.1)
[15/23] espressif/esp_secure_cert_mgr (2.4.0)
[16/23] espressif/jsmn (1.1.0)
[17/23] espressif/json_generator (1.1.1)
[18/23] espressif/json_parser (1.0.3)
[19/23] espressif/mdns (1.2.2)
[20/23] espressif/qrcode (0.1.0~1)
[21/23] espressif/rmaker_common (1.4.3)
[22/23] idf (5.1.1)
[23/23] joltwallet/littlefs (1.10.2)

And after it has updated the components for the first time, it displays Camera just as the latest commit from GH:

-- Building ESP-IDF components for target esp32s3
Processing 22 dependencies:
[1/22] chmorgan/esp-libhelix-mp3 (1.0.3)
[2/22] espressif/cbor (0.6.0~1)
[3/22] espressif/esp-dl (*)
[4/22] espressif/esp-dsp (1.4.8)
[5/22] espressif/esp-nn (1.0.2)
[6/22] espressif/esp-sr (1.5.0)
[7/22] espressif/esp-tflite-micro (1.2.0)
[8/22] espressif/esp32-camera (efe711df9a348c56e56e5d7b8961836d94a0f9c1)
[9/22] espressif/esp_diag_data_store (1.0.1)
[10/22] espressif/esp_diagnostics (1.0.1)
[11/22] espressif/esp_insights (1.0.1)
[12/22] espressif/esp_rainmaker (1.0.0)
[13/22] espressif/esp_schedule (1.0.1)
[14/22] espressif/esp_secure_cert_mgr (2.4.0)
[15/22] espressif/jsmn (1.1.0)
[16/22] espressif/json_generator (1.1.1)
[17/22] espressif/json_parser (1.0.3)
[18/22] espressif/mdns (1.2.2)
[19/22] espressif/qrcode (0.1.0~1)
[20/22] espressif/rmaker_common (1.4.3)
[21/22] idf (5.1.1)
[22/22] joltwallet/littlefs (1.10.2)

require: public
rules:
- if: "target in [esp32s3]"
espressif/esp-sr:
Copy link
Contributor Author

@SuGlider SuGlider Nov 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This component (esp-sr) is already in Arduino component list from PR #8842.
As soon as the #8842 is merged, I'll remove it and make it run CI again.

@me-no-dev me-no-dev merged commit 752365b into espressif:master Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

2 participants