GitHub action for testing Arduino libraries

43 views
Skip to first unread message

Ian Katz

unread,
Nov 30, 2020, 5:00:15 PM11/30/20
to devel...@arduino.cc
I'm pleased to announce the initial release of a GitHub action
specifically designed to test Arduino libraries:
https://github.com/marketplace/actions/arduino_ci

This is powered by the arduino_ci project (which provides unit testing
capabilities) and the arduino-cli project (which provides board
management, library management, and compilation capabilities). I am
very grateful to the CLI team -- in particular per1234 and Matthijs
Kooijman -- who provided some guidance in this process. I must also
thank James Foster for the motivation to move this project forward
(e.g. https://github.com/Arduino-CI/Blink).

The process for using the GitHub action in your own repo is committing
a ~10 line file, which can be copied as-is from the README linked
above; I would be grateful for any & all feedback on the process of
setting up or using this tool.

Rob Tillaart

unread,
Dec 1, 2020, 6:05:56 AM12/1/20
to Arduino Developers
Hi Ian,

I have several libraries at https://github.com/RobTillaart?tab=repositories so I will give it a try this week.

Rob



Virus-free. www.avg.com

--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.
To view this discussion on the web visit https://groups.google.com/a/arduino.cc/d/msgid/developers/CAKLOAe0U8OfWMfHPCXnZ6QerUHNqfxmRP0TJyTjuC4iRTeQWVQ%40mail.gmail.com.

Rob Tillaart

unread,
Dec 1, 2020, 6:19:06 AM12/1/20
to Arduino Developers
Hi Ian,

Must it be added to the master branch? 

Rob




Virus-free. www.avg.com

On Mon, Nov 30, 2020 at 11:00 PM Ian Katz <ianf...@gmail.com> wrote:

Rob Tillaart

unread,
Dec 1, 2020, 6:19:58 AM12/1/20
to Arduino Developers
Patience is a virtue, got two mails about failing runs :)  

Virus-free. www.avg.com

Ian Katz

unread,
Jan 7, 2021, 12:09:51 AM1/7/21
to devel...@arduino.cc
I'm pleased to announce a newly released version (v0.1.2) of the
GitHub action. This is based on an underlying ruby gem that is now
v1.2.0.

https://github.com/marketplace/actions/arduino_ci

I'm grateful for the aid of Rob Tillaart (who ran many beta tests
against many repos, and filed many issues), and per1234 (whose
responses to my many questions were both timely and informative).
This enabled everything from smarter handling of platform
architectures at the high level to better unittest comparison
operators at the low level.

I remain interested in any feedback that users of this project may
have, including complaints - no matter how big or (especially) how
small. Some of you have sent those along already, and the end result
is better for it: in functionality, and in documentation. If this
project seems to be of no value to you, I'm interested in those
perspectives too.

I look forward to your comments via email, GitHub, and gitter.

Phillip Stevens

unread,
Jan 27, 2021, 10:20:14 PM1/27/21
to Developers, Ian Katz
After a bit of back and forward, Ian got the GitHub Action working with Arduino FreeRTOS.

Special mention of success in limiting examples compilation to a specific set of machines within the AVR architecture.
And even working with one example that requires a specific machine that is outside the normal Arduino catalogue (Goldilocks Analogue), and some external libraries.

Works as expected. +1.

Ian Katz

unread,
Jan 28, 2021, 10:32:32 AM1/28/21
to devel...@arduino.cc
Thanks Phillip- you helped me find some improvements to be made, and
an embarrassing bug for good measure. I appreciate your patience and
feedback during that process.

The next phase of development on this project will focus almost
entirely on the system of hardware mocks in C/C++, which will involve
a discussion that I'm not quite sure how to start. Broadly speaking,
there are a few aspects that are interrelated:

* I'm not sure what functions, macros, and definitions are considered
"public" for a given board, so it's not clear how much of this to try
and replicate in mocks
* I'm not sure what functions, macros, and definitions are considered
"public" for a given architecture either; it's not clear whether
avr-libc is all I need for AVR, or if there are other things
* There isn't really a way to inject unit testing capabilities into
the Arduino reference library itself, so things like mocking a Serial
port object involve going all the way down to mocking Stream.
(ArduinoCore-API seems like it might be a good place to work on
changing that, but I'm not sure when or how that might be picked up by
the different platforms themselves)

How should I set my expectations here? Is unit testing a worthy
enough goal to encourage minor changes to the Arduino ecosystem, or
should I expect to have to be in a state of perpetual workarounds?

Best,
-Ian
> --
> You received this message because you are subscribed to the Google Groups "Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.
> To view this discussion on the web visit https://groups.google.com/a/arduino.cc/d/msgid/developers/0259f813-8ed9-4a74-9d90-ae4e61a56c02n%40arduino.cc.
Reply all
Reply to author
Forward
0 new messages