From 0d5e73c8b0035e94172cd81b269e07e1aac79fc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Barzowski?= Date: Mon, 9 Sep 2019 11:40:15 +0200 Subject: [PATCH] Check Bazel in Travis --- .travis.yml | 18 ++++++++++++++---- travisBazel.sh | 15 +++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100755 travisBazel.sh diff --git a/.travis.yml b/.travis.yml index 49c3477..5bcca3c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,22 @@ language: go sudo: false -go: - - 1.x - - 1.8.x - - tip +matrix: + include: + - go: 1.x + - go: 1.8.x + - go: tip + - name: "Bazel Check" + go: 1.x + script: ./travisBazel.sh + before_install: + - echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list + - curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add - + - sudo apt-get update && sudo apt-get install bazel + before_install: - go get github.com/axw/gocov/gocov - go get github.com/mattn/goveralls - if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi - go get github.com/sergi/go-diff/diffmatchpatch + script: ./travisBuild.sh diff --git a/travisBazel.sh b/travisBazel.sh new file mode 100755 index 0000000..2bfc793 --- /dev/null +++ b/travisBazel.sh @@ -0,0 +1,15 @@ +set -e +set -x + +# See: https://github.com/bazelbuild/rules_go#how-do-i-run-bazel-on-travis-ci +bazel --host_jvm_args=-Xmx500m \ + --host_jvm_args=-Xms500m \ + test \ + --spawn_strategy=standalone \ + --genrule_strategy=standalone \ + --test_strategy=standalone \ + --local_resources=1536,1.5,0.5 \ + --noshow_progress \ + --verbose_failures \ + --test_output=errors \ + //:go_default_test