File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 99jobs :
1010 test :
1111 runs-on : ubuntu-latest
12+ env :
13+ cache-key : fuzzing
1214 steps :
1315 - name : Install Go
1416 uses : actions/setup-go@v5
1517 with :
1618 go-version : " 1.22"
19+ # The cache path may be different on different runners. GitHub may change
20+ # this in the future. So, we dynamically fetch it.
21+ - name : Get Go Cache Paths
22+ id : go-cache-paths
23+ run : |
24+ echo "::set-output name=go-build::$(go env GOCACHE)"
1725 - name : Checkout code
1826 uses : actions/checkout@v4
27+ - name : Restore Cache
28+ id : cache-restore
29+ uses : actions/cache/restore@v3
30+ with :
31+ path : ${{ steps.go-cache-paths.outputs.go-build }}
32+ key : ${{ env.cache-key }}
1933 - name : Fuzz
2034 run : make fuzz
35+ # Cannot overwrite the existing cache (id's are immutable) so we delete it.
36+ - name : Delete Previous Cache
37+ if : ${{ steps.cache-restore.outputs.cache-hit }}
38+ continue-on-error : true
39+ run : |
40+ gh extension install actions/gh-actions-cache
41+ gh actions-cache delete "${{ env.cache-key }}" --confirm
42+ env :
43+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
44+ # Saving the cache so that Fuzz testing can be additive to previous fuzz testing.
45+ - name : Save Cache
46+ uses : actions/cache/save@v3
47+ with :
48+ path : ${{ steps.go-cache-paths.outputs.go-build }}
49+ key : ${{ env.cache-key }}
You can’t perform that action at this time.
0 commit comments