Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

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

Merged
merged 13 commits into from Sep 15, 2020
36 changes: 29 additions & 7 deletions .travis.yml
Expand Up @@ -6,10 +6,32 @@ 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:
- wget https://github.com/bazelbuild/bazel/releases/download/3.5.0/bazel_3.5.0-linux-x86_64.deb
- wget https://github.com/bazelbuild/bazel/releases/download/3.5.0/bazel_3.5.0-linux-x86_64.deb.sha256
- sha256sum -c bazel_3.5.0-linux-x86_64.deb.sha256
- sudo dpkg -i bazel_3.5.0-linux-x86_64.deb
miraleung marked this conversation as resolved.
Show resolved Hide resolved
# 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