Skip to content

Commit 125bd64

Browse files
committed
Install Arduino CLI build dependencies in all dependent workflows
Arduino CLI is a tool dependency of Arduino IDE. For this reason, the necessary Arduino CLI build is acquired whenever running the `yarn` command in the repository. The way the Arduino CLI build is acquired depends on the type of version specified as dependency in the `arduino.cli.version` field of the arduino-ide-extension package metadata: - Release/nightly: download pre-built standard distribution - Git ref: build from source This means that, in the latter case, all build dependencies of Arduino CLI must be present. While the Go module dependencies are automatically installed during the build, the build tool dependencies must be installed in advance: - Go programming language - Task task runner Arduino IDE's infrastructure was recently changed to use the Task tool to build Arduino CLI in the supported manner. A step to install Task was not added to some of the workflows that run `yarn`, which caused them to fail when a non-release version of Arduino CLI was used as a dependency: arduino-ide-extension: >>> Building the CLI... arduino-ide-extension: /bin/sh: 1: task: not found arduino-ide-extension: error Command failed with exit code 1. A step for the missing tool dependency is hereby added to those workflows. The lack of an explicit installation of the other dependency, Go did not result in an error because Go is pre-installed on the GitHub Actions runner. However, the installed version may not match the version Arduino CLI is intended to be built with and validated for, and the version provided by the runner may change at any time. For this reason, it will be safest to explicitly set up the appropriate version of Go in the workflows.
1 parent ca47e8a commit 125bd64

File tree

5 files changed

+59
-0
lines changed

5 files changed

+59
-0
lines changed

.github/workflows/build.yml

+7
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ on:
2828
- cron: '0 3 * * *' # run every day at 3AM (https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
2929

3030
env:
31+
# See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml
32+
GO_VERSION: "1.17"
3133
JOB_TRANSFER_ARTIFACT: build-artifacts
3234
CHANGELOG_ARTIFACTS: changelog
3335

@@ -66,6 +68,11 @@ jobs:
6668
with:
6769
python-version: '3.x'
6870

71+
- name: Install Go
72+
uses: actions/setup-go@v3
73+
with:
74+
go-version: ${{ env.GO_VERSION }}
75+
6976
- name: Install Taskfile
7077
uses: arduino/setup-task@v1
7178
with:

.github/workflows/check-i18n-task.yml

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Check Internationalization
22

3+
env:
4+
# See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml
5+
GO_VERSION: "1.17"
6+
37
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
48
on:
59
push:
@@ -31,6 +35,11 @@ jobs:
3135
node-version: '14.x'
3236
registry-url: 'https://registry.npmjs.org'
3337

38+
- name: Install Go
39+
uses: actions/setup-go@v3
40+
with:
41+
go-version: ${{ env.GO_VERSION }}
42+
3443
- name: Install Taskfile
3544
uses: arduino/setup-task@v1
3645
with:

.github/workflows/i18n-nightly-push.yml

+15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: i18n-nightly-push
22

3+
env:
4+
# See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml
5+
GO_VERSION: "1.17"
6+
37
on:
48
schedule:
59
# run every day at 1AM
@@ -18,6 +22,17 @@ jobs:
1822
node-version: '14.x'
1923
registry-url: 'https://registry.npmjs.org'
2024

25+
- name: Install Go
26+
uses: actions/setup-go@v3
27+
with:
28+
go-version: ${{ env.GO_VERSION }}
29+
30+
- name: Install Task
31+
uses: arduino/setup-task@v1
32+
with:
33+
repo-token: ${{ secrets.GITHUB_TOKEN }}
34+
version: 3.x
35+
2136
- name: Install dependencies
2237
run: yarn
2338

.github/workflows/i18n-weekly-pull.yml

+15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: i18n-weekly-pull
22

3+
env:
4+
# See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml
5+
GO_VERSION: "1.17"
6+
37
on:
48
schedule:
59
# run every monday at 2AM
@@ -18,6 +22,17 @@ jobs:
1822
node-version: '14.x'
1923
registry-url: 'https://registry.npmjs.org'
2024

25+
- name: Install Go
26+
uses: actions/setup-go@v3
27+
with:
28+
go-version: ${{ env.GO_VERSION }}
29+
30+
- name: Install Task
31+
uses: arduino/setup-task@v1
32+
with:
33+
repo-token: ${{ secrets.GITHUB_TOKEN }}
34+
version: 3.x
35+
2136
- name: Install dependencies
2237
run: yarn
2338

.github/workflows/themes-weekly-pull.yml

+13
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
workflow_dispatch:
88

99
env:
10+
# See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml
11+
GO_VERSION: "1.17"
1012
NODE_VERSION: 14.x
1113

1214
jobs:
@@ -22,6 +24,17 @@ jobs:
2224
node-version: ${{ env.NODE_VERSION }}
2325
registry-url: 'https://registry.npmjs.org'
2426

27+
- name: Install Go
28+
uses: actions/setup-go@v3
29+
with:
30+
go-version: ${{ env.GO_VERSION }}
31+
32+
- name: Install Task
33+
uses: arduino/setup-task@v1
34+
with:
35+
repo-token: ${{ secrets.GITHUB_TOKEN }}
36+
version: 3.x
37+
2538
- name: Install dependencies
2639
run: yarn
2740

0 commit comments

Comments
 (0)