File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
github-actions/bazel/setup Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1818 path : |
1919 ~/.cache/bazelisk
2020 ~/AppData/Local/bazelisk
21- key : bazel-version-${{ hashFiles('**/.bazelversion') }}
21+ key : bazel-version-v2- ${{ hashFiles('**/.bazelversion') }}
2222
2323 - name : Setup CI bazelrc config
2424 run : node $GITHUB_ACTION_PATH/setup-ci-bazelrc.mjs
3232 # Note: Bazel repository cache is located in system locations and cannot use
3333 # a shared cache between different runner operating systems.
3434 path : ' ~/.cache/bazel_repo_cache'
35- key : bazel-cache-${{ runner.os }}-${{ hashFiles('**/WORKSPACE') }}-${{ hashFiles('**/MODULE.bazel') }}
35+ key : bazel-cache-${{ runner.os }}-v2- ${{ hashFiles('**/WORKSPACE') }}-${{ hashFiles('**/MODULE.bazel') }}
3636 restore-keys : |
37- bazel-cache-${{ runner.os }}-
37+ bazel-cache-${{ runner.os }}-v2-
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import fs from 'fs';
77// in the bazelrc file need to be escaled as otherwise those would escape
88// followed characters that weren't supposed to be escaped.
99const cachePath = path . join ( os . homedir ( ) , '.cache/bazel_repo_cache' ) ;
10- const escapedCachePath = cachePath . replace ( / \\ / g, '\\\\ ' ) ;
10+ const escapedCachePath = cachePath . replace ( / \\ / g, '/ ' ) ;
1111
1212const bazelRcContent = `
1313# Print all the options that apply to the build.
@@ -16,7 +16,8 @@ const bazelRcContent = `
1616build --announce_rc
1717
1818# Avoids re-downloading NodeJS/browsers all the time.
19- build --repository_cache=${ escapedCachePath }
19+ # Replace path to make it compatable with WSL
20+ build --repository_cache=${ escapedCachePath . replace ( / c : \/ / i, '/mnt/c/' ) }
2021
2122# More details on failures
2223build --verbose_failures=true
You can’t perform that action at this time.
0 commit comments