blob: 87d7cf1f955cb43433602e52fe82289d07c2d85b [file] [log] [blame]
Brian Silverman7d89e282021-11-17 17:36:54 -08001os="$(uname -s | tr "[:upper:]" "[:lower:]")"
2readonly os
3
4arch="$(uname -m)"
5if [[ "${arch}" == "x86_64" ]]; then
6 arch="amd64"
7elif [[ "${arch}" == "aarch64" ]]; then
8 arch="arm64"
9else
10 >&2 echo "Unknown architecture: ${arch}"
11fi
12readonly arch
13
14# Use bazelisk to catch migration problems.
15readonly bazelisk_version="v1.10.1"
16readonly url="https://github.com/bazelbuild/bazelisk/releases/download/${bazelisk_version}/bazelisk-${os}-${arch}"
17bazel="${TMPDIR:-/tmp}/bazelisk"
18readonly bazel
19
20readonly common_test_args=(
21 --incompatible_enable_cc_toolchain_resolution
22 --symlink_prefix=/
23 --color=yes
24 --show_progress_rate_limit=30
25 --keep_going
26 --test_output=errors
27)
28
29curl -L -sSf -o "${bazel}" "${url}"
30chmod a+x "${bazel}"