RIOT icon indicating copy to clipboard operation
RIOT copied to clipboard

boards: introduce board tiers

Open maribu opened this issue 3 years ago • 9 comments

Contribution description

The idea is to provide an infrastructure that allows selecting pre-defined subsets on which to run CI compilation tests. The following tiers are specified:

  • tier 0:
    • only 5 boards, for super fast CI runs
    • based on popularity and heterogeneity of the MCUs used
  • tier 1:
    • one board for every MCU family, preferring the MCU variant with most peripherals / RAM / flash where possible
  • tier 2:
    • all boards

A tier 0 board is also included in tier 1 and tier 2, a tier 1 board is included in tier 2. All tier are implemented as features. Hence, a FEATURES_REQUIRED += board_tier_0 selects only 5 boards, a FEATURES_REQUIRED += board_tier_1 selects one board per MCU family (also including all tier 0 boards), and finally FEATURES_REQUIRED += board_tier_3 is fulfilled by all boards.

The idea is to add labels to PRs that will export an FEATURES_REQUIRED environment variable to limit the result of make info-boards-supported to the given set. Maintainers can then decide on the level of CI coverage a PR should get, depending on how scary the code looks.

Testing procedure

The CI should be able to detect that feature modeling is consistent with both TEST_KCONFIG=1 and TEST_KCONFIG=0. Otherwise, proof-reading is the only way to test this.

Issues/PRs references

None

maribu avatar Aug 20 '22 16:08 maribu

I wonder if the features are the best place for this? I would think this is more a CI specific thing. Maybe this would be better to have in makefile.ci instead? This also means we don't have to worry about dependency modeling. We can also default to tier 2 meaning only tier 1 and tier 2 boards need to be flagged?

MrKevinWeiss avatar Aug 22 '22 08:08 MrKevinWeiss

We can also default to tier 2 meaning only tier 1 and tier 2 boards need to be flagged?

It is implemented like that :)

Maybe this would be better to have in makefile.ci instead?

Maybe. But note that features do implement already exactly the kind of mechanism this needs: Filtering only boards that have a magic flag set. I try to avoid adding new stuff to our build system, as the current level of its complexity already gives me nightmares. With features, it is trivial to figure out which boards to build a given app for

FEATURES_REQUIRED=board_tier_1 make -C tests/<FOO_TEST> info-board-supported

I was hoping that this could also be used outside of the CI. E.g. when I implement a new feature, I typically add a test app to this. It should be more than possible to locally build a single app for all tier 1 boards, but it will already find 90% of the issues Murdock will uncover.

maribu avatar Aug 22 '22 08:08 maribu

I think this is a great step. Having a central list (that's what @MrKevinWeiss proposed?) would have pros and cons... If there's no opposition, I'd say let's go with this and try! So please rebase & squash.

kaspar030 avatar Oct 06 '22 07:10 kaspar030

Rebased and fixed static tests

maribu avatar Oct 09 '22 19:10 maribu

Needs rebase!

kaspar030 avatar Dec 07 '22 15:12 kaspar030

Murdock results

:heavy_check_mark: PASSED

2a69358c0968fedc913b212d279725fc19d39dbe boards: introduce board tiers

Success Failures Total Runtime
6770 0 6770 13m:53s

Artifacts

riot-ci avatar Jan 04 '23 11:01 riot-ci

This needs a rebase

aabadie avatar Jan 04 '23 12:01 aabadie

Since we already have this now, is this PR still needed? Or would it be cleaner to switch Murdock to use this information?

benpicco avatar Jan 13 '23 00:01 benpicco

Can this PR be closed?

Teufelchen1 avatar Jan 24 '24 15:01 Teufelchen1