Enable Remote Caching & Use Host GO Version (#578)

* Revert "Add Skip Coverage Condition in Coverage.sh (#416)"

This reverts commit 72a5dd1cf4.

* add coverage.sh back

* remote cache

* fixed formatting

* Add support for cache reads and writes

* trying to get this newline to not be escaped. please behave travis

* last attempt at new line...
This commit is contained in:
terence tsao 2018-09-26 17:08:00 -07:00 committed by Preston Van Loon
parent 542ddef9e8
commit c73f4c0fd3
2 changed files with 26 additions and 17 deletions

View File

@ -1,9 +1,12 @@
startup --host_jvm_args=-Xmx500m --host_jvm_args=-Xms500m
# Remote caching over Google Cloud Storage
# TODO(#282): Enable remote caching/execution
#build:remote --remote_http_cache=https://storage.googleapis.com/prysmatic-bazel-cache
#build:remote --google_credentials=/tmp/service-account.json
# Read-only
build:remote --remote_http_cache=https://storage.googleapis.com/prysmatic-bazel-cache
build:remote --remote_upload_local_results=false
# Read-write (prysmatic branches only)
build:remote-rw --remote_http_cache=https://storage.googleapis.com/prysmatic-bazel-cache
build:remote-rw --google_credentials=/tmp/service-account.json
# Set some build options for travis container.
build --local_resources=1536,1.5,0.5

View File

@ -27,6 +27,8 @@ matrix:
before_install:
# Install Bazel
- |
echo "" >> WORKSPACE
echo "go_register_toolchains(go_version = \"host\")" >> WORKSPACE
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
OS=darwin
else
@ -39,12 +41,13 @@ matrix:
./install.sh --user
rm -f install.sh
# Decrypt service account (only works on prysmaticlabs branches)
# TODO(#282): enable remote caching / execution
#- 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
- 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-rw;
else
REMOTE_FLAGS=--config=remote;
fi
install: true # Skip install go packages.
@ -54,7 +57,7 @@ matrix:
bazel \
--bazelrc=.travis-bazelrc \
build \
//...
//... $REMOTE_FLAGS
# Run all tests.
- |
bazel \
@ -75,6 +78,8 @@ matrix:
before_install:
# Install Bazel
- |
echo "" >> WORKSPACE
echo "go_register_toolchains(go_version = \"host\")" >> WORKSPACE
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
OS=darwin
else
@ -87,12 +92,13 @@ matrix:
./install.sh --user
rm -f install.sh
# Decrypt service account (only works on prysmaticlabs branches)
# TODO(#282): enable remote caching / execution
#- 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
- 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-rw;
else
REMOTE_FLAGS=--config=remote;
fi
install: true # Skip install go packages.
@ -102,7 +108,7 @@ matrix:
bazel \
--bazelrc=.travis-bazelrc \
build \
//...
//... $REMOTE_FLAGS
# Run all tests.
- |
bazel \