summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2020-08-19 17:03:21 -0700
committergVisor bot <gvisor-bot@google.com>2020-08-19 17:05:45 -0700
commit25babd63519151eb6e70d847d8fd0172c1d7090f (patch)
treeae991cb1778f4f86acdd066502a957a6fb300314 /.github/workflows
parentf8a9483002a31eb96f99c93a77293ade35a8da5a (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