Skip to content

Commit

Permalink
Update go caching in github workflows (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
scudette authored Sep 6, 2021
1 parent bd93c66 commit 437c367
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,29 @@ jobs:
env:
cache-name: cache-node-modules
with:
path: ~/.npm
path: **/node_modules/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/cache@v2
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
%LocalAppData%\go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: npm install gui
run: |
cd gui/velociraptor/
Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,28 @@ jobs:
name: Windows Test
runs-on: windows-latest
steps:
- name: Set up Go 1.16
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
id: go

- uses: actions/cache@v2
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
%LocalAppData%\go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Check out code into the Go module directory
uses: actions/checkout@v2

Expand Down

0 comments on commit 437c367

Please sign in to comment.