Skip to content

May as well try to use setup-go@v4 cache #7163

May as well try to use setup-go@v4 cache

May as well try to use setup-go@v4 cache #7163

Workflow file for this run

name: windows
on: push
# Prevent writing to the repository using the CI token.
# Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions
permissions: read-all
jobs:
test:
env:
DOWNLOAD_CACHE: 'd:\downloadcache'
# Improve performance by using GHA _temp directory.
# %USERPROFILE% seems to be really slow, especially for cache restores.
GOCACHE: 'd:\a\_temp\go\cache'
GOMODCACHE: 'd:\a\_temp\go\modcache'
runs-on: windows-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup-go
uses: actions/setup-go@v4
with:
go-version: '1.21.x'
cache: true
- name: windows-cache
uses: actions/cache@v3
with:
path: |
${{ env.DOWNLOAD_CACHE }}
key: ${{ runner.os }}-buf-windows-${{ hashFiles('windows/**') }}
restore-keys: |
${{ runner.os }}-buf-windows-
- name: test
shell: bash
run: ./windows/test.bash