Skip to content

Commit

Permalink
[CI] Attempt to correct the location of local Bazel cache on Windows …
Browse files Browse the repository at this point in the history
…(issue \#75).

PiperOrigin-RevId: 373435674
  • Loading branch information
agutkin authored and copybara-github committed May 12, 2021
1 parent e8448ea commit 4917543
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,18 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Update environment variables
# See https://docs.bazel.build/versions/master/output_directories.html
run: |
echo "BAZEL_CACHE_DIR=$env:USERPROFILE\_bazel_$env:USERNAME" >> $env:GITHUB_ENV
- name: Mount bazel cache
uses: actions/cache@v2
# Note: Note that below the version is pinned to `v2.1.4`. This is due to
# several path bugs. See:
# https://stackoverflow.com/questions/66870002/github-actions-cache-maven-m2-repository-on-windows-environment-c-users-run
uses: actions/[email protected]
with:
# See https://docs.bazel.build/versions/master/output_directories.html
path: ${{ github.workspace }}/.cache/bazel
path: ${{ env.BAZEL_CACHE_DIR}}
key: ${{ runner.os }}-bazel-${{ hashFiles('WORKSPACE.bazel') }}
restore-keys: ${{ runner.os }}-bazel

Expand Down

0 comments on commit 4917543

Please sign in to comment.