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

Sign up
Appearance settings

Commit 4708bae

Browse files
committed
Use separate attributes for human identifier and runner identifier in build job matrix
The "Arduino IDE" GitHub Actions workflow uses a job matrix to make the builds for each host target in parallel. The same steps are used for each job, but some configuration adjustments must be made on a per-target basis. This is done through various attributes in the matrix configuration. Previously the `os` attribute was used for two distinct things: - The machine identifier of the GitHub Actions runner machine of the job. - The differentiator in the human-targeted job name. The attribute name "os" (for "operating system") was misleading because runners are differentiated by more than only the operating system on the machine. The use of a machine identifier as a differentiator in the human-targeted job name was a bad idea because these identifiers would only effectively communicate the nature of a build to humans who are quite knowledgeable about the GitHub Actions workflow syntax. The impact of these poor decisions has not been too severe previously due to there only being a single job for each operating system. However, there is a need for multiple jobs per operating system in order to support multiple host architectures (e.g., macOS x86 and ARM). The solution is to: - Use an appropriate name for the runner identifier attribute. - Use a dedicated attribute for the human friendly job name differentiator.
1 parent 57975f8 commit 4708bae

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

‎.github/workflows/build.yml‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,24 +61,27 @@ jobs:
6161
echo "result=$RESULT" >> $GITHUB_OUTPUT
6262
6363
build:
64-
name: build (${{ matrix.config.os }})
64+
name: build (${{ matrix.config.name }})
6565
needs: run-determination
6666
if: needs.run-determination.outputs.result == 'true'
6767
strategy:
6868
matrix:
6969
config:
70-
- os: windows-2019
70+
- name: Windows # Human identifier for the job.
71+
runs-on: windows-2019
7172
certificate-secret: WINDOWS_SIGNING_CERTIFICATE_PFX # Name of the secret that contains the certificate.
7273
certificate-password-secret: WINDOWS_SIGNING_CERTIFICATE_PASSWORD # Name of the secret that contains the certificate password.
7374
certificate-extension: pfx # File extension for the certificate.
74-
- os: ubuntu-20.04
75-
- os: macos-latest
75+
- name: Linux
76+
runs-on: ubuntu-20.04
77+
- name: macOS x86
78+
runs-on: macos-latest
7679
# APPLE_SIGNING_CERTIFICATE_P12 secret was produced by following the procedure from:
7780
# https://www.kencochrane.com/2020/08/01/build-and-sign-golang-binaries-for-macos-with-github-actions/#exporting-the-developer-certificate
7881
certificate-secret: APPLE_SIGNING_CERTIFICATE_P12
7982
certificate-password-secret: KEYCHAIN_PASSWORD
8083
certificate-extension: p12
81-
runs-on: ${{ matrix.config.os }}
84+
runs-on: ${{ matrix.config.runs-on }}
8285
timeout-minutes: 90
8386

8487
steps:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /