File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5858 with :
5959 go-version : " 1.20"
6060
61+ - name : Cache Go modules
62+ uses : actions/cache@v4
63+ with :
64+ path : |
65+ ~/go/pkg/mod
66+ ~/.cache/go-build
67+ # Cache key based on go.sum; if go.sum changes, cache busts
68+ key : ${{ runner.os }}-go-${{ hashFiles(format('{0}/go.sum', inputs.package_path)) }}
69+ restore-keys : |
70+ ${{ runner.os }}-go-
71+
72+ - name : Prepare modules (populate go.sum)
73+ working-directory : ${{ inputs.package_path }}
74+ run : |
75+ # Ensure proxy/sumdb are available on GitHub-hosted runners
76+ go env -w GOPROXY=https://proxy.golang.org,direct
77+ go env -w GOSUMDB=sum.golang.org
78+ # Download all required modules to populate go.sum without modifying go.mod
79+ go mod download all
80+ # Optional: tighten graph and ensure 1.20 compatibility (may edit go.mod)
81+ # go mod tidy -compat=1.20
82+
6183 - name : Install mingw-w64 for CGO cross-compilation
6284 run : |
6385 sudo apt-get update
You can’t perform that action at this time.
0 commit comments