Skip to content

Conversation

@linki
Copy link
Contributor

@linki linki commented Feb 2, 2022

This is an attempt to build goss for arm64 so we can run it on Graviton2 machines on AWS.

It fixes #722.

It adds a Makefile target for release/goss-linux-arm64 alongside release/goss-linux-arm, release/goss-linux-amd64 etc.

Note, that this results in the released assets being changed slightly going forward: goss-linux-arm will be a 32-bit ARM binary and goss-linux-arm64 will be a 64-bit ARM binary.

Other changes

I also changed install.sh a little because the current implementation actually builds for the wrong architecture: when uname -m returns aarch64 it should use GOARCH=arm64 instead of the currently used GOARCH=arm which results in a 32-bit binary.

I also added arm64 to the 64-bit if-statement because that's what is returned on the arm-based Macbooks.

In order to also support 32-bit ARM in install.sh I matched on aarch32 but I don't know if that's correct. I believe that wouldn't work on, e.g. Raspberry Pis, because I think they return something like armv7 or so. I didn't prioritize it here because the current implementation didn't do the right thing anyways.

/cc @tnaroska because you created the original issue
/cc @garyschulte because you have built for arm64 as well

@ekelali
Copy link
Collaborator

ekelali commented Feb 6, 2022

Thank you for submitting this PR:

  • Can you split the install.sh change to a separate PR. This way I can publish the new binaries prior to install.sh update.

  • What are the implications of aarch64 moving from arm -> arm64 in the install script? Is it broken today, does this introduce a breaking change?

@linki
Copy link
Contributor Author

linki commented Mar 22, 2022

I'm still working on this feature on my end. I'll follow up here as soon as possible.

@linki
Copy link
Contributor Author

linki commented Apr 28, 2022

@ekelali Thanks for the suggestion to split the PR. I wasn't sure about the purpose of install.sh but it looks like it's not relevant to the release process.

It should be much easier to get this merged now since it will only add one more binary and shasum to each release, not touching anything else.

Note, that this results in the released assets being changed slightly going forward: goss-linux-arm will be a 32-bit ARM binary and goss-linux-arm64 will be a 64-bit ARM binary.

This was actually a wrong comment by me. goss-linux-arm is already a 32-bit ARM binary (like it should) and this PR adds a goss-linux-arm64 64-bit ARM binary alongside it. So the releases are backwards compatible.

I'll clarify the changes to install.sh in a separate PR.

@aelsabbahy aelsabbahy merged commit 4157932 into goss-org:master May 12, 2022
@linki linki deleted the arm64 branch May 12, 2022 18:01
@linki
Copy link
Contributor Author

linki commented May 18, 2022

@aelsabbahy Would you mind creating a release that includes the arm64 binaries?

@linki
Copy link
Contributor Author

linki commented May 27, 2022

@aelsabbahy Thanks! 🤗

@aelsabbahy
Copy link
Member

Thank you for the contribution, greatly appreciated!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for linux/arm64 architecture

3 participants