Skip to content

Commit aee9eb3

Browse files
Enable Bazel build and repository caching in GitHub Actions workflow.
PiperOrigin-RevId: 966874211
1 parent 46e9c43 commit aee9eb3

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/build_and_test.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,18 @@ jobs:
1515
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
1616
- run: echo "🔎 The name of your branch is ${GITHUB_REF} and your repository is ${{ github.repository }}."
1717
- name: Check out repository code
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1919
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
2020
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
21+
- name: Setup Bazel
22+
uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0
23+
with:
24+
# Avoid downloading Bazel every time.
25+
bazelisk-cache: true
26+
# Store build cache per workflow.
27+
disk-cache: ${{ github.workflow }}
28+
# Share repository cache between workflows.
29+
repository-cache: true
2130
- name: Test LLVM build
2231
run: |
2332
cd ${{ github.workspace }}

0 commit comments

Comments
 (0)