I was trying to implement CI to ensure the component compiles for the various versions of ESP-IDF.
The problem is that the project is not set up in a way that allows for this:
ESP-IDF components should be in a subfolder (commonly main/, but it could also be M5GFX/). Without this, any attempt to compile the component with idf.py build leads to this error:
Called idf_component_register from a non-component directory.
To allow for idf.py build to work independently in this project, these steps are required:
[ ] Add a subfolder for this component (main/ or M5GFX/), move relevant files into this folder and add a CMakeLists.txt
[ ] Add include($ENV{IDF_PATH}/tools/cmake/project.cmake) to the root CMakeLists.txt
Considering that moving source files has a big impact on your currently unmerged branches, I figured I'd open this issue to discuss the proposed changes.
Hello, @KenVanHoeylandt
Sorry, it's my lack of understanding and I don't quite understand what you're asking.
Are you saying you want the main source code of the library to be in main instead of src?
I was trying to implement CI to ensure the component compiles for the various versions of ESP-IDF.
The problem is that the project is not set up in a way that allows for this: ESP-IDF components should be in a subfolder (commonly
main/
, but it could also beM5GFX/
). Without this, any attempt to compile the component withidf.py build
leads to this error:Reference build: https://github.com/KenVanHoeylandt/M5GFX/actions/runs/8222729252/job/22484559726
.github/workflows/build.yml example:
To allow for
idf.py build
to work independently in this project, these steps are required:main/
orM5GFX/
), move relevant files into this folder and add aCMakeLists.txt
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
to the rootCMakeLists.txt
Considering that moving source files has a big impact on your currently unmerged branches, I figured I'd open this issue to discuss the proposed changes.