Skip to content

Commit 887da78

Browse files
committed
Revert "Enable remote Bazel cache through Google Cloud Storage"
This reverts commit 87b4de8.
1 parent 9a30730 commit 887da78

8 files changed

Lines changed: 121 additions & 84 deletions

File tree

.github/.bazelrc.local

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ startup --output_base=/tmp/bazel
44
# Set up caching on local disk so incremental builds are faster
55
# See https://bazel.build/designs/2016/09/30/repository-cache.html
66
build --repository_cache=~/.cache/bazel-repo
7+
test --repository_cache=~/.cache/bazel-repo
8+
# See https://docs.bazel.build/versions/master/remote-caching.html#disk-cache
9+
build --disk_cache=~/.cache/bazel-disk
10+
test --disk_cache=~/.cache/bazel-disk
711

812
# Make output easier to read
913
build --curses=no

.github/.bazelrc.windows.local

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# Use predefined path for building so we could cache `external/`.
22
startup --output_base=D:/_bazel
3-
4-
# Set up caching on local disk so incremental builds are faster
5-
# See https://bazel.build/designs/2016/09/30/repository-cache.html
3+
build --disk_cache=D:/_bazel-disk
64
build --repository_cache=D:/_bazel-repo

.github/actions/cache-bazel/action.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ inputs:
77
key:
88
description: Extra cache key
99
required: true
10-
gcs-key:
11-
description: GCS Key
12-
required: false
1310
runs:
1411
using: "composite"
1512
steps:
@@ -32,6 +29,7 @@ runs:
3229
D:\_bazel\external\bundle
3330
D:\_bazel\external\rules_ruby
3431
D:\_bazel\external\rules_ruby_dist
32+
D:\_bazel-disk
3533
D:\_bazel-repo
3634
key: ${{ runner.os }}-bazel-${{ inputs.workflow }}-${{ inputs.key }}-${{ hashFiles('**/BUILD.bazel') }}
3735
restore-keys: |
@@ -42,18 +40,9 @@ runs:
4240
with:
4341
path: |
4442
/tmp/bazel/external
43+
~/.cache/bazel-disk
4544
~/.cache/bazel-repo
4645
key: ${{ runner.os }}-bazel-${{ inputs.workflow }}-${{ inputs.key }}-${{ hashFiles('**/BUILD.bazel') }}
4746
restore-keys: |
4847
${{ runner.os }}-bazel-${{ inputs.workflow }}-${{ inputs.key }}-
4948
${{ runner.os }}-bazel-${{ inputs.workflow }}-
50-
- run: |
51-
echo '${{ inputs.gcs-key }}' >> gcs.json
52-
echo "build --remote_cache=https://storage.googleapis.com/seleniumhq-bazel-remote-cache --remote_upload_local_results=${{ github.ref == 'refs/heads/trunk' }} --google_credentials=gcs.json" >> .bazelrc
53-
if: inputs.gcs-key != '' && runner.os != 'Windows'
54-
shell: bash
55-
- run: |
56-
echo ${{ inputs.gcs-key }}>>gcs.json
57-
echo "build --remote_cache=https://storage.googleapis.com/seleniumhq-bazel-remote-cache --remote_upload_local_results=${{ github.ref == 'refs/heads/trunk' }} --google_credentials=gcs.json">>.bazelrc
58-
if: inputs.gcs-key != '' && runner.os == 'Windows'
59-
shell: cmd

.github/workflows/ci-dotnet.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ jobs:
4545
with:
4646
workflow: dotnet
4747
key: ${{ matrix.driver }}-${{ matrix.framework }}
48-
gcs-key: ${{ secrets.GOOGLE_CLOUD_STORAGE_KEY }}
4948
- name: Setup dotnet tests
5049
uses: ./.github/actions/bazel
5150
with:

.github/workflows/ci-java.yml

