Skip to content

Commit da57307

Browse files
authored
Merge pull request github#11483 from github/redsun82/cache
Swift: tentative fix for the bazel cache
2 parents e2e3667 + 47702b9 commit da57307

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

swift/actions/build-and-test/action.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,19 @@ runs:
1010
- name: Mount bazel cache
1111
uses: ./.github/actions/incremental-cache
1212
with:
13-
path: "~/.cache/bazel-repository-cache"
13+
path: bazel-repository-cache
1414
key: bazel-cache-${{ runner.os }}-${{ runner.arch }}
1515
- name: Mount bazel disk cache
1616
uses: ./.github/actions/incremental-cache
1717
with:
18-
path: "~/.cache/bazel-disk-cache"
18+
path: bazel-disk-cache
1919
key: bazel-disk-cache-${{ runner.os }}-${{ runner.arch }}
2020
- name: Configure bazel cache
2121
shell: bash
2222
run: |
23-
echo build --repository_cache=~/.cache/bazel-repository-cache --disk_cache=~/.cache/bazel-disk-cache > ~/.bazelrc
24-
echo test --test_output=errors >> ~/.bazelrc
23+
mkdir bazel-repository-cache bazel-disk-cache
24+
echo build --repository_cache=bazel-repository-cache --disk_cache=bazel-disk-cache > local.bazelrc
25+
echo test --test_output=errors >> local.bazelrc
2526
- name: Print unextracted entities
2627
shell: bash
2728
run: |
@@ -50,5 +51,5 @@ runs:
5051
if: ${{ github.event_name != 'pull_request' }}
5152
shell: bash
5253
run: |
53-
find "~/.cache/bazel-repository-cache" "~/.cache/bazel-disk-cache" -atime +0 -type f -delete || : # ignore errors if the cache is empty
54-
du -sh "~/.cache/bazel-repository-cache" "~/.cache/bazel-disk-cache" || : # ignore errors if the cache is empty
54+
find bazel-repository-cache bazel-disk-cache -atime +0 -type f -delete
55+
du -sh bazel-repository-cache bazel-disk-cache

0 commit comments

Comments
 (0)