Gitlab and custom partitions

Hi, I’m trying to setup CI on GitLab for a platformio project.
While the compilation seems to go through, PlatformIO fails because it can’t find the csv with the partition table which is there.

This is the project structure:
- platformio.ini
- .gitlab-ci.yml
- mypartitions.csv
- src/mymain.cpp

platformio.ini:
[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
lib_deps =
[…]
build_flags =
[…]
board_build.partitions = mypartitions.csv

.gitlab-ci.yml
image: python:2.
stages:
- test
before_script:
- “pip install -U platformio”
job:
stage: test
script: “platformio ci -C platformio.ini”
variables:
PLATFORMIO_CI_SRC: “src/mymain.cpp”

Build error:
Compiling .pioenvs/esp32doit-devkit-v1/src/mymain.cpp.o
*** [.pioenvs/esp32doit-devkit-v1/partitions.bin] Source src/mypartitions.csv' not found, needed by target.pioenvs/esp32doit-devkit-v1/partitions.bin’.
========================== [ERROR] Took 31.62 seconds ==========================
ERROR: Job failed: exit code 1

I’ve created an example project that recreates the issue.
Here’s the failing pipeline
Here’s the code

I’m not going to say this is the best way to solve this, but it will make the project build. Hopefully someone with more experience with CI with platformio can give some pointers here…

I basically moved the mypartitions.csv into the “/src” folder, and then added another “source” reference to the command line… it wouldn’t include it unless it was in the src folder… silly CI!

1 Like

Thanks a lot @pfeerick, your workaround fixed it.
I think this is a but in PlatformIO though, hopefully a higher power will read this thread :slight_smile:

1 Like