-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
43 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Mobilecoin Go Binary Cache | ||
description: Standardized golang binary cache setup | ||
|
||
inputs: | ||
cache_buster: | ||
description: "string to make cache unique" | ||
required: false | ||
path: | ||
description: "path to mount cache" | ||
required: false | ||
default: | | ||
go_build_artifacts | ||
additional_keys: | ||
description: "additional values to add to the cache key" | ||
required: false | ||
default: "" | ||
|
||
outputs: | ||
cache-hit: | ||
description: "did we get a cache hit?" | ||
value: ${{ steps.cache.outputs.cache-hit }} | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Cache build binaries | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ inputs.path }} | ||
# Key is a hash of all the .go, .p files. | ||
# if code changes, invalidate cache and rebuild | ||
key: ${{ inputs.cache_buster }}${{ inputs.additional_keys }}-${{ runner.os }}-${{ hashFiles('**/*.go', 'go.mod', 'go.sum') }}-go-build-artifacts |