Skip to content

Sync build assets from templates #164

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

Merged
merged 3 commits into from
Mar 8, 2023
Merged

Sync build assets from templates #164

merged 3 commits into from
Mar 8, 2023

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Mar 7, 2023

The assets used to produce the project's release and tester builds are based on reusable "templates" maintained in a centralized repository:

https://github.com/arduino/tooling-project-assets

Some advancements have been made to those upstream templates. Those are here pulled down to this repository.

Although the focus here is on the build assets, I applied some of the categories of changes universally (see the PR's individual commits for details).


Test release done using the updated assets:

Related

per1234 added 3 commits March 7, 2023 00:02
120 columns is the recommended line length for YAML code in Arduino tooling projects. The yamllint tool used by the
"Check YAML" template produces a warning when a line exceeds this length.

This is not a hard limit and in some cases it is either impossible or not beneficial to make lines less than 120 in
length so some violations of the guideline are unavoidable. However, a survey of the YAML files in the repository
revealed some opportunities for improving the code by reducing the lengths.
GitHub Actions provides the capability for workflow authors to use the capabilities of the GitHub Actions ToolKit
package directly in the `run` keys of workflows via "workflow commands". One such command is `set-output`, which allows
data to be passed out of a workflow step as an output.

It has been determined that this command has potential to be a security risk in some applications. For this reason,
GitHub has deprecated the command and a warning of this is shown in the workflow run summary page of any workflow using
it:

The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more
information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

The identical capability is now provided in a safer form via the GitHub Actions "environment files" system. Migrating
the use of the deprecated workflow commands to use the `GITHUB_OUTPUT` environment file instead fixes any potential
vulnerabilities in the workflows, resolves the warnings, and avoids the eventual complete breakage of the workflows that
would result from GitHub's planned removal of the `set-output` workflow command 2023-05-31.
Introducing the use of a matrix greatly improves time performances during the build making process, since each build
task is performed simultaneously.

To support this, a check has been added to avoid creating the same changelog more than once.

The calculation of the checksums has also been modified. Previously, it was done three (3) times at different stages of
the workflow. This is pointless, since the only checksums that matter are the ones calculated when the files are in
their final form. For this reason, it is now only done once during the release creation.
@per1234 per1234 added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Mar 7, 2023
@per1234 per1234 self-assigned this Mar 7, 2023
@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (9269175) 11.00% compared to head (636d337) 11.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #164   +/-   ##
=======================================
  Coverage   11.00%   11.00%           
=======================================
  Files          21       21           
  Lines        1827     1827           
=======================================
  Hits          201      201           
  Misses       1567     1567           
  Partials       59       59           
Flag Coverage Δ
unit 11.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@per1234
Copy link
Contributor Author

per1234 commented Mar 8, 2023

I'm confident the failed "Test Go" workflow run is not caused by the changes I made here. I am also getting consistent failures when I trigger workflow runs against the main branch. The specific tests that fail and runners they fail on change from one run to the other.

I remember the tests were always flakey in this repo, but I've never experienced this persistence of failures before. Previously I could rerun the workflow a couple of times to get a pass.

Copy link
Contributor

@MatteoPologruto MatteoPologruto left a comment

Choose a reason for hiding this comment

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

The changes look good to me. Thanks Per!

@per1234 per1234 merged commit 867089e into arduino:main Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants