From aae781531a874ae13ae85ec2f7cb1689d67b7010 Mon Sep 17 00:00:00 2001 From: Preston Van Loon Date: Sun, 8 Jul 2018 17:23:24 -0400 Subject: [PATCH] Use remote config for travis builds when possible (#241) * use remote config * fix bash Former-commit-id: 2a7b342baea6168970088d547313d7517ec0d6d9 [formerly d1adf6e65b1bb505eea12cf65499a72713621ca2] Former-commit-id: e0dba82a206e174178373561d497152e47300aaf --- .travis-bazelrc | 4 ++-- .travis.yml | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.travis-bazelrc b/.travis-bazelrc index 0e20226a82..a29988cfed 100644 --- a/.travis-bazelrc +++ b/.travis-bazelrc @@ -5,8 +5,8 @@ startup --host_jvm_args=-Xmx500m --host_jvm_args=-Xms500m build --spawn_strategy=standalone --genrule_strategy=standalone # Remote caching over Google Cloud Storage -#build --remote_http_cache=https://storage.googleapis.com/prysmatic-bazel-cache -#build --google_credentials=/tmp/service-account.json +build:remote --remote_http_cache=https://storage.googleapis.com/prysmatic-bazel-cache +build:remote --google_credentials=/tmp/service-account.json # Set some build options for travis container. build --local_resources=1536,1.5,0.5 diff --git a/.travis.yml b/.travis.yml index ebfde92aba..9d122b560b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,8 +42,11 @@ matrix: ./install.sh --user rm -f install.sh # Decrypt service account (only works on prysmaticlabs branches) - - if [[ $encrypted_64ca747eb448_iv ]]; then openssl aes-256-cbc -K $encrypted_64ca747eb448_key -iv $encrypted_64ca747eb448_iv - -in service-account.json.enc -out /tmp/service-account.json -d; fi + - if [[ $encrypted_64ca747eb448_iv ]]; then + openssl aes-256-cbc -K $encrypted_64ca747eb448_key -iv $encrypted_64ca747eb448_iv + -in service-account.json.enc -out /tmp/service-account.json -d; + REMOTE_FLAGS=--config=remote; + fi install: true # Skip install go packages. @@ -53,7 +56,7 @@ matrix: bazel \ --bazelrc=.travis-bazelrc \ test \ - //... + //... $REMOTE_FLAGS # Check that BUILD files are formatted correctly. - ./check_gazelle.sh