buildkite: bump Go version to 1.16

We're currently on 1.13, which can cause build issues with code targeting later
versions.

PiperOrigin-RevId: 385029528
This commit is contained in:
Kevin Krakauer
2021-07-15 16:09:04 -07:00
committed by gVisor bot
parent cd45d7b6c8
commit 6415efa514
2 changed files with 10 additions and 2 deletions
+8 -1
View File
@@ -8,9 +8,16 @@ function install_pkgs() {
done
}
install_pkgs make "linux-headers-$(uname -r)" linux-libc-dev \
graphviz jq curl binutils gnupg gnupg-agent golang-go \
graphviz jq curl binutils gnupg gnupg-agent gcc \
apt-transport-https ca-certificates software-properties-common
# Install Go 1.16, as only 1.13 is available via apt.
declare -r go_archive=go1.16.6.linux-amd64.tar.gz
wget "https://golang.org/dl/${go_archive}"
sudo tar -xzf "${go_archive}" -C /usr/local
sudo ln -s /usr/local/go/bin/go /usr/bin/go
rm "${go_archive}"
# Setup for parallelization with PARTITION and TOTAL_PARTITIONS.
export PARTITION=${BUILDKITE_PARALLEL_JOB:-0}
PARTITION=$((${PARTITION}+1)) # 1-indexed, but PARALLEL_JOB is 0-indexed.
+2 -1
View File
@@ -36,9 +36,10 @@ install_helper() {
mkdir -p "${GOPATH}"/src/$(dirname "${PACKAGE}") && \
git clone https://"${PACKAGE}" "${GOPATH}"/src/"${PACKAGE}"
# Checkout and build the repository.
# Checkout and build the repository. We use a pre-GO111MODULE containerd.
(cd "${GOPATH}"/src/"${PACKAGE}" && \
git checkout "${TAG}" && \
export GO111MODULE=off && \
make && \
make install)
}