Skip to content

Commit

Permalink
Upgrade to bazel 0.28.1.
Browse files Browse the repository at this point in the history
We disable "bazel fetch" because it seems to do more than what is needed for build and test. Hence I'd rather only do the build.

We also update bazel-gazelle, as per  https://github.com/bazelbuild/bazel-gazelle#running-gazelle-with-bazel -- I'm not quite sure this is needed with disabling "bazel fetch", but it's a newer version so we should update anyhow.

PiperOrigin-RevId: 275047119
  • Loading branch information
tholenst authored and copybara-github committed Oct 16, 2019
1 parent 82ce557 commit 8fda34a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
20 changes: 14 additions & 6 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -274,17 +274,19 @@ http_file(
http_archive(
name = "io_bazel_rules_go",
urls = [
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/0.18.6/rules_go-0.18.6.tar.gz",
"https://github.com/bazelbuild/rules_go/releases/download/0.18.6/rules_go-0.18.6.tar.gz",
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/v0.20.0/rules_go-v0.20.0.tar.gz",
"https://github.com/bazelbuild/rules_go/releases/download/v0.20.0/rules_go-v0.20.0.tar.gz",
],
sha256 = "f04d2373bcaf8aa09bccb08a98a57e721306c8f6043a2a0ee610fd6853dcde3d",
sha256 = "078f2a9569fa9ed846e60805fb5fb167d6f6c4ece48e6d409bf5fb2154eaf0d8",
)

http_archive(
name = "bazel_gazelle",
strip_prefix = "bazel-gazelle-395b3a1c2f22d8cd63e19c92d4e1556eb3d96dde",
urls = ["https://github.com/bazelbuild/bazel-gazelle/archive/395b3a1c2f22d8cd63e19c92d4e1556eb3d96dde.zip"],
sha256 = "a40deb9c0cfa2e424ad9b15fe68aa3d259ccb0ef6405dd4fe0506d86d75b8475",
urls = [
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/bazel-gazelle/releases/download/v0.19.0/bazel-gazelle-v0.19.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.19.0/bazel-gazelle-v0.19.0.tar.gz",
],
sha256 = "41bff2a0b32b02f20c227d234aa25ef3783998e5453f7eade929704dcff7cd4b",
)

load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies", "go_register_toolchains")
Expand Down Expand Up @@ -318,6 +320,12 @@ go_repository(
importpath = "golang.org/x/oauth2",
)

go_repository(
name = "org_golang_x_net",
commit = "74dc4d7220e7acc4e100824340f3e66577424772",
importpath = "golang.org/x/net",
)

go_repository(
name = "com_google_cloud_go",
commit = "777200caa7fb8936aed0f12b1fd79af64cc83ec9",
Expand Down
6 changes: 1 addition & 5 deletions kokoro/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [[ -n "${KOKORO_ROOT}" ]]; then
rm -f ~/.bazelrc

# TODO(b/131821833) Use the latest version of Bazel.
use_bazel.sh 0.26.1
use_bazel.sh 0.28.1

if [[ "${PLATFORM}" == 'darwin' ]]; then
export DEVELOPER_DIR="/Applications/Xcode_${XCODE_VERSION}.app/Contents/Developer"
Expand Down Expand Up @@ -84,8 +84,6 @@ echo "using go: $(which go)"
go version

run_linux_tests() {
time bazel fetch ...

# Build all targets, except objc.
time bazel build "${DISABLE_SANDBOX_ARGS[@]}" \
-- //... \
Expand All @@ -107,8 +105,6 @@ run_macos_tests() {
: "${IOS_SDK_VERSION:=12.2}"
: "${XCODE_VERSION:=10.2}"

time bazel fetch ...

# Build all the iOS targets.
time bazel build "${DISABLE_SANDBOX_ARGS[@]}" \
--compilation_mode=dbg \
Expand Down

0 comments on commit 8fda34a

Please sign in to comment.