There appears to be a bug with how includes are handled depending on which framework is selected when running CI commands. I am trying to setup my ant-arduino library for CI running mbed/zephyr/espidf etc. I know the code doesn’t build for those platforms but when running CI it can’t seem to find the project headers but when I build with arduino it finds the headers fine.
For example (on my develop branch)
export PLATFORMIO_CI_SRC=examples/Arduino/AntVersion/AntVersion.ino
platformio ci --lib="." --board=teensy31 --project-option='framework=arduino'
But the following fails
export PLATFORMIO_CI_SRC=examples/mbed/AntVersion/AntVersion.cpp
platformio ci --lib="." --board=teensy31 --project-option='framework=mbed'
Fails with
src/AntVersion.cpp:10:10: fatal error: ANT.h: No such file or directory
*************************************************************
* Looking for ANT.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:ANT.h"
* Web > https://platformio.org/lib/search?query=header:ANT.h
*
*************************************************************
#include "ANT.h"
^~~~~~~
compilation terminated.
*** [.pio/build/teensy31/src/AntVersion.o] Error 1
The header paths shouldn’t be affected by changing the framework, this is not limited to mbed
Also the extra args env var appears to be ignored when switching framework
e.g.
export PLATFORMIO_CI_EXTRA_ARGS="--project-option='framework=mbed'"
Will still run the CI command with arduino