Using sonarcloud together with ESP-IDF

i am new to SonarCloud, and i was taking the Free Version and let it run against the 2 Sample Repositories:

Works quite well.

Now i wanted to continue the Experience.
i wanted to check

it comes already with a main.yml File, and i understand that i must update the *.yml File to match the SonarCloud Example.

my try is here:

and, yes, it does not work.
i am getting an Error, see below.

my guess is, that the Call

cmake -S . -B build

is the core of the Problem.
i need to invoke SonarCloud same way as the ESP-IDF Build …

./ build

but how …
if somebody can help you are welcome.

and: i know, it is just work, so if Moeny or Beer is a Problem, i am willing to offer some Compensation. :slight_smile:


Run mkdir build
CMake Error at CMakeLists.txt:9 (string):
  string no output variable specified

CMake Error at CMakeLists.txt:13 (string):
  string begin index: 9 is out of range 0 - 0

CMake Error at CMakeLists.txt:14 (string):
  string sub-command STRIP requires two arguments.

CMake Error at CMakeLists.txt:15 (string):
  string no output variable specified

silence:0 sdkconfig:/home/runner/work/esp-at/esp-at/module_config/module__default/sdkconfig.defaults
CMake Error at CMakeLists.txt:53 (include):
  include could not find requested file:


-- /home/runner/work/esp-at/esp-at/esp-idf
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:80 (add_dependencies):
  Cannot add target-level dependencies to non-existent target "flash".

  The add_dependencies works for top-level logical targets created by the
  add_executable, add_library, or add_custom_target commands.  If you want to
-- Configuring incomplete, errors occurred!
  add file-level dependencies see the DEPENDS option of the add_custom_target
See also "/home/runner/work/esp-at/esp-at/build/CMakeFiles/CMakeOutput.log".
  and add_custom_command commands.

Error: Process completed with exit code 1.

Hey there.

All you need to do is wrap the ./ build command, while keeping the rest of the compile step in tact. Here’s an example based on the project you provided with the resulting SonarCloud results


hey, VERY cool. I am totally wondering how one can fix this sooo fast.
Thanks a lot …
i owe you some Beer …

1 Like

Thanks for the Excellent Support:

I try the Next project.

i followed your Guides, and
i wrapped build


build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} build 

seems to run, but then i get this Error:

INFO: ------------------------------------------------------------------------
INFO: ------------------------------------------------------------------------
INFO: Total time: 42.180s
ERROR: Error during SonarScanner execution
INFO: Final Memory: 31M/104M
java.lang.IllegalStateException: java.nio.file.NoSuchFileException: /home/runner/work/cci_EasyExample/cci_EasyExample/build_wrapper_output_directory/build-wrapper-dump.json
INFO: ------------------------------------------------------------------------

what did i wrong this time ?


error away; now i must check if all runs perfect on the sonar side.

cd $PROJECT_PATH/.github/workflows 

is confilicting with the build_wrapper_output_directory

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.