Skip to content

Conversation

@per1234
Copy link
Contributor

@per1234 per1234 commented Apr 14, 2021

This PR updates the CI system to the standardized GitHub Actions-based CI configuration for Arduino libraries.

Dependabot

Dependabot will periodically check the versions of all actions used in the repository's workflows. If any are found to be outdated, it will submit a pull request to update them.

NOTE: Dependabot's PRs will sometimes try to pin to the patch version of the action (e.g., updating uses: foo/bar@v1 to uses: foo/bar@v2.3.4). When the action author has provided a major version ref, use that instead (e.g., uses: foo/bar@v2). Once the major version has been updated in the workflow, Dependabot should not submit an update PR again until the next major version bump. So even if the PRs from Dependabot are not always exactly correct, their value lies in bringing the maintainer's attention to the fact that the action version in use is outdated. Dependabot will automatically close its PR once the workflow has been updated.

More information:
https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot

Spell check

On every push, pull request, and periodically, use the codespell-project/actions-codespell action to check for commonly misspelled words.

In the event of a false positive, the problematic word should be added, in all lowercase, to the ignore-words-list field of ./.codespellrc. Regardless of the case of the word in the false positive, it must be in all lowercase in the ignore list. The ignore list is comma-separated with no spaces.

Arduino Lint

On every push, pull request, and periodically, run Arduino Lint to check for common problems not related to the project code.

Compile examples

On every push or pull request that affects library source or example files, and periodically, use the arduino/compile-sketches action to compile all example sketches for the specified boards.

Report size deltas

On creation or commit to a pull request, use the arduino/report-size-deltas action to comment a report of the resulting change in memory usage of the examples to the PR thread.


Fixes #15

per1234 added 8 commits April 14, 2021 04:44
Dependabot will periodically check the versions of all actions used in the repository's workflows. If any are found to
be outdated, it will submit a pull request to update them.
NOTE: Dependabot's PRs will sometimes try to pin to the patch version of the action (e.g., updating `uses: foo/bar@v1`
to `uses: foo/bar@v2.3.4`). When the action author has provided a major version ref, use that instead
(e.g., `uses: foo/bar@v2`). Dependabot will automatically close its PR once the workflow has been updated.
More information:
https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot
The recent 2.0.0 release of the codespell tool used by the "Spell Check" CI workflow added support for configuring the
tool via a configuration file. Use of this file allows the spell check to easily be run by contributors locally with the
identical configuration as will be done in the CI. It replaces extras/codespell-ignore-words-list.txt.
Since the time the original badges were added, GitHub added support for referencing the workflows via file name in
addition to the previous approach of using the `name` value. This links to the specific workflow's runs, rather than a
search for the name which might return multiple results. It is also more lightweight in terms of syntax.
The workflow_dispatch and repository_dispatch events allow manual triggering of the workflow. These can be useful when
doing development and maintenance on the CI system, and do no harm when they are not needed, so it makes sense to add
them.
The "Compile Examples" GitHub Actions workflow generates a matrix job for each board. The default job name is generated
from the job's matrix object. This contains the complete board data, which results in a long and somewhat cryptic job
name that can make the workflow run more difficult to interpret.

The only necessary information is the FQBN. A custom job name allows for only using this information in the job name.
Previously, due to the lack of a release, the development versions of the sketch compilation actions were used. Using
release versions provides a more stable CI system for the ArduinoCore-mbed project.

Use of the major version ref will cause the workflow to benefit from ongoing development to the actions up until such
time as a new major release of an action is made, at which time we would need to evaluate whether any changes to the
workflow are required by the breaking change that triggered the major release before updating the major ref
(e.g., uses: 	`arduino/compile-sketches@v2`).
…le not found

This event would indicate that the workflow was misconfigured. So it's a valuable notification.
On every push, pull request, and periodically, run Arduino Lint to check for common problems not related to the project
code.
@per1234 per1234 added the type: enhancement Proposed improvement label Apr 14, 2021
@per1234 per1234 requested a review from aentinger April 14, 2021 12:04
Copy link
Contributor

@aentinger aentinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Thank you @per1234 🚀

@aentinger aentinger merged commit b24d6ba into arduino-libraries:master Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement Proposed improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modernize CI system

2 participants