Skip to content
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

Add Arm64 on Darwin #193

Merged
merged 1 commit into from
Jun 18, 2021
Merged

Add Arm64 on Darwin #193

merged 1 commit into from
Jun 18, 2021

Conversation

samjewell
Copy link
Contributor

I've only done step 1 of Release Process: GoReleaser:
https://github.com/grafana/cortex-tools/blame/main/RELEASE.md#L6

For a couple of reasons:

  1. I didn't want to create and push a new tag until this is approved & merged
  2. I'm on an Arm64 Darwin machine myself, and so far I've found that when I try to build a Linux Amd64 Docker image, it never runs successfully on our linux machines on GCP - so I'm hoping someone on a linux machine (or an Amd64 Mac) can do step 3 for me (running goreleaser release).

I haven't tested the code change in this PR yet - I'm not sure how to exactly. I was looking in the Makefile for something I could run, but didn't spot anything yet. Cheers!

@samjewell samjewell requested a review from gouthamve June 18, 2021 09:04
@samjewell samjewell requested a review from a team as a code owner June 18, 2021 09:04
@samjewell samjewell self-assigned this Jun 18, 2021
@samjewell
Copy link
Contributor Author

Well the "build binaries: build all" step of the Github checks worked fine, and I was also able to run make all locally without any issues:

>$ file cortextool
cortextool: Mach-O 64-bit executable arm64
>$ ./cortextool version
version main

If I try make cross I get gox command not found. I thought go would natively compile for other platforms without any additional tooling 🤔

@gouthamve
Copy link
Member

Running:

goreleaser build --rm-dist --skip-validate

Produced:

   • building binaries
      • building                  binary=/home/goutham/go/src/github.com/grafana/cortex-tools/dist/cortextool-darwin_darwin_amd64/cortextool
      • building                  binary=/home/goutham/go/src/github.com/grafana/cortex-tools/dist/cortextool-darwin_darwin_arm64/cortextool
      • building                  binary=/home/goutham/go/src/github.com/grafana/cortex-tools/dist/cortextool-linux_linux_amd64/cortextool
      • building                  binary=/home/goutham/go/src/github.com/grafana/cortex-tools/dist/cortextool-windows_windows_386/cortextool.exe
      • building                  binary=/home/goutham/go/src/github.com/grafana/cortex-tools/dist/cortextool-windows_windows_amd64/cortextool.exe

I think this is good enough, and I've asked Sam to verify if he can run the binary on an M1 Mac. Once I have confirmation, I'll merge this and cut the release.

@gouthamve gouthamve merged commit d7410e6 into main Jun 18, 2021
@gouthamve gouthamve deleted the sj/add-arm64-darwin branch June 18, 2021 12:15
simonswine pushed a commit to grafana/mimir that referenced this pull request Jan 12, 2022
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.

None yet

2 participants