From f58af4818f1b9947aa1d970fe2d52f8fe584ca99 Mon Sep 17 00:00:00 2001 From: per1234 Date: Mon, 11 Nov 2024 23:18:44 -0800 Subject: [PATCH 1/2] Trim trailing whitespace in build workflow --- .github/workflows/build.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f35d97f16..6486e207a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ on: - Push Container Images branches: - main - types: + types: - completed env: @@ -397,7 +397,7 @@ jobs: yarn --cwd electron-app rebuild yarn --cwd electron-app build yarn --cwd electron-app package - + # Both macOS jobs generate a "channel update info file" with same path and name. The second job to complete would # overwrite the file generated by the first in the workflow artifact. - name: Stage channel file for merge @@ -425,14 +425,13 @@ jobs: if-no-files-found: error name: ${{ env.STAGED_CHANNEL_FILES_ARTIFACT }} path: ${{ runner.os == 'Windows' && matrix.config.working-directory && format('{0}/{1}', matrix.config.working-directory, env.STAGED_CHANNEL_FILES_PATH) || env.STAGED_CHANNEL_FILES_PATH }} - - name: Upload [GitHub Actions] uses: actions/upload-artifact@v3 with: name: ${{ env.JOB_TRANSFER_ARTIFACT }} path: ${{ runner.os == 'Windows' && matrix.config.working-directory && format('{0}/{1}', matrix.config.working-directory, env.BUILD_ARTIFACTS_PATH) || env.BUILD_ARTIFACTS_PATH }} - + - name: Manual Clean up for self-hosted runners if: runner.os == 'Windows' && matrix.config.working-directory shell: cmd From 243edfbca6d7266842cb6f1df4091b37d353a1d1 Mon Sep 17 00:00:00 2001 From: per1234 Date: Tue, 12 Nov 2024 00:01:07 -0800 Subject: [PATCH 2/2] Add `PAID_RUNNER_BUILD_DATA` environment variable back to build workflow 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. --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6486e207a..4c87567ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -127,6 +127,10 @@ env: name: macOS_arm64_dmg - path: '*macOS_arm64.zip' name: macOS_arm64_zip + PAID_RUNNER_BUILD_DATA: | + # This system was implemented to allow selective use of paid GitHub-hosted runners, due to the Apple Silicon runner + # incurring a charge at that time. Free Apple Silicon runners are now available so the configuration was moved to + # `BASE_BUILD_DATA`, but the system was left in place for future use. jobs: run-determination: