From 7229db3271752f0b70a255306577cd8fcd68a8ab Mon Sep 17 00:00:00 2001 From: Preston Van Loon Date: Sat, 7 Jul 2018 16:01:58 -0400 Subject: [PATCH] Bazel cache for travis (#236) * use google cloud storage for remote caching * install gcloud * poke readme to kick travis * Remove cache thing * unpoke README * remove tabs from copy paste * fix more tabs... what happened? * fix formatting i think * parsable yml * try to cache the cloud sdk tools * add gcloud to path * dont need gcloud * move service account to home directory * lets try tmp directory Former-commit-id: 0e844dc112bf6a78e0f3c24eb1ca4ce1ba4f376a [formerly c8106e91a46e7db40710f637bab3658fa9686cc4] Former-commit-id: f9c69ca80a9a110568bf932eb913f3408f953e56 --- .travis-bazelrc | 8 +++++--- .travis.yml | 4 ++++ service-account.json.enc | Bin 0 -> 2352 bytes 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 service-account.json.enc diff --git a/.travis-bazelrc b/.travis-bazelrc index 18214aed1..9ef93c841 100644 --- a/.travis-bazelrc +++ b/.travis-bazelrc @@ -1,15 +1,17 @@ -# TODO: Set up remote caching. - startup --host_jvm_args=-Xmx500m --host_jvm_args=-Xms500m # Disable sandboxing since it may fail inside of Travis' containers because the # mount system call is not permitted. 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 + # Set some build options for travis container. build --local_resources=1536,1.5,0.5 build --noshow_progress build --verbose_failures build --sandbox_debug build --test_output=errors -build --flaky_test_attempts=5 \ No newline at end of file +build --flaky_test_attempts=5 diff --git a/.travis.yml b/.travis.yml index 86748b84d..a561496ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ matrix: - os: linux env: V=0.15.0 before_install: + # Install Bazel - | if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then OS=darwin @@ -40,6 +41,9 @@ matrix: chmod +x install.sh ./install.sh --user rm -f install.sh + # Decrypt service account + - openssl aes-256-cbc -K $encrypted_64ca747eb448_key -iv $encrypted_64ca747eb448_iv + -in service-account.json.enc -out /tmp/service-account.json -d install: true # Skip install go packages. diff --git a/service-account.json.enc b/service-account.json.enc new file mode 100644 index 0000000000000000000000000000000000000000..0c3e9f716346bed245e7222586730ea6cdfc80b0 GIT binary patch literal 2352 zcmV-03D5S#{Jui)uW1#JZG&e&m}Q&G0DRM+&e&nJ3bC%(74OJr|H{o^ikDUls71{y zvq=-X%cuQ)lTF*qlg?O+lvUaTthN2`!yU{0K1KlKPKt&;O-U-1Zov);-%lM=nE^00 zzexLzoF3aTPh|8nmX^8y5Z(QH$HPRE#e+z5{Io0LycJ3MPqQr5PAoI}UA)jK!!C9?c^PSe!l;K*^ zn%Y3E%PfP^$GI_d@Rl6N=MIDqoGZ4ML<<$a1IQeB@29Ddm{p?AEoRbB-RW!GifLFu ziMWk_V32%uV=CFLs_kgs`j$}J*t9}-+bFy4zGRN zSym%Q{=_CcQ~u8*VNA4+Bt=!e*>KMoAiy=Hz=!5>ojFnZ0?+fEX6zSf<_#c_zN3su zFN)i{Y`y=6a5aYsDiHT;Z}`j~VI*=KHEYLxP!*e3Rt}V5F$jA^RTZ9@}s`l^~Fo z-iBp}5tKJ!6?Z*Vx9D0p(TnX~o?}#vn2C~yzu>zQbzz?JyjKL?bHo6&EzfM$^NK)R zB|d#BB{|z1;qOaO!jOHd0G7iG{H$IvTJtMK4plc1t+Mqnd{R^AZ-y0VRb|2nNGgL- z%exMh*0M|ZbI%Ml{Dhhufa-t%8YeQ#A*=UPhjEj;jd*+|}g)`&U`!fjZ-bk~Sg&{1I zoqBrgaG!V~vw(CwZ6YB)N^blWrtST$SyLhR08YhBGJTE>3SNZViS4o<6@ zCi710!4~duK=xeKdlI3qS*T~L$N*=E`K(d_L_)zXrM%ZE7~u+Np0;c34`EU>1{3{^ zLnlBy%__kmXEfjP40!;Bqpx+8HxMGGP6y zL0wT)50?o!Zd+emsi8+zl2Hh*pIISWPQ|Y)O4q(eRRKzGq&kt_lqSM>1V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