Skip to content

Commit

Permalink
[skip changelog] Only download required artifact in Windows Installer…
Browse files Browse the repository at this point in the history
… job of release workflows (#2743)

The project's nightly build and production release workflows generate a Windows Installer package of Arduino CLI. This
is generated from the Windows x86-64 build, which is produced by a prior job. The builds are transferred between jobs by
GitHub Actions workflow artifacts, one for each host architecture.

Previously, the "create-windows-installer" job that generates the Windows Installer package unnecessarily downloaded all
the build artifacts, even though it only requires the Windows x86-64 artifact. In addition to being inefficient, this
was problematic because the "create-windows-installer" job is running in parallel with the "notarize-macos" job, which
modifies the macOS artifacts. In order to fix a bug in the workflow, the "notarize-macos" job was recently changed to
delete the non-notarized macOS artifacts after downloading them so that the job could replace those artifacts with the
notarized builds. This caused the "create-windows-installer" job's download of the macOS artifacts to fail when it
attempted to download them after the time the parallel "notarize-macos" job had deleted them (but before the
"notarize-macos" job had uploaded the artifacts again).

The solution to the problem is to configure the "create-windows-installer" job to only download the artifact it
requires. This artifact is not modified by any parallel job so there is no danger of a conflict.
  • Loading branch information
per1234 authored Nov 4, 2024
1 parent 7ee4cf7 commit 3b14b47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/publish-go-nightly-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: ${{ env.ARTIFACT_NAME }}-*
merge-multiple: true
name: ${{ env.ARTIFACT_NAME }}-Windows_64bit
path: ${{ env.DIST_DIR }}

- name: Prepare PATH
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release-go-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: ${{ env.ARTIFACT_NAME }}-*
merge-multiple: true
name: ${{ env.ARTIFACT_NAME }}-Windows_64bit
path: ${{ env.DIST_DIR }}

- name: Prepare PATH
Expand Down

0 comments on commit 3b14b47

Please sign in to comment.