Skip to content
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

Add PAID_RUNNER_BUILD_DATA environment variable back to build workflow #2563

Merged
merged 2 commits into from
Nov 17, 2024

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Nov 17, 2024

Motivation

The build workflow produces builds for a range of target host architectures, including macOS Apple Silicon. This is done by running a native build in a machine of the target architecture.

At the time the support for producing Apple Silicon builds was added to the workflow (#2245), use of GitHub-hosted Apple Silicon runner machines was charged by the minute (while use of the other runners is free). In order to avoid excessive expenses, the workflow was configured so that the Apple Silicon builds were only produced when absolutely necessary. This was done by defining two sets of job matrix arrays, one for jobs using free runners, and the other for jobs using paid runners. Due to the limitations of the GitHub Actions framework, it was necessary to use workflow environment variables for this purpose.

Since that time, GitHub made free GitHub-hosted Apple Silicon runners available. When the workflow was adjusted to use that runner (#2513), the configuration for the Apple Silicon build job was moved to the free runner job matrix array. The system for supporting selective use of paid GitHub-hosted runners to produce builds was not removed at that time. This is reasonable since it is possible the need will arise for using paid runners at some point in the future (e.g., only legacy older versions of free macOS "Intel" runners are now provided and it is likely that even these will eventually be phased out forcing us to use the paid runner to produce builds for that target). However, the environment variable for the paid runner job matrix array data was removed. The absence of that variable made it very difficult to understand the workflow code for the system.

Change description

Replace the environment variable that was removed in #2513. A comment is added to explain the reason for this.

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

The build workflow produces builds for a range of target host architectures, including macOS Apple Silicon. This is done
by running a native build in a machine of the target architecture.

At the time the support for producing Apple Silicon builds was added to the workflow, use of GitHub-hosted Apple Silicon
runner machines was charged by the minute (while use of the other runners is free). In order to avoid excessive
expenses, the workflow was configured so that the Apple Silicon builds were only produced when absolutely necessary.
This was done by defining two sets of job matrix arrays, one for jobs using free runners, and the other for jobs using
paid runners. Due to the limitations of the GitHub Actions framework, it was necessary to use workflow environment
variables for this purpose.

Since that time, GitHub made free GitHub-hosted Apple Silicon runners available. When the workflow was adjusted to use
that runner, the configuration for the Apple Silicon build job was moved to the free runner job matrix array. The system
for supporting selective use of paid GitHub-hosted runners to produce builds was not removed at that time. This is
reasonable since it is possible the need will arise for using paid runners at some point in the future (e.g., only
legacy older versions of free macOS "Intel" runners are now provided and it is likely that even these will eventually be
phased out forcing us to use the paid runner to produce builds for that target). However, the environment variable for
the paid runner job matrix array data was removed. The absence of that variable made it very difficult to understand the
workflow code for the system.

For this reason, the environment variable is replaced, but empty of data. A comment is added to explain the reason for
this.
@per1234 per1234 added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Nov 17, 2024
@per1234 per1234 self-assigned this Nov 17, 2024
@per1234 per1234 merged commit 3d82cb3 into arduino:main Nov 17, 2024
22 checks passed
@per1234 per1234 deleted the replace-paid-runner-env branch November 17, 2024 08:54
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.

1 participant