-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fix crossbuild script to continue after invalid arch. #136
Conversation
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 did not like the idea of inconsistent builds and silently ignoring the error. This change will let the script exit with success even if the build failed due to reasons other than the OS/Arch combo not supported.
Let's just get rid of the 32 bit builds for all OSes and change line 14 to:
arcs="amd64"
@ibnesayeed A subsequent PR will be to add support for arm64, which Apple silicon uses (see also machawk1/wail#494), but I am unsure if the other permutations exist (e.g., arm64+linux, arm64+windows). Any way you accomplish it, there needs to be a change for the script to work as expected with the currently listed permutations. |
I would simply remove the loop and include 3-4 flat lines with commands for each combination we want. |
@machawk1 I have pushed a few changes to this branch. See if that works for you. |
@ibnesayeed Your changes work for me and produce three binaries. What are your thoughts on adding |
Please go ahead and add the new platform entry in this PR. Also, please test the binary, if you have that machine available. |
@ibnesayeed I built for the additional platform and did some rudimentary tests with the binary on a machine with that platform. If you want some further tests or for me to run automated tests on the additional platform, let me know. |
I have fixed the GH Workflow issues and this is good to go. |
@ibnesayeed Good! I meant to mention that after the last PR but also experienced an issue with Golang resolving the mflag package in my older Golang installation prior to submitting this PR/issue. |
@machawk1 is the |
@ibnesayeed After updating my Go version, the |
This PR accounts for invalid architectures in the crossbuild script and closes #135.
I adjusted the bash script to print a message if the architecture combo used to build fails. Executing the revised script produces the binaries in /tmp/mgbins: memgator-darwin-amd64, memgator-windows-386.exe, memgator-linux-386, memgator-windows-amd64.exe, memgator-linux-amd64.