Lines changed: 64 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,14 @@ jobs:
3131
- name: Checkout source tree
3232
uses: actions/checkout@v3
3333
- name: Cache Bazel artifacts
34-
uses: ./.github/actions/cache-bazel
34+
uses: actions/cache@v3
3535
with:
36-
workflow: bazel
37-
key: build
38-
gcs-key: ${{ secrets.GOOGLE_CLOUD_STORAGE_KEY }}
36+
path: |
37+
~/.cache/bazel-disk
38+
~/.cache/bazel-repo
39+
key: ${{ runner.os }}-bazel-build-${{ hashFiles('**/BUILD.bazel') }}
40+
restore-keys: |
41+
${{ runner.os }}-bazel-build-
3942
- name: Setup Java
4043
uses: actions/setup-java@v3
4144
with:
@@ -56,11 +59,15 @@ jobs:
5659
with:
5760
fetch-depth: 0
5861
- name: Cache Bazel artifacts
59-
uses: ./.github/actions/cache-bazel
62+
uses: actions/cache@v3
6063
with:
61-
workflow: bazel
62-
key: small-tests
63-
gcs-key: ${{ secrets.GOOGLE_CLOUD_STORAGE_KEY }}
64+
path: |
65+
~/.cache/bazel-disk
66+
~/.cache/bazel-repo
67+
key: ${{ runner.os }}-bazel-small-tests-${{ hashFiles('**/BUILD.bazel') }}
68+
restore-keys: |
69+
${{ runner.os }}-bazel-small-tests-
70+
${{ runner.os }}-bazel-build-
6471
- name: Setup Java
6572
uses: actions/setup-java@v3
6673
with:
@@ -86,11 +93,15 @@ jobs:
8693
with:
8794
fetch-depth: 0
8895
- name: Cache Bazel artifacts
89-
uses: ./.github/actions/cache-bazel
96+
uses: actions/cache@v3
9097
with:
91-
workflow: bazel
92-
key: medium-tests
93-
gcs-key: ${{ secrets.GOOGLE_CLOUD_STORAGE_KEY }}
98+
path: |
99+
~/.cache/bazel-disk
100+
~/.cache/bazel-repo
101+
key: ${{ runner.os }}-bazel-medium-tests-${{ hashFiles('**/BUILD.bazel') }}
102+
restore-keys: |
103+
${{ runner.os }}-bazel-medium-tests-
104+
${{ runner.os }}-bazel-build-
94105
- name: Setup Java
95106
uses: actions/setup-java@v3
96107
with:
@@ -110,11 +121,15 @@ jobs:
110121
- name: Checkout source tree
111122
uses: actions/checkout@v3
112123
- name: Cache Bazel artifacts
113-
uses: ./.github/actions/cache-bazel
124+
uses: actions/cache@v3
114125
with:
115-
workflow: bazel
116-
key: lint
117-
gcs-key: ${{ secrets.GOOGLE_CLOUD_STORAGE_KEY }}
126+
path: |
127+
~/.cache/bazel-disk
128+
~/.cache/bazel-repo
129+
key: ${{ runner.os }}-bazel-lint-${{ hashFiles('**/BUILD.bazel') }}
130+
restore-keys: |
131+
${{ runner.os }}-bazel-lint-
132+
${{ runner.os }}-bazel-build-
118133
- name: Setup Java
119134
uses: actions/setup-java@v3
120135
with:
@@ -141,11 +156,15 @@ jobs:
141156
- name: Checkout source tree
142157
uses: actions/checkout@v3
143158
- name: Cache Bazel artifacts
144-
uses: ./.github/actions/cache-bazel
159+
uses: actions/cache@v3
145160
with:
146-
workflow: bazel
147-
key: ${{ matrix.browser }}-tests
148-
gcs-key: ${{ secrets.GOOGLE_CLOUD_STORAGE_KEY }}
161+
path: |
162+
~/.cache/bazel-disk
163+
~/.cache/bazel-repo
164+
key: ${{ runner.os }}-bazel-${{ matrix.browser }}-tests-${{ hashFiles('**/BUILD.bazel') }}
165+
restore-keys: |
166+
${{ runner.os }}-bazel-${{ matrix.browser }}-tests-
167+
${{ runner.os }}-bazel-build-
149168
- name: Setup Fluxbox
150169
run: sudo apt-get -y install fluxbox
151170
- name: Setup Java
@@ -194,11 +213,16 @@ jobs:
194213
- name: Checkout source tree
195214
uses: actions/checkout@v3
196215
- name: Cache Bazel artifacts
197-
uses: ./.github/actions/cache-bazel
216+
uses: actions/cache@v3
198217
with:
199-
workflow: bazel
200-
key: ${{ matrix.browser }}-server-tests
201-
gcs-key: ${{ secrets.GOOGLE_CLOUD_STORAGE_KEY }}
218+
path: |
219+
~/.cache/bazel-disk
220+
~/.cache/bazel-repo
221+
key: ${{ runner.os }}-bazel-${{ matrix.browser }}-server-tests-${{ hashFiles('**/BUILD.bazel') }}
222+
restore-keys: |
223+
${{ runner.os }}-bazel-${{ matrix.browser }}-server-tests-
224+
${{ runner.os }}-bazel-${{ matrix.browser }}-tests-
225+
${{ runner.os }}-bazel-build-
202226
- name: Setup Fluxbox
203227
run: sudo apt-get -y install fluxbox
204228
- name: Setup Java
@@ -239,11 +263,15 @@ jobs:
239263
- name: Checkout source tree
240264
uses: actions/checkout@v3
241265
- name: Cache Bazel artifacts
242-
uses: ./.github/actions/cache-bazel
266+
uses: actions/cache@v3
243267
with:
244-
workflow: bazel
245-
key: firefox-tests
246-
gcs-key: ${{ secrets.GOOGLE_CLOUD_STORAGE_KEY }}
268+
path: |
269+
~/.cache/bazel-disk
270+
~/.cache/bazel-repo
271+
key: ${{ runner.os }}-bazel-firefox-tests-${{ hashFiles('**/BUILD.bazel') }}
272+
restore-keys: |
273+
${{ runner.os }}-bazel-firefox-tests-
274+
${{ runner.os }}-bazel-build-
247275
- name: Setup Fluxbox
248276
run: sudo apt-get -y install fluxbox
249277
- name: Setup Java
@@ -278,11 +306,15 @@ jobs:
278306
- name: Checkout source tree
279307
uses: actions/checkout@v3
280308
- name: Cache Bazel artifacts
281-
uses: ./.github/actions/cache-bazel
309+
uses: actions/cache@v3
282310
with:
283-
workflow: bazel
284-
key: firefox-tests
285-
gcs-key: ${{ secrets.GOOGLE_CLOUD_STORAGE_KEY }}
311+
path: |
312+
~/.cache/bazel-disk
313+
~/.cache/bazel-repo
314+
key: ${{ runner.os }}-bazel-firefox-tests-${{ hashFiles('**/BUILD.bazel') }}
315+
restore-keys: |
316+
${{ runner.os }}-bazel-firefox-tests-
317+
${{ runner.os }}-bazel-build-
286318
- name: Setup Java
287319
uses: actions/setup-java@v3
288320
with:

.github/workflows/ci-javascript.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,15 @@ jobs:
3434
- name: Checkout source tree
3535
uses: actions/checkout@v3
3636
- name: Cache Bazel artifacts
37-
uses: ./.github/actions/cache-bazel
37+
uses: actions/cache@v3
3838
with:
39-
workflow: bazel
40-
key: node-tests
41-
gcs-key: ${{ secrets.GOOGLE_CLOUD_STORAGE_KEY }}
39+
path: |
40+
~/.cache/bazel-disk
41+
~/.cache/bazel-repo
42+
key: ${{ runner.os }}-bazel-node-tests-${{ hashFiles('**/BUILD.bazel') }}
43+
restore-keys: |
44+
${{ runner.os }}-bazel-node-tests-
45+
${{ runner.os }}-bazel-build-
4246
- name: Setup Node.js
4347
uses: actions/setup-node@v1
4448
with:
@@ -82,11 +86,14 @@ jobs:
8286
- name: Checkout source tree
8387
uses: actions/checkout@v3
8488
- name: Cache Bazel artifacts
85-
uses: ./.github/actions/cache-bazel
89+
uses: actions/cache@v3
8690
with:
87-
workflow: bazel
88-
key: atom-firefox-tests
89-
gcs-key: ${{ secrets.GOOGLE_CLOUD_STORAGE_KEY }}
91+
path: |
92+
~/.cache/bazel-disk
93+
~/.cache/bazel-repo
94+
key: ${{ runner.os }}-bazel-atom-firefox-tests-${{ hashFiles('**/BUILD.bazel') }}
95+
restore-keys: |
96+
${{ runner.os }}-bazel-atom-firefox-tests-
9097
- name: Setup Java
9198
uses: actions/setup-java@v3
9299
with:

.github/workflows/ci-python.yml

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,14 @@ jobs:
9090
- name: Checkout source tree
9191
uses: actions/checkout@v3
9292
- name: Cache Bazel artifacts
93-
uses: ./.github/actions/cache-bazel
94-
with:
95-
workflow: python
96-
key: unit-tests
97-
gcs-key: ${{ secrets.GOOGLE_CLOUD_STORAGE_KEY }}
93+
uses: actions/cache@v3
94+
with:
95+
path: |
96+
~/.cache/bazel-disk
97+
~/.cache/bazel-repo
98+
key: ${{ runner.os }}-bazel-python-unit-tests-${{ hashFiles('**/BUILD.bazel') }}
99+
restore-keys: |
100+
${{ runner.os }}-bazel-python-unit-tests-
98101
- name: Setup Java
99102
uses: actions/setup-java@v3
100103
with:
@@ -113,11 +116,15 @@ jobs:
113116
- name: Checkout source tree
114117
uses: actions/checkout@v3
115118
- name: Cache Bazel artifacts
116-
uses: ./.github/actions/cache-bazel
117-
with:
118-
workflow: python
119-
key: chrome-tests
120-
gcs-key: ${{ secrets.GOOGLE_CLOUD_STORAGE_KEY }}
119+
uses: actions/cache@v3
120+
with:
121+
path: |
122+
~/.cache/bazel-disk
123+
~/.cache/bazel-repo
124+
key: ${{ runner.os }}-bazel-chrome-tests-${{ hashFiles('**/BUILD.bazel') }}
125+
restore-keys: |
126+
${{ runner.os }}-bazel-chrome-tests-
127+
${{ runner.os }}-bazel-python-unit-tests-
121128
- name: Setup Fluxbox
122129
run: sudo apt-get -y install fluxbox
123130
- name: Setup Chrome
@@ -142,11 +149,15 @@ jobs:
142149
- name: Checkout source tree
143150
uses: actions/checkout@v3
144151
- name: Cache Bazel artifacts
145-
uses: ./.github/actions/cache-bazel
146-
with:
147-
workflow: python
148-
key: firefox-tests
149-
gcs-key: ${{ secrets.GOOGLE_CLOUD_STORAGE_KEY }}
152+
uses: actions/cache@v3
153+
with:
154+
path: |
155+
~/.cache/bazel-disk
156+
~/.cache/bazel-repo
157+
key: ${{ runner.os }}-bazel-firefox-tests-${{ hashFiles('**/BUILD.bazel') }}
158+
restore-keys: |
159+
${{ runner.os }}-bazel-firefox-tests-
160+
${{ runner.os }}-bazel-python-unit-tests-
150161
- name: Setup Fluxbox
151162
run: sudo apt-get -y install fluxbox
152163
- name: Setup Java
@@ -178,11 +189,15 @@ jobs:
178189
- name: Checkout source tree
179190
uses: actions/checkout@v3
180191
- name: Cache Bazel artifacts
181-
uses: ./.github/actions/cache-bazel
182-
with:
183-
workflow: python
184-
key: firefox-tests
185-
gcs-key: ${{ secrets.GOOGLE_CLOUD_STORAGE_KEY }}
192+
uses: actions/cache@v3
193+
with:
194+
path: |
195+
~/.cache/bazel-disk
196+
~/.cache/bazel-repo
197+
key: ${{ runner.os }}-bazel-firefox-tests-${{ hashFiles('**/BUILD.bazel') }}
198+
restore-keys: |
199+
${{ runner.os }}-bazel-firefox-tests-
200+
${{ runner.os }}-bazel-python-unit-tests-
186201
- name: Setup Fluxbox
187202
run: sudo apt-get -y install fluxbox
188203
- name: Setup Java

0 commit comments

Comments
 (0)