Adding library and Travis CI?

Hello,

I am trying to add my library WakeOnLan to PlatfomIO library manager. I have already issued this command few days ago:

platformio lib register https://raw.githubusercontent.com/a7md0/WakeOnLan/master/library.json

Is there anything else I have to do? And how long does it require to be added?


Second question ( Sorry if this wrong place to discuss it )
I am trying to add Travis CI build status to my library, I already wrote platformio.ini + .travis.yml files. Unfortunately when Travis CI start the build I receive these errors:

undefined reference to setup

undefined reference to loop

I already know that ESP32 + ESP8266 require setup() + loop() in the source files, but this is library which means they cannot be added here. Is there something I am missing?

Usually takes about 24 hours… And it looks like it’s up… PlatformIO Registry

Docs say to use the --lib parameter if it’s a library… but I’m not familiar with that usage, so not sure what else you need to do…

1 Like

Actually I looked multiple times and I did not find the library, now I see it :smiley:

For reference I was able to solve the Travis CI build status. In the beginning, I was setting PLATFORMIO_CI_SRC to the src directory of the library. And script was like this
platformio ci --lib=“.” --board=esp32dev --board=nodemcuv2

To solve the problem I changed PLATFORMIO_CI_SRC to the examples directory only, now the build status is changed to passed. ( The examples call the library, and if library build fail the example will fail too ).

My .travis.yml file

1 Like

Excellent! :slight_smile: I might steal… er… borrow that file, as I’m thinking I should get around to updating the travis CI job a library I maintain is currently using… either by updating to the current Arduino IDE, or moving it over to platformio since it has CI support baked in…

btw, you might want to put the example sketches in subfolders with the same name… Arduino IDE expects .ino files to be in a folder of the same name… annoying, but there it is (unless they’ve loosened up on that requirement recently?)

Actually I didn’t know about the Arduino requirements of examples locations. I have moved each sketch into sub folder, thanks for your note.

1 Like