mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-08 11:56:36 +00:00
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.
This commit is contained in:
parent
57975f8d91
commit
4708bae9ab
13
.github/workflows/build.yml
vendored
13
.github/workflows/build.yml
vendored
@ -61,24 +61,27 @@ jobs:
|
|||||||
echo "result=$RESULT" >> $GITHUB_OUTPUT
|
echo "result=$RESULT" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: build (${{ matrix.config.os }})
|
name: build (${{ matrix.config.name }})
|
||||||
needs: run-determination
|
needs: run-determination
|
||||||
if: needs.run-determination.outputs.result == 'true'
|
if: needs.run-determination.outputs.result == 'true'
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- os: windows-2019
|
- name: Windows # Human identifier for the job.
|
||||||
|
runs-on: windows-2019
|
||||||
certificate-secret: WINDOWS_SIGNING_CERTIFICATE_PFX # Name of the secret that contains the certificate.
|
certificate-secret: WINDOWS_SIGNING_CERTIFICATE_PFX # Name of the secret that contains the certificate.
|
||||||
certificate-password-secret: WINDOWS_SIGNING_CERTIFICATE_PASSWORD # Name of the secret that contains the certificate password.
|
certificate-password-secret: WINDOWS_SIGNING_CERTIFICATE_PASSWORD # Name of the secret that contains the certificate password.
|
||||||
certificate-extension: pfx # File extension for the certificate.
|
certificate-extension: pfx # File extension for the certificate.
|
||||||
- os: ubuntu-20.04
|
- name: Linux
|
||||||
- os: macos-latest
|
runs-on: ubuntu-20.04
|
||||||
|
- name: macOS x86
|
||||||
|
runs-on: macos-latest
|
||||||
# APPLE_SIGNING_CERTIFICATE_P12 secret was produced by following the procedure from:
|
# APPLE_SIGNING_CERTIFICATE_P12 secret was produced by following the procedure from:
|
||||||
# https://www.kencochrane.com/2020/08/01/build-and-sign-golang-binaries-for-macos-with-github-actions/#exporting-the-developer-certificate
|
# https://www.kencochrane.com/2020/08/01/build-and-sign-golang-binaries-for-macos-with-github-actions/#exporting-the-developer-certificate
|
||||||
certificate-secret: APPLE_SIGNING_CERTIFICATE_P12
|
certificate-secret: APPLE_SIGNING_CERTIFICATE_P12
|
||||||
certificate-password-secret: KEYCHAIN_PASSWORD
|
certificate-password-secret: KEYCHAIN_PASSWORD
|
||||||
certificate-extension: p12
|
certificate-extension: p12
|
||||||
runs-on: ${{ matrix.config.os }}
|
runs-on: ${{ matrix.config.runs-on }}
|
||||||
timeout-minutes: 90
|
timeout-minutes: 90
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user