Skip to content

Commit ddef5aa

Browse files
mlegnerjuagargi
authored andcommitted
bazel: update bazelisk and support arm64 (scionproto#4447)
Bazel and bazilisk do support ARM64 by now. Lift the restriction on AMD64 and, while we're at it, update bazelisk to the latest version.
1 parent 7d95e80 commit ddef5aa

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

tools/install_bazel

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,27 @@ dl_install() {
1616
}
1717

1818
MACH="$(uname -m)"
19-
[ "$MACH" == "x86_64" ] || { echo "Error: bazel does not provide binaries for $MACH"; exit 1; }
19+
case "$MACH" in
20+
"x86_64")
21+
ARCH=amd64
22+
BAZELISK_CKSUM=d28b588ac0916abd6bf02defb5433f6eddf7cba35ffa808eabb65a44aab226f7
23+
;;
24+
"aarch64")
25+
ARCH=arm64
26+
BAZELISK_CKSUM=861a16ba9979613e70bd3d2f9d9ab5e3b59fe79471c5753acdc9c431ab6c9d94
27+
echo "Warning: ARM64 is not officially supported."
28+
echo "You may encounter problems when building and running SCION components."
29+
;;
30+
*)
31+
echo "Error: bazel does not provide binaries for $MACH"
32+
exit 1
33+
;;
34+
esac
2035

2136
mkdir -p ~/.local/bin
2237

23-
BAZELISK_VER=v1.10.1
24-
BAZELISK_CKSUM=4cb534c52cdd47a6223d4596d530e7c9c785438ab3b0a49ff347e991c210b2cd
25-
BAZELISK_FILE="bazelisk-linux-amd64"
38+
BAZELISK_VER=v1.19.0
39+
BAZELISK_FILE="bazelisk-linux-${ARCH}"
2640
BAZELISK_URL=https://github.com/bazelbuild/bazelisk/releases/download/${BAZELISK_VER}/${BAZELISK_FILE}
2741

2842
dl_install "$BAZELISK_URL" "$BAZELISK_CKSUM" ~/.local/bin/bazel

0 commit comments

Comments
 (0)