-
Notifications
You must be signed in to change notification settings - Fork 509
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use setup-bazel action in GitHub Actions
- Loading branch information
Showing
2 changed files
with
11 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,20 +81,16 @@ jobs: | |
with: | ||
distribution: 'zulu' | ||
java-version: ${{ matrix.java }} | ||
- name: Mount bazel cache | ||
uses: actions/cache@v1 | ||
- name: Setup Bazel | ||
uses: bazel-contrib/[email protected] | ||
with: | ||
path: "/home/runner/.cache/bazel" | ||
key: bazel | ||
- name: Install bazel | ||
run: | | ||
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.1.0/bazelisk-linux-amd64" | ||
mkdir -p "${GITHUB_WORKSPACE}/bin/" | ||
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel" | ||
chmod +x "${GITHUB_WORKSPACE}/bin/bazel" | ||
# 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: Test | ||
run: | | ||
"${GITHUB_WORKSPACE}/bin/bazel" test //... | ||
run: bazelisk test //... | ||
- name: Build | ||
run: | | ||
"${GITHUB_WORKSPACE}/bin/bazel" build //... | ||
run: bazelisk build //... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.1.0 |