Skip to content

Commit

Permalink
Use a disk cache on windows
Browse files Browse the repository at this point in the history
Building on windows currently takes a long time (> 2h) and fails eventually when the connection to
the build event upload service is closed.

Using a disk_cache which is stored in Github's action cache hopefully avoids
building stackage libraries every time.

Currently the cache key depends on the hash of the `stackage_snapshot.yaml` file, so it is
evicted whenever that file changes. There is no cache cleanup done currently.
  • Loading branch information
avdv committed Aug 3, 2023
1 parent 9353098 commit cbb6875
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .bazelrc.common
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ build:ci-common --experimental_repository_cache_hardlinks

# Use a remote cache during CI
build:ci-windows-bindist --bes_upload_mode=wait_for_upload_complete --bes_timeout=60s
build:ci-windows-bindist --disk_cache=.bazel-cache/disk
build:remote-cache --remote_cache=grpcs://remote.buildbuddy.io
build:ci-common --remote_timeout=3600
# Avoid failures of the form `deadline exceeded after 14999958197ns DEADLINE_EXCEEDED`.
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ jobs:
sudo apt clean
docker rmi $(docker images -q) -f
- uses: actions/checkout@v3
- name: Add disk cache
uses: actions/cache@v3
with:
path: .bazel-cache/disk
key: disk-cache-${{ runner.os }}-${{ hashFiles('stackage_snapshot.yaml') }}
- name: Mount Bazel cache
uses: actions/cache@v3
with:
Expand Down

0 comments on commit cbb6875

Please sign in to comment.