Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Bazel 3.2 and 3.3 compatibility #287

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
common --config=rules
common:v3.1 --config=rules_v3.1
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already set in .bazelrc_shared, which is imported on the next line

import %workspace%/.bazelrc_shared
9 changes: 4 additions & 5 deletions .bazelrc_shared
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@ test --test_output=all
build:rules --disk_cache=.bazel_cache
build:tests --disk_cache=../.bazel_cache

# bazel 3.1.0
common:rules_v3.0 --config=noop
common:rules_v3.1 --config=noop
common:rules_v3.2 --config=noop
common:rules_v3.3 --config=noop

# route potentially unrouted configs to a terminating noop config
# it's a noop because we use the default value
common:rules --config=noop
common:tests --config=noop
common:v3.0 --config=rules_v3.0
common:v3.1 --config=rules_v3.1
common:v3.2 --config=rules_v3.2
common:v3.3 --config=rules_v3.3

# pick something trivial as a "noop"
common:noop --logging=3
20 changes: 10 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,36 @@ jobs:
# Build
- stage: build
<<: *osx
env: BAZEL_VERSION=3.0.0
env: BAZEL_VERSION=3.2.0
script: ./scripts/travis.sh build
- <<: *linux
env: BAZEL_VERSION=3.0.0
env: BAZEL_VERSION=3.2.0
script: ./scripts/travis.sh build
- <<: *osx
env: BAZEL_VERSION=3.1.0
env: BAZEL_VERSION=3.3.0
script: ./scripts/travis.sh build
- <<: *linux
env: BAZEL_VERSION=3.1.0
env: BAZEL_VERSION=3.3.0
script: ./scripts/travis.sh build
# Lint
- stage: lint
<<: *osx
env: BAZEL_VERSION=3.0.0
env: BAZEL_VERSION=3.2.0
script: ./scripts/travis.sh lint
- <<: *linux
env: BAZEL_VERSION=3.1.0
env: BAZEL_VERSION=3.3.0
script: ./scripts/travis.sh lint
# Test
- stage: test
<<: *osx
env: BAZEL_VERSION=3.0.0
env: BAZEL_VERSION=3.2.0
script: ./scripts/travis.sh test
- <<: *linux
env: BAZEL_VERSION=3.0.0
env: BAZEL_VERSION=3.2.0
script: ./scripts/travis.sh test
- <<: *osx
env: BAZEL_VERSION=3.1.0
env: BAZEL_VERSION=3.3.0
script: ./scripts/travis.sh test
- <<: *linux
env: BAZEL_VERSION=3.1.0
env: BAZEL_VERSION=3.3.0
script: ./scripts/travis.sh test
14 changes: 7 additions & 7 deletions tools/bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ abs_path() {
workspace=$(cd $(dirname "$0")/..; pwd)
root_workspace=$(cd $(dirname $(abs_path "$0"))/..; pwd)

default_bazel_version='3.1.0'
default_bazel_version='3.3.0'

if [ -z "$BAZEL_VERSION" ]; then
bazel_version="$default_bazel_version"
Expand All @@ -28,13 +28,13 @@ case "$bazel_version" in
bazel_version=$("$BAZEL_REAL" version | awk '/Build label/ {print $3}' | cut -d '-' -f 1)
bazel="$BAZEL_REAL"
;;
'3.0.0')
darwin_sha='c6109f211f932866ef86f6ed996b31910b3a74a8d5275d3d6a416dafe61c00c6'
linux_sha='eb7aaa85d81c6d1caa5352e0573817217d0c364302aeee923a5cdb04f26d2bd3'
'3.2.0')
darwin_sha='0a9379a835a63186220e7dfc160be8971f03b9892bd0c3de6971c521138a1e28'
linux_sha='27d0b65201bc1936ea40eae149b19353e95d9a3b5e2a7d9dd3b4e12665534b0a'
;;
'3.1.0')
darwin_sha='5cfa97031b43432b3c742c80e2e01c41c0acdca7ba1052fc8cf1e291271bc9cd'
linux_sha='7ba815cbac712d061fe728fef958651512ff394b2708e89f79586ec93d1185ed'
'3.3.0')
darwin_sha='fb340fc910630ec2825ef35d7a385726b515e96f80cd52b4cf8e9d4df01f7bae'
linux_sha='1ec706d44d5980b27988601bbac8aa3028488ea136a958d0f57086aa1214ca41'
;;
*)
echo "The requested Bazel version '$bazel_version' is not supported"
Expand Down