I recently get an error from my ci pipeline in github.
The message is
*** missing SConscript file 'custom_hwids.py'
File "/opt/hostedtoolcache/Python/3.12.1/x64/lib/python3.12/site-packages/platformio/builder/main.py", line 167, in <module>
========================= [FAILED] Took 24.37 seconds =========================
Error: Process completed with exit code 1.
it is started with run: platformio ci --lib="." --project-conf=examples/knx-usb/platformio-ci.ini examples/knx-usb/src/main.cpp
I have this line in my plattformio.ini extra_scripts = pre:custom_hwids.py
and this file is in the projects root side-by-side to the ini.
Here is a link to the repo:
when I build it locally, everything is fine.
Until some weeks ago, this worked also on github actions, but suddently (without a change in my repo) not anymore.
I tried to move the custom_hwids.py’ into a “shared” folder but that has no effect…
I also tried to use this path but:
*** missing SConscript file 'examples/knx-usb/custom_hwids.py'
File "/opt/hostedtoolcache/Python/3.12.1/x64/lib/python3.12/site-packages/platformio/builder/main.py", line 167, in <module>
========================= [FAILED] Took 25.58 seconds =========================
Error: Process completed with exit code 1.
Hm, with pio ci you basically create a new temporary project, in your case with a copied platformio.ini and copied main.cpp. Everything else is not copied. That means that temporary project really has no custom_hwids.py in it. But, if you say it worked a few days ago, maybe it’s a regression or behavior change in the PlatformIO core… (https://github.com/platformio/platformio-core)
Easiest way would be to change pio ci to pio run -d <example project path>, then everything will stay in-place. I don’t actually see a way of copying arbitrary files to the root of the new temp project with the pio ci command.
This would have been something that would need to be added in the PIO core, aka, the place where the potentially missing SCons script is called, in the constructor of the SConsScript object… not externally changeable.
I’m pretty sure my workflow YAML is correct but one of the projects won’t build properly when using the regular platformio.ini, the github page is either private or deleted for the FlashStorage library: