-
-
Notifications
You must be signed in to change notification settings - Fork 433
Install Arduino CLI build dependencies in all dependent workflows #1348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: Install Task | ||
uses: arduino/setup-task@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
version: 3.x | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarn run i18n:push
:
Installing the entire IDE2 dependencies to push the translations makes no sense. Hence adding Golang
and Task
is also unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same for the nightly and weekly translation pushes and for the theme.
Instead of adding unnecessary workflow dependencies, we should clean up these tasks and make them IDE2/Theia independent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that the should be no reason to pull in the Arduino CLI dependency. I didn't set up this infrastructure and I don't know anything about it other than that it is failing right now.
My proposal gets them back to a working state, even if just as inefficient as before.
If someone wants to clean the system up, great, but I don't have time to figure that all out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge these changes, to fix the builds. Thank you!
We can do the task refactorings later. Here is the follow-up.
Motivation
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: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:
Arduino IDE's infrastructure was recently changed to use the Task tool to build Arduino CLI in the standard manner (#1315). 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:https://github.com/arduino/arduino-ide/runs/7985963886?check_suite_focus=true#step:4:52
Change description
Add a step for the missing tool dependency 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.
Reviewer checklist