@@ -60,39 +60,24 @@ jobs:
6060 with :
6161 go-version : ' 1.25'
6262
63- - name : Clean Go module cache
63+ - name : Clean Go module and build cache
6464 run : |
65- # Clean any existing Go module cache to avoid conflicts
65+ # Clean any existing Go module and build cache to avoid conflicts
6666 sudo rm -rf ~/go/pkg/mod || true
67+ sudo rm -rf ~/.cache/go-build || true
6768 mkdir -p ~/go/pkg/mod
69+ mkdir -p ~/.cache/go-build
70+ # Ensure proper permissions
6871 chmod -R 755 ~/go/pkg/mod
69-
70- - name : Cache Go modules
71- uses : actions/cache/restore@v4
72- with :
73- path : ~/go/pkg/mod
74- key : ${{ runner.os }}-gomod-${{ hashFiles('**/go.sum') }}
75- restore-keys : |
76- ${{ runner.os }}-gomod-
77- enableCrossOsArchive : false
78- fail-on-cache-miss : false
79-
80- - name : Cache Go build cache
81- uses : actions/cache/restore@v4
82- with :
83- path : ~/.cache/go-build
84- key : ${{ runner.os }}-gobuild-${{ github.sha }}
85- restore-keys : |
86- ${{ runner.os }}-gobuild-
87- enableCrossOsArchive : false
88- fail-on-cache-miss : false
72+ chmod -R 755 ~/.cache/go-build
8973
9074 - name : License cache
9175 uses : actions/cache/restore@v4
9276 with :
9377 path : .licensei.cache
94- key : license-v1-${{ hashFiles('**/go.sum') }}
78+ key : ci- license-v1-${{ hashFiles('**/go.sum') }}
9579 restore-keys : |
80+ ci-license-v1-
9681 license-v1-
9782 enableCrossOsArchive : false
9883 fail-on-cache-miss : false
@@ -131,20 +116,9 @@ jobs:
131116 run : |
132117 make test
133118
134- - name : Save Go modules cache
135- uses : actions/cache/save@v4
136- with :
137- path : ~/go/pkg/mod
138- key : ${{ runner.os }}-gomod-${{ hashFiles('**/go.sum') }}
139-
140- - name : Save Go build cache
141- uses : actions/cache/save@v4
142- with :
143- path : ~/.cache/go-build
144- key : ${{ runner.os }}-gobuild-${{ github.sha }}
145-
146119 - name : Save license cache
147120 uses : actions/cache/save@v4
148121 with :
149122 path : .licensei.cache
150- key : license-v1-${{ hashFiles('**/go.sum') }}
123+ key : ci-license-v1-${{ hashFiles('**/go.sum') }}
124+
0 commit comments