-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to using
bazel-contrub/setup-bazel
- Loading branch information
Showing
6 changed files
with
38 additions
and
81 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 |
---|---|---|
|
@@ -20,22 +20,14 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: bazelbuild/setup-bazelisk@v2 | ||
|
||
- name: Mount bazel action cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: "~/.cache/bazel" | ||
key: bazel | ||
|
||
- name: Mount bazel repo cache | ||
uses: actions/cache@v2 | ||
- uses: bazel-contrib/[email protected] | ||
with: | ||
path: "~/.cache/bazel-repo" | ||
key: bazel-repo | ||
# Avoid downloading Bazel every time. | ||
bazelisk-cache: true | ||
# Store build cache per workflow. | ||
disk-cache: true | ||
# Share repository cache between workflows. | ||
repository-cache: true | ||
|
||
- name: bzlmod tests and lints | ||
env: | ||
# Bazelisk will download bazel to here, ensure it is cached between runs. | ||
XDG_CACHE_HOME: ~/.cache/bazel-repo | ||
run: (cd examples/tests_and_lints && bazel --bazelrc=../../.github/workflows/ci.bazelrc test --enable_bzlmod //...) |
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 |
---|---|---|
|
@@ -20,24 +20,16 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: bazelbuild/setup-bazelisk@v2 | ||
|
||
- name: Mount bazel action cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: "~/.cache/bazel" | ||
key: bazel | ||
|
||
- name: Mount bazel repo cache | ||
uses: actions/cache@v2 | ||
- uses: bazel-contrib/[email protected] | ||
with: | ||
path: "~/.cache/bazel-repo" | ||
key: bazel-repo | ||
|
||
# Avoid downloading Bazel every time. | ||
bazelisk-cache: true | ||
# Store build cache per workflow. | ||
disk-cache: true | ||
# Share repository cache between workflows. | ||
repository-cache: true | ||
|
||
- name: Run format | ||
env: | ||
# Bazelisk will download bazel to here, ensure it is cached between runs. | ||
XDG_CACHE_HOME: ~/.cache/bazel-repo | ||
run: ./tools/format.sh | ||
|
||
- name: Check no changes | ||
|
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 |
---|---|---|
|
@@ -27,22 +27,14 @@ jobs: | |
distribution: "zulu" | ||
java-version: "21" | ||
|
||
- uses: bazelbuild/setup-bazelisk@v2 | ||
|
||
# - name: Mount bazel action cache | ||
# uses: actions/cache@v2 | ||
# with: | ||
# path: "~/.cache/bazel" | ||
# key: bazel | ||
# | ||
# - name: Mount bazel repo cache | ||
# uses: actions/cache@v2 | ||
# with: | ||
# path: "~/.cache/bazel-repo" | ||
# key: bazel-repo | ||
- uses: bazel-contrib/[email protected] | ||
with: | ||
# Avoid downloading Bazel every time. | ||
bazelisk-cache: true | ||
# Store build cache per workflow. | ||
disk-cache: true | ||
# Share repository cache between workflows. | ||
repository-cache: true | ||
|
||
- name: bzlmod gazelle | ||
# env: | ||
# # Bazelisk will download bazel to here, ensure it is cached between runs. | ||
# XDG_CACHE_HOME: ~/.cache/bazel-repo | ||
run: (cd examples/gazelle && bazelisk --bazelrc=../../.github/workflows/ci.bazelrc run --enable_bzlmod //:gazelle && bazelisk --bazelrc=../../.github/workflows/ci.bazelrc test --enable_bzlmod //...) |
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
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 |
---|---|---|
|
@@ -35,22 +35,14 @@ jobs: | |
distribution: "zulu" | ||
java-version: "21" | ||
|
||
- uses: bazelbuild/setup-bazelisk@v2 | ||
|
||
- name: Mount bazel action cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: "~/.cache/bazel" | ||
key: bazel | ||
|
||
- name: Mount bazel repo cache | ||
uses: actions/cache@v2 | ||
- uses: bazel-contrib/[email protected] | ||
with: | ||
path: "~/.cache/bazel-repo" | ||
key: bazel-repo | ||
|
||
# Avoid downloading Bazel every time. | ||
bazelisk-cache: true | ||
# Store build cache per workflow. | ||
disk-cache: true | ||
# Share repository cache between workflows. | ||
repository-cache: true | ||
|
||
- name: bazel test //... (Java ${{ matrix.java-major-version }}) | ||
env: | ||
# Bazelisk will download bazel to here, ensure it is cached between runs. | ||
XDG_CACHE_HOME: ~/.cache/bazel-repo | ||
run: bazelisk --bazelrc=.github/workflows/ci.bazelrc test ${{ matrix.flags }} //... |
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 |
---|---|---|
|
@@ -27,22 +27,14 @@ jobs: | |
distribution: "zulu" | ||
java-version: "21" | ||
|
||
- uses: bazelbuild/setup-bazelisk@v2 | ||
|
||
- name: Mount bazel action cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: "~/.cache/bazel" | ||
key: bazel | ||
|
||
- name: Mount bazel repo cache | ||
uses: actions/cache@v2 | ||
- uses: bazel-contrib/[email protected] | ||
with: | ||
path: "~/.cache/bazel-repo" | ||
key: bazel-repo | ||
# Avoid downloading Bazel every time. | ||
bazelisk-cache: true | ||
# Store build cache per workflow. | ||
disk-cache: true | ||
# Share repository cache between workflows. | ||
repository-cache: true | ||
|
||
- name: bzlmod gazelle | ||
env: | ||
# Bazelisk will download bazel to here, ensure it is cached between runs. | ||
XDG_CACHE_HOME: ~/.cache/bazel-repo | ||
run: bazelisk --bazelrc=.github/workflows/ci.bazelrc test //java/gazelle/... |