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

Commit 2fb85fe

Browse files
authored
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
1 parent 834c05e commit 2fb85fe

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

‎.travis.yml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,34 @@ addons:
66
hosts:
77
- fake-hostname-to-work-around-travis-bug
88
hostname: fake-hostname-to-work-around-travis-bug
9-
jdk:
10-
- openjdk8
11-
- openjdk7
12-
install: ./gradlew assemble
13-
script: ./gradlew build install
14-
after_success:
15-
- bash <(curl -s https://codecov.io/bash)
9+
10+
jobs:
11+
include:
12+
- name: Java 7 Gradle Build
13+
jdk: openjdk7
14+
install: ./gradlew assemble
15+
script: ./gradlew build install
16+
after_success:
17+
- bash <(curl -s https://codecov.io/bash)
18+
19+
- name: Java 8 Gradle Build
20+
jdk: openjdk8
21+
install: ./gradlew assemble
22+
script:
23+
- ./gradlew build install
24+
after_success:
25+
- bash <(curl -s https://codecov.io/bash)
26+
27+
- name: Java 8 Bazel Build
28+
jdk: openjdk8
29+
before_install:
30+
- BAZEL_VERSION="3.5.0"
31+
- BAZEL_BINARY="bazel_$BAZEL_VERSION-linux-x86_64.deb"
32+
- wget "https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/$BAZEL_BINARY"
33+
- wget "https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/$BAZEL_BINARY.sha256"
34+
- sha256sum -c "$BAZEL_BINARY.sha256"
35+
- sudo dpkg -i "$BAZEL_BINARY"
36+
# The Bazel flags below are the best we can do to optimize build speed, since caching on Travis
37+
# is suboptimal for various reasons (see https://kevin.burke.dev/kevin/bazel-tests-on-travis-ci/).
38+
script:
39+
- bazel --batch test //... --noshow_progress --test_output=errors

0 commit comments

Comments
 (0)