Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

arm64 #1168

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

Closed
koendv wants to merge 1 commit into arduino:main from koendv:main
Closed

arm64 #1168

koendv wants to merge 1 commit into arduino:main from koendv:main

Conversation

Copy link

@koendv koendv commented Jul 11, 2022

Motivation

Build arduino-ide for arm64

Change description

Adds build documentation and build script

Other information

These are instructions on compiling arduino-ide 2 for arm64 using self-hosted runners. Compiling can be done on raspberry pi os 64-bit or ubuntu arm64. The compiled binaries run on raspberry pi os 64-bit and ubuntu arm64.

Compiling is done using github actions, the same build process as on X86.

Because github does not offer linux arm64 runners, compilation is done using a self-hosted runner inside a docker on a raspberry pi.

Because github does not recommend running self-hosted runners on public repositories, the self-hosted runners are started from a fork of the arduino-ide repository, with public PR switched off on the fork.

A definitive solution would be github offering public linux/arm64 runners.

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

@per1234 per1234 added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure architecture: arm Specific to ARM host architecture os: linux Specific to Linux operating system labels Jul 11, 2022
Copy link

@umbynos umbynos left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the contribution!
I think the process could be enhanced a bit.
Unfortunately, using self-hosted runners is currently not feasible for us... Maybe a good idea would be to use https://github.com/docker/setup-qemu-action and emulation.
Let me know If you need help from my side 😃

Comment on lines +1 to +11
# arduino-ide 2.0.0 for Raspberry Pi

These are instructions on compiling [arduino-ide 2](https://github.com/arduino/arduino-ide) for arm64 using self-hosted runners. Compiling can be done on raspberry pi os 64-bit or ubuntu arm64. The compiled binaries run on raspberry pi os 64-bit and ubuntu arm64.

Compiling is done using github actions, the same build process as on X86.

Because github does not offer linux arm64 runners, compilation is done using a self-hosted runner on a raspberry pi.

Because github does not recommend running self-hosted runners on public repositories, the arduino-ide repository is forked first, and public PR are switched off on the fork.

For repeatability and security, compilation is done inside a docker.
Copy link

@umbynos umbynos Jul 12, 2022
edited
Loading

Choose a reason for hiding this comment

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

This approach could be enhanced, IMHO. Having a dedicated runner is a problem:

  • we have to manually operate on it and update it regularly
  • it's a security risk
  • I don't think that having a forked private version only for the self-hosted runner will pay off in the future

Maybe using this amazing piece of technology would be better:
https://github.com/docker/setup-qemu-action
Basically, this allows to run docker containers built for another architecture directly inside the runners provided by GitHub. Like this one for example: https://hub.docker.com/r/amd64/ubuntu/

We use the same approach to build imgtool
https://github.com/arduino/imgtool-packing/blob/bcb0ac50d94633784c51a0833fe2346e8cf8b2aa/.github/workflows/release.yml#L118-L187

@@ -0,0 +1,70 @@
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
Copy link

Choose a reason for hiding this comment

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

Instead of committing a patch, would be better to apply this directly and commit the result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
1 more reviewer

@umbynos umbynos umbynos requested changes

Reviewers whose approvals may not affect merge requirements
Labels
architecture: arm Specific to ARM host architecture os: linux Specific to Linux operating system topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /