mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-04-19 12:57:17 +00:00
Simplify expression in container conditional steps of build workflow
The "Arduino IDE" GitHub Actions workflow uses a Docker container for the build job of certain target, while running others directly in the runner environment. Due to differences between these two environments, some steps must run only when a container is used by the job, and others only when the job is running in the runner environment. This is done by a conditional on the job matrix data regarding the container. The container value is set to null for the jobs that run in the runner environment, while containing a full container configuration mapping for the jobs that run in a container. Previously the conditional unnecessarily used the value of the image key of the container object specifically. The comparison can be done against the container value itself. Doing this will make it a little easier to understand the workflow code, since the conditional more clearly reflects the matrix (where `container` is set to `null` instead of `container.image`).
This commit is contained in:
parent
7e8f723df3
commit
69b73657b6
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@ -284,16 +284,16 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
if: fromJSON(matrix.config.container).image == null
|
||||
if: fromJSON(matrix.config.container) == null
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout
|
||||
# actions/checkout@v4 has dependency on a higher version of glibc than available in the Linux container.
|
||||
if: fromJSON(matrix.config.container).image != null
|
||||
if: fromJSON(matrix.config.container) != null
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Node.js
|
||||
if: fromJSON(matrix.config.container).image == null
|
||||
if: fromJSON(matrix.config.container) == null
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
@ -301,7 +301,7 @@ jobs:
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Install Python 3.x
|
||||
if: fromJSON(matrix.config.container).image == null
|
||||
if: fromJSON(matrix.config.container) == null
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11.x'
|
||||
|
Loading…
x
Reference in New Issue
Block a user