PlatformIO Community

Gitlab CI with local Librarie

Hello Guys,

I’m trying to create my project with the GitLab runners. But unfortunately he does not find my local libraries.

This ist my platformio.ini:

[env:esp12e]
platform = espressif8266
board = esp12e
framework = arduino

lib_deps = WiFiManager
           PubSubClient
           ArduinoJson

And this is my .gitlab-ci.yml:

image: python:2.7
stages:
 - build
build:
  stage: build
  script: 
    - pip install -U platformio
    - pio run
  variables: 
    PLATFORMIO_CI_SRC: "$CI_PROJECT_DIR/src/" 
    PLATFORMIO_LIB_DIR: "$CI_PROJECT_DIR/lib/"

This is my error:

src/main.cpp:7:17: fatal error: DHT.h: No such file or directory

#include <DHT.h>

The DHT.h is in the lib/DHT/DHT.h(and the .cpp file) folder.

I hope you can help me.

Why you don’t include DHT in platformio.ini and its lib_deps?