PlatformIO Community

Pio CI and pio run

I am trying to implement CI pipeline in Github actions
File Structure:

| include
| - myenum.h
| - myerror.h
| - mycontroller
| - - mycontroller.h
| - - mycontroller2.h

| src
| - main.cpp
| - mycontroller
| - - mycontroller.cpp
| - - mycontroller2.cpp

| test
| - test_mytest
| - - mytest.cpp
| - - mytest.h

When I run pio run in my local desktop. it complies without error. In my same desktop, when I run pio ci --project-conf=platformio.ini src/* -l include/* it fails

my platformio.ini file is

platform = atmelavr
board = uno
framework = arduino
build_flags = -I include/
test_build_src = yes

For my github actions I am using pio ci command. I need to test the same code for different boards and in documentation it is said if we have pio ci it will be ease to compile for different boards. I don’t want to change my github actions yaml file for each board update that I make. How could I implement or oraginse my file structure solve this issue?

I don’t see -I being a valid option for pio ci – the include flag should already be handled when you include the project configuration.

What’s the error then?

Thanks!! @maxgerhardt.

The command uses -l or --lib
Now I tried to change the command as this and it works fine.

pio ci --project-conf=platformio.ini src/main.cpp -l "."

But I am trying to build the project a bit more extensive. I am worried how to use the pio ci command in next steps.