Skip to content

Use appropriate indicator for dependency installation conditionals in build workflow #2565

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 1 commit into from
Nov 17, 2024

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Nov 17, 2024

Motivation

The Windows builds of the application are cryptographically signed. The signing requires an "eToken" hardware authentication device be connected to the machine performing the signing. This means that it is necessary to use a self-hosted GitHub Actions runner for the Windows job of the build workflow rather than the runners hosted by GitHub (#2452).

There are some unique characteristics of the self-hosted runner which the workflow code must accommodate. One of these is that, rather than installing dependencies of the build process during the workflow run as is done for the GitHub-hosted runners, the dependencies are preinstalled in the self-hosted runner machine. So the dependency installation steps must be configured so that they will be skipped when the job is running on the self-hosted runner.

This is done by adding a conditional to the steps. Previously the conditional was based on the value of the runner.os context item. This is not an appropriate indicator of the job running on the self-hosted runner because runner.os will have the same value if the job was running on a GitHub-hosted Windows runner. That might seem like only a hypothetical problem since the workflow does not use a GitHub-hosted Windows runner. However, it is important to support the use of the workflow in forks of the repository. In addition to the possible value to hard forked projects, this is essential to allow conscientious contributors to test contributions to the build and release system in their own fork prior to submitting a pull request.

Change description

The conditionals are changed to use the more appropriate indicator of the specific name of the self-hosted Windows runner via the runner.name context item.

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)

… build workflow

The Windows builds of the application are cryptographically signed. The signing requires an "eToken" hardware
authentication device be connected to the machine performing the signing. This means that it is necessary to use a
self-hosted GitHub Actions runner for the Windows job of the build workflow rather than the runners hosted by GitHub.

There are some unique characteristics of the self-hosted runner which the workflow code must accommodate. One of these
is that, rather than installing dependencies of the build process during the workflow run as is done for the
GitHub-hosted runners, the dependencies are preinstalled in the self-hosted runner machine. So the dependency
installation steps must be configured so that they will be skipped when the job is running on the self-hosted runner.

This is done by adding a conditional to the steps. Previously the conditional was based on the value of the `runner.os`
context item. This is not an appropriate indicator of the job running on the self-hosted runner because `runner.os` will
have the same value if the job was running on a GitHub-hosted Windows runner. That might seem like only a hypothetical
problem since the workflow does not use a GitHub-hosted Windows runner. However, it is important to support the use of
the workflow in forks of the repository. In addition to the possible value to hard forked projects, this is essential to
allow conscientious contributors to test contributions to the build and release system in their own fork prior to
submitting a pull request.

The conditionals are changed to use the more appropriate indicator of the specific name of the self-hosted Windows
runner (via the `runner.name` context item).
@per1234 per1234 added topic: infrastructure Related to project infrastructure os: windows Specific to Windows operating system type: imperfection Perceived defect in any part of project labels Nov 17, 2024
@per1234 per1234 self-assigned this Nov 17, 2024
@per1234 per1234 merged commit 43f0ccb into arduino:main Nov 17, 2024
22 checks passed
@per1234 per1234 deleted the dependency-indicator branch November 19, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os: windows Specific to Windows operating system topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant