summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2020-08-19 17:03:21 -0700
committerAndrei Vagin <avagin@gmail.com>2020-09-09 17:53:10 -0700
commit59a394f856108dcb33f242a61ff6e1700161b4f3 (patch)
treeae991cb1778f4f86acdd066502a957a6fb300314 /.github/workflows
parent29fc0a272957105da566d17b1962322088864b6a (diff)
Run bazel build before deleting cached gopath files
bazel creates sysmlink to the cache on the first invokation. On a new clone, there are no symlink, thus `rm -rf bazel-bin/gopath` has no effect. Call `bazel build something` first, then delete cached gopath. PiperOrigin-RevId: 327536044
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/go.yml5
1 files changed, 5 insertions, 0 deletions
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 4da3853b2..b51c22158 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -49,7 +49,12 @@ jobs:
key: ${{ runner.os }}-bazel-${{ hashFiles('WORKSPACE') }}
restore-keys: |
${{ runner.os }}-bazel-
+ # Create gopath to merge the changes. The first execution will create
+ # symlinks to the cache, e.g. bazel-bin. Once the cache is setup, delete
+ # old gopath files that may exist from previous runs (and could contain
+ # files that are now deleted). Then run gopath again for good.
- run: |
+ make build TARGETS="//:gopath"
rm -rf bazel-bin/gopath
make build TARGETS="//:gopath"
- run: tools/go_branch.sh