Skip to content

Commit

Permalink
Store bazel cache so recompile is faster
Browse files Browse the repository at this point in the history
  • Loading branch information
shkoo committed Aug 21, 2024
1 parent 8a29839 commit 0e807bf
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ jobs:
- os: Linux
config: --config=ci
steps:
# Flush bazel cache once per week
- name: Get current week
id: get-week
run: echo "week=$(/bin/date -u "+$Y-%w")" >> $GITHUB_OUTPUT
shell: bash
- name: Bazel cache
uses: actions/cache@v3
with:
# This is the directory for ephemeral runners; non-ephemeral runners (e.g. macos)
# store it in a different place where it isn't affected by actions/cache.
path: ~/.cache/bazel
key: bazel-${{ runner.os }}-${{ steps.get-week.outputs.week }}
- uses: actions/checkout@v3
- uses: ./.github/actions/bazelisk
- name: Build & test
Expand Down

0 comments on commit 0e807bf

Please sign in to comment.