Skip to content

Commit

Permalink
Switch from setup-bazelisk to setup-bazel
Browse files Browse the repository at this point in the history
bazelbuild/setup-bazelisk is deprecated as per the [repo][1]:

> setup-bazelisk has been superseded by setup-bazel and all maintenance and
> support has ceased. setup-bazelisk will remain on GitHub indefinitely, but
> will almost certainly stop working someday, so if your GitHub Actions
> workflows use setup-bazelisk, please migrate them to setup-bazel.

Configuration syntax for setup-bazel taken from its [repo][2].

[1]: https://github.com/bazelbuild/setup-bazelisk?tab=readme-ov-file
[2]: https://github.com/bazel-contrib/setup-bazel?tab=readme-ov-file#usage
  • Loading branch information
mbrukman committed Mar 24, 2024
1 parent 074ef49 commit 78d8d7c
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/bazel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,14 @@ jobs:
with:
go-version: '${{ matrix.go }}'

- name: Setup Bazelisk
uses: bazelbuild/setup-bazelisk@v2

- name: Setup cache
uses: actions/cache@v4
- uses: bazel-contrib/setup-bazel@0.8.1
with:
path: "~/.cache/bazel"
key: os-${{ runner.os }}-bazel-${{ matrix.bazel }}-workspace-${{ hashFiles('**/WORKSPACE') }}
restore-keys: |
os-${{ runner.os }}-bazel-${{ matrix.bazel }}-workspace-
os-${{ runner.os }}-bazel-
os-${{ runner.os }}-
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true

- name: Verify Bazel installation
run: bazel version
Expand Down

0 comments on commit 78d8d7c

Please sign in to comment.