-
Notifications
You must be signed in to change notification settings - Fork 323
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
Download native macOS arm64 binary on M1 #303
Download native macOS arm64 binary on M1 #303
Conversation
c2dcfb3
to
2c6c769
Compare
platform := platforms[runtime.GOOS] | ||
arch := runtime.GOARCH | ||
if arch == "arm64" { | ||
platform = platform + "_arm64" |
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.
We don't have ubuntu1404_arm64
support yet, so this may break Linux ARM64 support. But I'm not sure what happens right now when you run Bazelisk on Linux ARM64, does it fallback to fetch the x64 binary and somehow works through emulation? /cc @fweikert
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.
Good question - I think we have added too many things over time. We should refactor the entire platform support (with arm64 in mind).
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.
OK, I tested on a Linux ARM64 machine, downloading a Bazel binary at a certain commit never worked. So this change isn't make anything worse.
platform := platforms[runtime.GOOS] | ||
arch := runtime.GOARCH | ||
if arch == "arm64" { | ||
platform = platform + "_arm64" |
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.
OK, I tested on a Linux ARM64 machine, downloading a Bazel binary at a certain commit never worked. So this change isn't make anything worse.
@fweikert Can you make a new release for Bazelisk? |
Will do |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@bazel/bazelisk](https://togithub.com/bazelbuild/bazelisk) | [`^1.11.0` -> `^1.12.0`](https://renovatebot.com/diffs/npm/@bazel%2fbazelisk/1.11.0/1.12.0) | [![age](https://badges.renovateapi.com/packages/npm/@bazel%2fbazelisk/1.12.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@bazel%2fbazelisk/1.12.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@bazel%2fbazelisk/1.12.0/compatibility-slim/1.11.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@bazel%2fbazelisk/1.12.0/confidence-slim/1.11.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>bazelbuild/bazelisk</summary> ### [`v1.12.0`](https://togithub.com/bazelbuild/bazelisk/releases/tag/v1.12.0) [Compare Source](https://togithub.com/bazelbuild/bazelisk/compare/v1.11.0...v1.12.0) This release brings new features and fixes to both versions of Bazelisk: Go: - Added support for basic HTTP authentication via a .netrc file ([https://github.com/bazelbuild/bazelisk/pull/292](https://togithub.com/bazelbuild/bazelisk/pull/292)) - Improved and fixed Apple Silicon support ([https://github.com/bazelbuild/bazelisk/pull/299](https://togithub.com/bazelbuild/bazelisk/pull/299), [https://github.com/bazelbuild/bazelisk/pull/303](https://togithub.com/bazelbuild/bazelisk/pull/303)) - Rolling releases are now fetched from GCS instead of GitHub ([https://github.com/bazelbuild/bazelisk/pull/319](https://togithub.com/bazelbuild/bazelisk/pull/319)) Python: - Added support for Apple Silicon ([https://github.com/bazelbuild/bazelisk/pull/272](https://togithub.com/bazelbuild/bazelisk/pull/272)) - Implemented verification of downloaded Bazel binaries ([https://github.com/bazelbuild/bazelisk/pull/295](https://togithub.com/bazelbuild/bazelisk/pull/295)) We'd like to thank our contributors [@​chenrui333](https://togithub.com/chenrui333), [@​codeman9](https://togithub.com/codeman9), [@​cpsauer](https://togithub.com/cpsauer), [@​keith](https://togithub.com/keith), [@​linzhp](https://togithub.com/linzhp), [@​Warchant](https://togithub.com/Warchant) and [@​xinnjie](https://togithub.com/xinnjie)! </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/gapic-generator-typescript). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xMjIuMSIsInVwZGF0ZWRJblZlciI6IjMyLjEyMi4xIn0=-->
When using macOS on M1 and downloading a commit or any keyword that resolves to a commit (e.g.,
last_green
)bazelisk
was downloading from the url:https://storage.googleapis.com/bazel-builds/artifacts/macos/[commit]/bazel
.This PR changes the url to be of the form:
https://storage.googleapis.com/bazel-builds/artifacts/macos_arm64/[commit]/bazel
.Also, to get tests to now pass on M1,
test.sh
has been updated to insert the arch determined fromuname -m
for the versions that supportarm64
.See: bazelbuild/continuous-integration#1338