tag | 8187a496d1efc6c8f670bc7278ab57c55310e094 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Tue Dec 14 06:59:10 2021 -0800 |
object | 52ea3c4bcba48e95b9e52d74772fd5643b239091 |
Android 12.0.0 release 20
commit | 52ea3c4bcba48e95b9e52d74772fd5643b239091 | [log] [tgz] |
---|---|---|
author | Jingwen Chen <jingwen@google.com> | Fri Mar 12 10:23:41 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Mar 12 10:23:41 2021 +0000 |
tree | 2dd17ba331ee8206edad3370bc7d6bc3c7c36e4e | |
parent | 22015c7e378421c94db41a8b59d8b145f0d217ce [diff] | |
parent | 33b9e5cf4b1481ea45c7187ba716a5c5992563f7 [diff] |
Add an update script to automate Bazel binary updates. am: 09bfc72247 am: f0e345e8a5 am: 33b9e5cf4b Original change: https://android-review.googlesource.com/c/platform/prebuilts/bazel/linux-x86_64/+/1622719 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ie03a4d35918cad663e02c9e5b25bf70f8cc8e76f
First, decide which version of Bazel you need.
Whichever of these you use, you will need to use official nojdk x86-64 versions of Bazel, for Linux and macOS (Darwin).
Run the update.sh
script in the Linux prebuilts repository to download the and verify the binaries from the trusted Bazel CI pipeline:
./update.sh <commit>
To get the commit hash for builds, see the [Bazel releases], [Bazel nightlies] or [Bazel per-commit builds] sections below.
update.sh
will also verify that the downloaded binary has the correct SHA-256 checksum as provided from Bazel CI metadata.
Once you have the binaries, you will need to create and send two CLs, to update the Linux and macOS prebuilts that live in separate Git repositories i.e.
The update script does not automatically create CLs, so you need to create them manually. In the two CLs descriptions, mention the testing you did, which should at least include:
gpg --import bazel-release.pub.gpg
gpg --verify bazel_nojdk-<commit>-linux-x86_64.sig
source build/envsetup.sh
bazel info
build/bazel/scripts/milestone-2/demo.sh full
build/bazel/scripts/milestone-2/demo.sh generate && build/bazel/scripts/milestone-2/demo.sh sync && USE_BAZEL=1 USE_BAZEL_ANALYSIS=1 m libc
Ensure that the Linux and Darwin CLs are set to the same Gerrit topic so they are submitted together.
The update.sh
script automates downloading Bazel binaries. The next sections describe how the different Bazel binaries (release, nightly, per-commit) can be manually downloaded from the Bazel CI.
The commit hash for linux and darwin nojdk x86-64 binaries are available from https://github.com/bazelbuild/bazel/releases
The commit hash and urls for linux and macOS nojdk x86-64 binaries are available in https://storage.googleapis.com/bazel-builds/metadata/latest.json
You need to know the GitHub commit that contains your change, e.g. https://github.com/bazelbuild/bazel/commit/364a867df255c57c8edc4a8aae8f78cb54900a54
And the linux and macOS nojdk x86-64 binaries are available from:
https://storage.googleapis.com/bazel-builds/metadata/<commit>.json