Skip to content

Default iteration of platforms in CI should respect library.properties "architecture" setting #246

Closed
@ianfixes

Description

@ianfixes

Feature request

via Arduino-CI/action#11

A library.properties file can include architecture information, e.g.

architectures=avr

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:

  1. if an override .arduino-ci.yml file exists, use that list
  2. if the library.properties file does not exist, use the default list
  3. if the architectures= line does not exist, use the default list
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ci scriptsThe test runner scriptsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions