Skip to content

Commit 221862a

Browse files
committed
switch CI to bazelisk
1 parent e4942db commit 221862a

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

.github/workflows/ci.yaml

+8-7
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,14 @@ jobs:
8888
apidiff -incompatible pkg.latest github.com/googleapis/gapic-showcase/client > diff.txt && cat diff.txt && ! [ -s diff.txt ]
8989
bazel-build:
9090
runs-on: ubuntu-latest
91-
env:
92-
USE_BAZEL_VERSION: 6.0.0
93-
container: gcr.io/gapic-images/googleapis:latest
94-
# Dockerfile for this image: https://github.com/googleapis/googleapis-discovery/blob/master/Dockerfile
9591
steps:
9692
- uses: actions/checkout@v4
97-
- name: Run bazel build
98-
run: bazelisk build '//...'
99-
- name: Run bazel test
93+
- uses: bazel-contrib/setup-bazel@0.8.1
94+
with:
95+
# Avoid downloading Bazel every time.
96+
bazelisk-cache: true
97+
# Store build cache per workflow.
98+
disk-cache: ${{ github.workflow }}
99+
# Share repository cache between workflows.
100+
repository-cache: true
100101
run: bazelisk test '//...'

.github/workflows/deps.yaml

+8-4
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@ jobs:
1414
outputs:
1515
changed: ${{ steps.update.outputs.changed }}
1616
runs-on: ubuntu-latest
17-
env:
18-
USE_BAZEL_VERSION: 6.0.0
19-
container: gcr.io/gapic-images/googleapis:latest
20-
# Dockerfile for this image: https://github.com/googleapis/googleapis-discovery/blob/master/Dockerfile
2117
steps:
2218
- uses: actions/checkout@v4
19+
- uses: bazel-contrib/setup-bazel@0.8.1
20+
with:
21+
# Avoid downloading Bazel every time.
22+
bazelisk-cache: true
23+
# Store build cache per workflow.
24+
disk-cache: ${{ github.workflow }}
25+
# Share repository cache between workflows.
26+
repository-cache: true
2327
- name: Run gazelle update-repos
2428
id: update
2529
run: |

0 commit comments

Comments
 (0)