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

Download native macOS arm64 binary on M1 #303

Merged

Conversation

codeman9
Copy link
Contributor

@codeman9 codeman9 commented Feb 22, 2022

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 from uname -m for the versions that support arm64.

See: bazelbuild/continuous-integration#1338

platforms/platforms.go Outdated Show resolved Hide resolved
@codeman9 codeman9 force-pushed the codyv/download-native-arm64-m1 branch from c2dcfb3 to 2c6c769 Compare May 20, 2022 16:03
platform := platforms[runtime.GOOS]
arch := runtime.GOARCH
if arch == "arm64" {
platform = platform + "_arm64"
Copy link
Member

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

Copy link
Member

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).

Copy link
Member

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"
Copy link
Member

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.

@meteorcloudy meteorcloudy merged commit 40d8ae3 into bazelbuild:master Jun 15, 2022
@meteorcloudy
Copy link
Member

meteorcloudy commented Jun 15, 2022

@fweikert Can you make a new release for Bazelisk?

@fweikert
Copy link
Member

Will do

@fweikert
Copy link
Member

gcf-merge-on-green bot pushed a commit to googleapis/gapic-generator-typescript that referenced this pull request Jul 22, 2022
[![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 ([bazelbuild/bazelisk#292)
-   Improved and fixed Apple Silicon support ([bazelbuild/bazelisk#299, [bazelbuild/bazelisk#303)
-   Rolling releases are now fetched from GCS instead of GitHub ([bazelbuild/bazelisk#319)

Python:

-   Added support for Apple Silicon ([bazelbuild/bazelisk#272)
-   Implemented verification of downloaded Bazel binaries ([bazelbuild/bazelisk#295)

We'd like to thank our contributors [@&#8203;chenrui333](https://togithub.com/chenrui333), [@&#8203;codeman9](https://togithub.com/codeman9), [@&#8203;cpsauer](https://togithub.com/cpsauer), [@&#8203;keith](https://togithub.com/keith), [@&#8203;linzhp](https://togithub.com/linzhp), [@&#8203;Warchant](https://togithub.com/Warchant) and [@&#8203;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=-->
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

3 participants