Skip to content
Permalink
Browse files
fix: [gax-java] Add speedy Bazel builds to Travis (#1181)
* fix: [gax-java] Fix broken Bazel build

* fix: [gax-java] Add speedy Bazel builds to Travis

* fix: use autovalue v1.4

* fix: Update bazel invocation

* fix: add Bazel install to travis.yml

* fix: add wget of sha256 checksum

* fix: split Java 7 and 8 checks into distinct jobs

* fix: split gradle and bazel builds into separate tasks

* fix: merge master

* Update .travis.yml

* fix: use bazel version and binary variables
  • Loading branch information
miraleung committed Sep 15, 2020
1 parent 834c05e commit 2fb85fed095c6043ee39b63a0f7dff3fd93cbd7b
Showing with 31 additions and 7 deletions.
  1. +31 −7 .travis.yml
@@ -6,10 +6,34 @@ addons:
hosts:
- fake-hostname-to-work-around-travis-bug
hostname: fake-hostname-to-work-around-travis-bug
jdk:
- openjdk8
- openjdk7
install: ./gradlew assemble
script: ./gradlew build install
after_success:
- bash <(curl -s https://codecov.io/bash)

jobs:
include:
- name: Java 7 Gradle Build
jdk: openjdk7
install: ./gradlew assemble
script: ./gradlew build install
after_success:
- bash <(curl -s https://codecov.io/bash)

- name: Java 8 Gradle Build
jdk: openjdk8
install: ./gradlew assemble
script:
- ./gradlew build install
after_success:
- bash <(curl -s https://codecov.io/bash)

- name: Java 8 Bazel Build
jdk: openjdk8
before_install:
- BAZEL_VERSION="3.5.0"
- BAZEL_BINARY="bazel_$BAZEL_VERSION-linux-x86_64.deb"
- wget "https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/$BAZEL_BINARY"
- wget "https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/$BAZEL_BINARY.sha256"
- sha256sum -c "$BAZEL_BINARY.sha256"
- sudo dpkg -i "$BAZEL_BINARY"
# The Bazel flags below are the best we can do to optimize build speed, since caching on Travis
# is suboptimal for various reasons (see https://kevin.burke.dev/kevin/bazel-tests-on-travis-ci/).
script:
- bazel --batch test //... --noshow_progress --test_output=errors

0 comments on commit 2fb85fe

Please sign in to comment.