-
Notifications
You must be signed in to change notification settings - Fork 4
Expand CI system #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand CI system #21
Conversation
Some fields of the library.properties metadata file can affect compilation, so the workflow should run when it has been modified.
Run the workflow weekly to catch compilation failures caused by external changes (e.g., Arduino Mbed OS Boards, ArduinoCore-API).
The `workflow_dispatch` and `repository_dispatch` events allow manual triggering of the workflow. These can be useful to immediately check for impacts of changes to external resources. They do no harm when they are not needed, so there is no reason not to have them in place to be ready for when they might be needed.
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.
This comment referred to a since removed line of the workflow that checked out the `namespace_arduino` branch of ArduinoCore-API, which has since become unnecessary. The comment was not removed when the configuration was updated and now might cause confusion.
The `arduino/compile-sketches` action produces a report of the results of the compilations. The primary usage of this report is to generate the size deltas comment that is made to pull requests. Although that can only be done for pull requests, it might be that the compilation report is found useful for other purposes, in which case it is just as relevant when triggered by non-PR events. Always uploading the compilation report also makes the workflow a little more simple.
The "arduino/compile-sketches` GitHub Actions action generates a report of the results of the compilations as a JSON file. This file is uploaded as a workflow run artifact, which is later consumed by the `arduino/report-size-deltas` action. By default, the `actions/upload-artifact` used for the upload step does not require the target file to exist. In this usage, the report file should always exist. If not, it indicates something is seriously wrong and the workflow run should fail to bring this to our attention rather than silently ignoring it.
The previous condition is necessary in repositories where the "Run workflows from fork pull requests" setting is enabled and the "Send write tokens to workflows from fork pull requests" setting is disabled, explained in more detail here: https://github.com/arduino/report-size-deltas#run-from-the-same-workflow-as-the-arduinocompile-sketches-action However, this repository does not have the "Run workflows from fork pull requests" setting enabled, so the extra condition is superflous and only makes the workflow more difficult to understand and maintain.
The GitHub Actions workflow job that does a "smoke test" compilation of the library example sketches is a matrix, running a parallel job for each of the boards in the array. It may be that one job passes and another fails. In this case, there is memory usage change data available for the board that passed compilation. Previously the size deltas report only happened if all compilations passed. It may be useful for the contributor to get the size deltas feedback in addition to the compilation results even when one of the boards did not pass compilation so that they may have as much of the available information as possible to work with.
The `arduino/report-size-deltas` GitHub Actions action is used to provide feedback about the impact of a proposed change on sketch memory usage. Previously, due to the lack of a release, the development version of the action was used. Using release versions provides a more stable CI system for the 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/report-size-deltas@v2`).
The `name` key of a GitHub Actions workflow step is used to define the name used to identify that step to humans. When one is not defined, a more cryptic name is generated from the machine readable content of the step. A descriptive name will make it easier to understand the workflow run logs.
This will provide a quick overview of the project. The URLs in the "Compile Examples" workflow status badge are configured for the final location of the library, so they are expected to be broken while it is in the temporary development location.
On every push, pull request, and periodically, run Arduino Lint to check for common problems not related to the project code. The URLs in the workflow status badge are configured for the final location of the library, so they are expected to be broken while it is in the temporary development location.
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. The URLs in the workflow status badge are configured for the final location of the library, so they are expected to be broken while it is in the temporary development location.
There was a problem hiding this 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 🚀
@per1234 may I ask you to update to that |
@facchinm has it been pushed to S3 (i.e., https://downloads.arduino.cc/arduino-cli/arduino-cli_arduino_threads_Linux_64bit.tar.gz)? |
Not by me 🙂 Linux version is enough? |
Just pushed on the same URL |
Yes. I would like to eventually make
It will now use it without the need for any change to the CI system, but we will now have the opposite problem of the pinned version of the action using the old JSON keys and the Arduino CLI version using the new keys, so I'll submit the PR to use the stable |
@facchinm do you have any ideas about this error when using the new "arduino_threads" version of Arduino CLI:
|
My bad, I compiled with plain |
Hi @facchinm I have still been getting the same error running the workflow with https://downloads.arduino.cc/arduino-cli/arduino-cli_arduino_threads_Linux_64bit.tar.gz |
I missed a
|
@facchinm I cleaned it up no worries 🐱
super safe 😸 |
OK, all is well now! PR: #24 |
Update "Compile Examples" workflow
The "smoke test" sketch compilation CI workflow is brought into sync with the workflow template:
https://github.com/per1234/.github/blob/main/workflow-templates/compile-platform-examples-private.md
Add CI workflow to do Arduino project-specific linting
On every push, pull request, and periodically, run Arduino Lint to check for common problems not related to the project code.
Add CI workflow to check for commonly misspelled words
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.Resolves #18