You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CI runner should respect this by not attempting to test or compile such a library against sam or other architectures.
That suggests the following logic for implementation:
if an override .arduino-ci.yml file exists, use that list
if the library.properties file does not exist, use the default list
if the architectures= line does not exist, use the default list
if architectures are specified, generate a candidate list of platforms to test against
Knowns and unknowns
The library specification says 2 relevant things:
Arduino development software supports multiple microcontroller architectures (e.g. AVR, SAM, etc), meaning that libraries may need to work on multiple architectures. The new 1.5 library format doesn’t contain special support for cross-architecture libraries, but it does provide a preprocessor based mechanism for libraries to target sections of code to specific architectures.
and
architectures - (defaults to *) a comma separated list of architectures supported by the library. If the library doesn’t contain architecture specific code use * to match all architectures. This field is used as one factor in determining priority when multiple libraries match an #include directive and to provide a warning message when the library is compiled for a board of an architecture that doesn't match any on the list.
@per1234 in practice does this mean simply comparing the middle field of a platform name (e.g. arduino:sam:arduino_due_x would be sam) to the architectures in the properties file? Also, is there any reason not to test all platforms that match a given architecture? On one hand it seems like you'd want to guard against things like pins or serial ports not existing on certain boards, but on the other hand the extra tests are probably diminishing returns and the user can always override the config with specific boards that need testing.
The text was updated successfully, but these errors were encountered:
does this mean simply comparing the middle field of a platform name
Exactly. That's the board's architecture.
it seems like you'd want to guard against things like pins or serial ports not existing on certain boards
Yep. For example, arduino:avr:mega has Serial1, but arduino:avr:uno does not. arduino:avr:leonardo has HID, but arduino:avr:mega does not, and so on. Then you throw different memory capacities in and it gets even more messy. So just because a library specifies avr compatibility in its metadata, doesn't mean it's compatible with every AVR board.
Feature request
via Arduino-CI/action#11
A
library.properties
file can include architecture information, e.g.The CI runner should respect this by not attempting to test or compile such a library against
sam
or other architectures.That suggests the following logic for implementation:
.arduino-ci.yml
file exists, use that listlibrary.properties
file does not exist, use the default listarchitectures=
line does not exist, use the default listKnowns and unknowns
The library specification says 2 relevant things:
and
@per1234 in practice does this mean simply comparing the middle field of a platform name (e.g.
arduino:sam:arduino_due_x
would besam
) to the architectures in the properties file? Also, is there any reason not to test all platforms that match a given architecture? On one hand it seems like you'd want to guard against things like pins or serial ports not existing on certain boards, but on the other hand the extra tests are probably diminishing returns and the user can always override the config with specific boards that need testing.The text was updated successfully, but these errors were encountered: