Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use appropriate indicator for dependency installation conditionals in…
… 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).
  • Loading branch information
per1234 committed Nov 17, 2024
commit daffc64c8a7959e455c82af7913632f67f434d06
12 changes: 6 additions & 6 deletions 12 .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -321,42 +321,42 @@ jobs:
uses: actions/checkout@v3

- name: Install Node.js
if: fromJSON(matrix.config.container) == null && runner.os != 'Windows'
if: fromJSON(matrix.config.container) == null && runner.name != 'WINDOWS-SIGN-PC'
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Install Python 3.x
if: fromJSON(matrix.config.container) == null && runner.os != 'Windows'
if: fromJSON(matrix.config.container) == null && runner.name != 'WINDOWS-SIGN-PC'
uses: actions/setup-python@v5
with:
python-version: '3.11.x'

- name: Install Go
if: fromJSON(matrix.config.container) == null && runner.os != 'Windows'
if: fromJSON(matrix.config.container) == null && runner.name != 'WINDOWS-SIGN-PC'
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Install Go
# actions/setup-go@v5 has dependency on a higher version of glibc than available in the Linux container.
if: fromJSON(matrix.config.container) != null && runner.os != 'Windows'
if: fromJSON(matrix.config.container) != null && runner.name != 'WINDOWS-SIGN-PC'
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

- name: Install Taskfile
if: fromJSON(matrix.config.container) == null && runner.os != 'Windows'
if: fromJSON(matrix.config.container) == null && runner.name != 'WINDOWS-SIGN-PC'
uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x

- name: Install Taskfile
# actions/setup-task@v2 has dependency on a higher version of glibc than available in the Linux container.
if: fromJSON(matrix.config.container) != null && runner.os != 'Windows'
if: fromJSON(matrix.config.container) != null && runner.name != 'WINDOWS-SIGN-PC'
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.