Skip to content

Support ARM64 GitHub Actions Runners #187

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

Open
ayuhito opened this issue May 8, 2025 · 5 comments
Open

Support ARM64 GitHub Actions Runners #187

ayuhito opened this issue May 8, 2025 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ayuhito
Copy link

ayuhito commented May 8, 2025

We use ARM runners for all our GitHub Actions, including tests, but I don't think this action supports other platforms?

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /go-test-coverage: exec format error

Thank you!

@ayuhito
Copy link
Author

ayuhito commented May 8, 2025

Although a workaround is using go get -tool github.com/vladopajic/go-test-coverage/v2@latest and then running the CLI in the action directly 🙏

@vladopajic
Copy link
Owner

hey @ayuhito, thanks for reporting issue.

yeah action will not work for platform other then linux/amd64 as docker image is created only for this platform.

as you mentioned workaround is to run go-test-coverage as tool - this will work for any platform.


i can't remember reasoning why docker was utilized in the first place, it seems better to checkout source and run go-test-coverage as tool. it might be few seconds slower (checking out repo, dependencies then building vs getting docker image).

solutions:

  • build docker images for different platforms (and change action to use appropriate image for runner)
  • change github action to run go-test-coverage as tool ???
  • create new github action (using second option) that will be available for people using different platforms (we keep single docker image support, but if they use different platform they would have to to point to different action.yml file (not the main one))
  • update action.yml so that it detects platform for runner and then if platform is not supported run as option 2

@vladopajic vladopajic added the help wanted Extra attention is needed label May 8, 2025
@vladopajic
Copy link
Owner

if anyone is looking for contribution please consider this task.

@vladopajic vladopajic added the enhancement New feature or request label May 8, 2025
@ayuhito
Copy link
Author

ayuhito commented May 12, 2025

I actually like the go get -tool approach over the GitHub Action a lot since it's more predictable and easier to understand from a DX perspective. It's also cached with your other dependencies so it might be faster than Docker actually.

The only downside is that you have to write a bit of shell to copy GitHub env variables to CLI flags for stuff like coverage branch comparison.

But I also think it might be possible to add that logic directly into the CLI which would make the go tool DX perfect 👌

@vladopajic
Copy link
Owner

I actually like the go get -tool approach over the GitHub Action a lot since it's more predictable and easier to understand from a DX perspective. It's also cached with your other dependencies so it might be faster than Docker actually.

The only downside is that you have to write a bit of shell to copy GitHub env variables to CLI flags for stuff like coverage branch comparison.

github action can be implemented to run go get -tool .... i've made this pr to experiment with this method. it works, but there is some issue that github output values are not set.

it will be nice to have github action implemented with this method alongside current github action. and let users choose which github action they want to use. and in some future time we may stick to better approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants