Hi.
First time here. I’m working on a project that needs to integrate Continuous Integration (CI) and we are using PlatformIO on the desktop until now. Now we need to implement CI. We are using Gitlab for the CI. The yml file used is lsted below:
image: python:3.11
# Change cache directories to be inside the project directory since GitLab can only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PLATFORMIO_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pio"
#PROJECT_BUILD_DIR: "./bin"
cache:
paths:
- .cache/pip
- .cache/pio
stages:
- build
# - deploy
# - release
build_job:
stage: build
script:
- pio ci --board=esp32dev --keep-build-dir
variables:
{PLATFORMIO_CI_SRC: "./src/main.cpp"}
artifacts:
paths:
- /bin
before_script:
- "pip install -U platformio"
>
The end of the output is listed below:
Linking .pio/build/esp32dev/firmware.elf
Retrieving maximum program size .pio/build/esp32dev/firmware.elf
Checking size .pio/build/esp32dev/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 6.6% (used 21464 bytes from 327680 bytes)
Flash: [== ] 20.4% (used 266985 bytes from 1310720 bytes)
Building .pio/build/esp32dev/firmware.bin
esptool.py v4.5.1
Creating esp32 image...
Merged 2 ELF sections
Successfully created esp32 image.
========================= [SUCCESS] Took 12.65 seconds =========================
Saving cache for successful job
00:13
Creating cache default-protected...
.cache/pip: found 451 matching artifact files and directories
.cache/pio: found 22 matching artifact files and directories
Uploading cache.zip to https://storage.googleapis.com/gitlab-com-runners-cache/project/70293950/default-protected
Created cache
Uploading artifacts for successful job
00:02
Uploading artifacts...
./bin: found 2 matching artifact files and directories
Uploading artifacts as "archive" to coordinator... 201 Created id=10245380078 responseStatus=201 Created token=67_nG1FqN
Cleaning up project directory and file based variables
00:01
Job succeeded
It seems like the artifacts were copied to the “bin” folder, but it is empty. Any comments or suggestions?