-
Notifications
You must be signed in to change notification settings - Fork 110
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
feat(arm64-support): add arm64 to goreleaser config #81
Conversation
this adds arm64 to the list of supported go architectures in the goreleaser configuration. it also updates the fetch-artifacts.sh script to copy the linux and darwin arm64 artifacts. i'm not entirely sure how this fits into the buildkite CI process, but it seems like it might need to be updated. i'm able to run the goreleaser command locally and see it generate all the proper files. one interesting and important note about building the render module while running on macos, i did need to set up the CPATH and LIBRARY_PATH as described here tidbyt#39 (comment)
Hey @samandmoore, thanks for the PR! I'm investigating how this fits into our CI as well. I think it's going to take some work on our part here. Currently we're building the final binaries natively, on a Linux |
Ah gotcha. That's interesting. Ideally you'd be able to use golang cross compilation. Do you know what is preventing that? Is it the linking to the webp library? |
Yup, exactly. Since it's a native dependency we can't use cross-compilation (without setting up an entire cross toolchain, anyway). |
Update, I'm able to cross-compile Linux amd64 -> Linux arm64, though I've only validated that the produced binary does not execute on an Intel CPU 😄 :
Then we can run something like this to cross compile with CGO:
I think we can follow a similar pattern for MacOS and I'm validating that now |
Update, I found an arm64 based linux machine to test on and confirmed it can render the |
Good news! I had a chance to look at this again after the holidays and was able to get this to cross compile for M1 as well. I downloaded Then I was able to reference it to build against:
Again, was only able to confirm it is not able to run on my machine since I don't currently have an M1 to test against:
|
Alright! I'm ready to land this. I might still need to make some tweaks here. I'm working on getting everything into GitHub actions so that it's all open source in #104 |
Awesome! Excited to see this coming together! |
hi there! 👋🏻
I just got my Tidbyt in the mail (yay!) and started playing around. I had to build from source because I'm using an M1 Mac.
I have a bunch of experience with golang, so I decided to see if I could get things updated to fix this issue #39
This PR is an attempt at that 😄
Notes
This adds arm64 to the list of supported go architectures in the
goreleaser configuration.
It also updates the fetch-artifacts.sh script to copy the linux and
darwin arm64 artifacts. I'm not entirely sure how this fits into the
buildkite CI process, but it seems like it might need to be updated.
I'm able to run the goreleaser command locally and see it generate all
the proper files.
One interesting and important note about building the render module
while running on macos, i did need to set up the CPATH and LIBRARY_PATH
as described here #39 (comment)
fixes #39 (I hope)