Arduino-CI / action

GitHub action to run Arduino CI
16 stars 3 forks source link

Arduino Serial and SD libraries not available #17

Closed feilipu closed 3 years ago

feilipu commented 3 years ago

https://github.com/feilipu/Arduino_FreeRTOS_Library/runs/1699847183?check_suite_focus=true#step:4:114 https://github.com/feilipu/Arduino_FreeRTOS_Library/runs/1699847183?check_suite_focus=true#step:4:337

Neither the Serial.h or SD.h libraries are available so basic tests fail.

Perhaps it would be better to provide an option to disable all examples testing? That would allow the library build to pass, in the face of missing inclusions?

ianfixes commented 3 years ago

In this case, the conclusions of the CI are correct; although your library.properties specifies architectures=avr, the trinket does not implement a serial port. Your example code does not account for this.

Your options here would be to use preprocessor directives that enable SoftwareSerial when hardware serial support is not available, or specifically configure arduino_ci not to attempt compilation on those platforms by using these .arduino_ci.yml contents:

compile:
  platforms:
    - uno
    - leonardo
    - mega2560
    - cplayClassic

This could go either in the root directory of your library (if it applies to all examples) or individually in the examples that need it.

feilipu commented 3 years ago

Ok, I've spent more than an hour trying to get this right, and (since TBH I've got no idea about what I'm doing) I'm never going to get this right.

If you could please provide a PR that completes the CI process based on what you (as a human) can see that I'm trying to do, I'd be thankful. The examples need to run through the basic serial equipped AVR board, uno, mega2560. NOT trinket and gemma. The "GoldilocksAnalogueTestSuite.ino" is for just one platform, with the json and library dependencies noted in the directory.

Otherwise, I'm at a stage to just abandon.

ianfixes commented 3 years ago

What I'm really hearing is that my documentation and error messaging is in very poor shape, not to mention my previous comment. I'll open a PR, because this is a quick fix (I think?). I'm really sorry that the documentation was lacking to the point where you felt your time was wasted. I would be grateful for any & all criticisms you can give of it.

ianfixes commented 3 years ago

Opened https://github.com/Arduino-CI/action/issues/18 which wasn't specifically related to this issue

feilipu commented 3 years ago

Fixed in PR and follow up comments.

The major issue was the inconsistent use of hyphen and underscore in the configuration file names (or probably not reading closely enough). .arduino-ci.yml and arduino_ci.yml tends to focus attention on the . rather than the other difference.

Also, not allowing a configuration file in the ~/examples/ directory, but allowing a file in the ~/tests/directory is inconsistent. That cost 10 minutes of things not working and then going back to read through closely.

ianfixes commented 3 years ago

not allowing a configuration file in the ~/examples/ directory

I think this is doable, opening https://github.com/Arduino-CI/arduino_ci/issues/272

.arduino-ci.yml and arduino_ci.yml tends to focus attention on the . rather than the other difference.

I think I should be logging info lines with the config files detected, so at least there is some indication of what the CI runner is responding to. https://github.com/Arduino-CI/arduino_ci/issues/273