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

@@ -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 \