Skip to content
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

Add support for all Task build architectures #636

Merged
merged 1 commit into from
Jan 31, 2023
Merged

Add support for all Task build architectures #636

merged 1 commit into from
Jan 31, 2023

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Jan 28, 2023

Previously, the action could only install Task when the GitHub Actions runner the workflow job was running on had an x86-64 or i386 architecture.

Since the GitHub-hosted runners are currently all x86-64, that is sufficient for most users. However, it is also possible to use GitHub actions with self-hosted runners of other architectures. Task builds are available for more architectures, so the action's code unnecessarily limited its utility.

Support for all architectures with available builds is hereby added.

In order to provide some possibility of automatic support for additional builds that may become available in the future, if the action code does not contain a mapped value for the host architecture, the value from Node.js is used verbatim. Because the mapping between the architecture value provided by Node.js to the filename suffix used in the Task build archives is a bit confusing, I added mapping entries for all suffixes, even in the cases where the two values are equal.


In order to provide a demonstration of the newly added architectures in use, I did a run of the integration test workflow with a job added to run it on a self-hosted runner I provided on an Apple Silicon (ARM64) macOS machine:

https://github.com/per1234/setup-task/actions/runs/4030927386

Unfortunately, adding such coverage as a permanent part of the repository's architecture would be problematic because our current approach for producing such a runner (AWS EC2 instance) incurs a significant charge to Arduino's AWS account for every workflow run. So I think we will need to be satisfied with the integration tests only providing coverage of the x86 runner architecture support and rely on manual/incidental testing for other runner architectures.

@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself architecture: arm Specific to ARM host architecture labels Jan 28, 2023
@per1234 per1234 self-assigned this Jan 28, 2023
src/installer.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@Bikappa Bikappa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment, but looks good 🚀

Previously, the action could only install Task when the runner had an x86-64 or i386 architecture.

Since the GitHub-hosted runners are currently all x86-64, that is sufficient for most users. However, it is also
possible to use GitHub actions with self-hosted runners of other architectures. Task builds are available for more
architectures, so the action's code unnecessarily limited its utility.

Support for all architectures with available builds is hereby added.

In order to provide some possibility of automatic support for additional builds that may become available in the future,
if the action code does not contain a mapped value for the host architecture, the value from Node.js is used verbatim.
Because the mapping between the architecture value provided by Node.js to the filename suffix used in the Task build
archives is a bit confusing, I added mapping entries for all suffixes, even in the cases where the two values are equal.

Co-authored-by: Luca Bianconi <71259950+Bikappa@users.noreply.github.com>
@per1234 per1234 merged commit e26d897 into arduino:main Jan 31, 2023
@per1234 per1234 deleted the arm-arch branch January 31, 2023 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture: arm Specific to ARM host architecture topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants