feat: GitHub Action annotations for failed builds #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To try and make the GitHub build experience more user-friendly, I've added a step to the workflow to produce annotations when
west build
fails. These annotations are shown on the page where a user would go to download their firmware.A failure will produce a notice informing the user the build has failed and where they can find help:
Additionally, I've included annotations to help with what I believe to be the top 3 most common issues users have on the ZMK Discord server. We can add additional annotations as and when necessary.
Annotation for errors due to incorrect keycodes:
e.g.
&kp SLSH
instead of&kp SLASH
Error message in log:
Annotation for errors due to incorrect phandle references:
e.g.
&kc ENTER
instead of&kp ENTER
Error message in log:
Annotation for errors due to missing parameters:
e.g.
&mt LALT
instead of&mt LALT F
Error message in log:
I have a couple of thoughts:
Instead of having all of this inside of
workflows/build.yml
, we could call a shell script. This would not only keep the yaml file leaner but it would make it easier to test the parsing locally.We could include an error codes for each unique annotation we seek out? For example, errors due to incorrect keycodes such as
&kp ENTRE
could be prefixed withE101
. We could then write about them in more detail on https://zmk.dev/docs/troubleshooting/.I'm not sure if these need to be solved now or if they can wait until later.
Please let me know what you think!