Skip to content

Commit e62a95a

Browse files
committed
ci: remove go1.15 from the build matrix
This means we now template pkg builtins based on the latest go1.16, currently go1.16.10 Also bump to using the latest major version of actions/cache@v2 in case there are some benefits that improve build times. Signed-off-by: Paul Jolly <[email protected]> Change-Id: Ic7102f678492067234bddd29e7a507c8b5fa9bcc Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/528120 Reviewed-by: Marcel van Lohuizen <[email protected]>
1 parent f880467 commit e62a95a

File tree

4 files changed

+31
-37
lines changed

4 files changed

+31
-37
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ jobs:
3333
fail-fast: false
3434
matrix:
3535
go-version:
36-
- 1.15.15
3736
- 1.16.10
3837
- 1.17.3
3938
os:
@@ -61,15 +60,15 @@ jobs:
6160
- name: Checkout code
6261
uses: actions/checkout@v2
6362
- name: Cache Go modules
64-
uses: actions/cache@v1
63+
uses: actions/cache@v2
6564
with:
6665
path: ~/go/pkg/mod
6766
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
6867
restore-keys: ${{ runner.os }}-${{ matrix.go-version }}-go-
6968
- if: ${{ github.ref == 'refs/heads/master' }}
7069
name: Set go build tags
7170
run: go env -w GOFLAGS=-tags=long
72-
- if: matrix.go-version == '1.15.15' && matrix.os != 'windows-2019'
71+
- if: matrix.go-version == '1.16.10' && matrix.os != 'windows-2019'
7372
name: Generate
7473
run: go generate ./...
7574
- name: Test

cmd/cue/cmd/testdata/script/cmd_github.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ jobs:
176176
fail-fast: false
177177
matrix:
178178
go-version:
179-
- 1.15.15
180179
- 1.16.10
181180
- 1.17.3
182181
os:
@@ -204,15 +203,15 @@ jobs:
204203
- name: Checkout code
205204
uses: actions/checkout@v2
206205
- name: Cache Go modules
207-
uses: actions/cache@v1
206+
uses: actions/cache@v2
208207
with:
209208
path: ~/go/pkg/mod
210209
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
211210
restore-keys: ${{ runner.os }}-${{ matrix.go-version }}-go-
212211
- if: ${{ github.ref == 'refs/heads/master' }}
213212
name: Set go build tags
214213
run: go env -w GOFLAGS=-tags=long
215-
- if: matrix.go-version == '1.15.15' && matrix.os != 'windows-2019'
214+
- if: matrix.go-version == '1.16.10' && matrix.os != 'windows-2019'
216215
name: Generate
217216
run: go generate ./...
218217
- name: Test
@@ -1347,8 +1346,8 @@ _#step: ((_#job & {
13471346
steps: _
13481347
}).steps & [_])[0]
13491348

1350-
// We use the latest go1.15 for code generation
1351-
_#codeGenGo: "1.15.15"
1349+
// We use the latest go1.16 for code generation
1350+
_#codeGenGo: "1.16.10"
13521351

13531352
// Use a specific latest version for release builds
13541353
_#latestStableGo: "1.17.3"
@@ -1358,7 +1357,7 @@ _#windowsMachine: "windows-2019"
13581357
_#testStrategy: {
13591358
"fail-fast": false
13601359
matrix: {
1361-
"go-version": [_#codeGenGo, "1.16.10", _#latestStableGo]
1360+
"go-version": [_#codeGenGo, _#latestStableGo]
13621361
os: [_#linuxMachine, _#macosMachine, _#windowsMachine]
13631362
}
13641363
}
@@ -1381,7 +1380,7 @@ _#checkoutCode: _#step & {
13811380
}
13821381
_#cacheGoModules: _#step & {
13831382
name: "Cache Go modules"
1384-
uses: "actions/cache@v1"
1383+
uses: "actions/cache@v2"
13851384
with: {
13861385
path: "~/go/pkg/mod"
13871386
key: "${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}"

cue/testdata/eval/github.txtar

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ _#step: ((_#job & {
259259
steps: _
260260
}).steps & [_])[0]
261261

262-
// We use the latest go1.15 for code generation
263-
_#codeGenGo: "1.15.15"
262+
// We use the latest go1.16 for code generation
263+
_#codeGenGo: "1.16.10"
264264

265265
// Use a specific latest version for release builds
266266
_#latestStableGo: "1.17.3"
@@ -270,7 +270,7 @@ _#windowsMachine: "windows-2019"
270270
_#testStrategy: {
271271
"fail-fast": false
272272
matrix: {
273-
"go-version": [_#codeGenGo, "1.16.10", _#latestStableGo]
273+
"go-version": [_#codeGenGo, _#latestStableGo]
274274
os: [_#linuxMachine, _#macosMachine, _#windowsMachine]
275275
}
276276
}
@@ -293,7 +293,7 @@ _#checkoutCode: _#step & {
293293
}
294294
_#cacheGoModules: _#step & {
295295
name: "Cache Go modules"
296-
uses: "actions/cache@v1"
296+
uses: "actions/cache@v2"
297297
with: {
298298
path: "~/go/pkg/mod"
299299
key: "${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}"
@@ -1087,9 +1087,8 @@ import "strings"
10871087
"fail-fast": (bool){ false }
10881088
matrix: (#struct){
10891089
"go-version": (#list){
1090-
0: (string){ "1.15.15" }
1091-
1: (string){ "1.16.10" }
1092-
2: (string){ "1.17.3" }
1090+
0: (string){ "1.16.10" }
1091+
1: (string){ "1.17.3" }
10931092
}
10941093
os: (#list){
10951094
0: (string){ "ubuntu-18.04" }
@@ -1118,7 +1117,7 @@ import "strings"
11181117
}
11191118
3: (#struct){
11201119
name: (string){ "Cache Go modules" }
1121-
uses: (string){ "actions/cache@v1" }
1120+
uses: (string){ "actions/cache@v2" }
11221121
with: (#struct){
11231122
path: (string){ "~/go/pkg/mod" }
11241123
key: (string){ "${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}" }
@@ -1134,7 +1133,7 @@ import "strings"
11341133
5: (#struct){
11351134
name: (string){ "Generate" }
11361135
run: (string){ "go generate ./..." }
1137-
if: (string){ "matrix.go-version == '1.15.15' && matrix.os != 'windows-2019'" }
1136+
if: (string){ "matrix.go-version == '1.16.10' && matrix.os != 'windows-2019'" }
11381137
}
11391138
6: (#struct){
11401139
name: (string){ "Test" }
@@ -1668,9 +1667,8 @@ import "strings"
16681667
"fail-fast": (bool){ false }
16691668
matrix: (#struct){
16701669
"go-version": (#list){
1671-
0: (string){ "1.15.15" }
1672-
1: (string){ "1.16.10" }
1673-
2: (string){ "1.17.3" }
1670+
0: (string){ "1.16.10" }
1671+
1: (string){ "1.17.3" }
16741672
}
16751673
os: (#list){
16761674
0: (string){ "ubuntu-18.04" }
@@ -1699,7 +1697,7 @@ import "strings"
16991697
}
17001698
3: (#struct){
17011699
name: (string){ "Cache Go modules" }
1702-
uses: (string){ "actions/cache@v1" }
1700+
uses: (string){ "actions/cache@v2" }
17031701
with: (#struct){
17041702
path: (string){ "~/go/pkg/mod" }
17051703
key: (string){ "${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}" }
@@ -1715,7 +1713,7 @@ import "strings"
17151713
5: (#struct){
17161714
name: (string){ "Generate" }
17171715
run: (string){ "go generate ./..." }
1718-
if: (string){ "matrix.go-version == '1.15.15' && matrix.os != 'windows-2019'" }
1716+
if: (string){ "matrix.go-version == '1.16.10' && matrix.os != 'windows-2019'" }
17191717
}
17201718
6: (#struct){
17211719
name: (string){ "Test" }
@@ -2236,7 +2234,7 @@ import "strings"
22362234
}
22372235
_#step(:ci): (#struct){
22382236
}
2239-
_#codeGenGo(:ci): (string){ "1.15.15" }
2237+
_#codeGenGo(:ci): (string){ "1.16.10" }
22402238
_#latestStableGo(:ci): (string){ "1.17.3" }
22412239
_#linuxMachine(:ci): (string){ "ubuntu-18.04" }
22422240
_#macosMachine(:ci): (string){ "macos-10.15" }
@@ -2245,9 +2243,8 @@ import "strings"
22452243
"fail-fast": (bool){ false }
22462244
matrix: (#struct){
22472245
"go-version": (#list){
2248-
0: (string){ "1.15.15" }
2249-
1: (string){ "1.16.10" }
2250-
2: (string){ "1.17.3" }
2246+
0: (string){ "1.16.10" }
2247+
1: (string){ "1.17.3" }
22512248
}
22522249
os: (#list){
22532250
0: (string){ "ubuntu-18.04" }
@@ -2278,7 +2275,7 @@ import "strings"
22782275
}
22792276
_#cacheGoModules(:ci): (#struct){
22802277
name: (string){ "Cache Go modules" }
2281-
uses: (string){ "actions/cache@v1" }
2278+
uses: (string){ "actions/cache@v2" }
22822279
with: (#struct){
22832280
path: (string){ "~/go/pkg/mod" }
22842281
key: (string){ "${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}" }
@@ -2288,7 +2285,7 @@ import "strings"
22882285
_#goGenerate(:ci): (#struct){
22892286
name: (string){ "Generate" }
22902287
run: (string){ "go generate ./..." }
2291-
if: (string){ "matrix.go-version == '1.15.15' && matrix.os != 'windows-2019'" }
2288+
if: (string){ "matrix.go-version == '1.16.10' && matrix.os != 'windows-2019'" }
22922289
}
22932290
_#goTest(:ci): (#struct){
22942291
name: (string){ "Test" }
@@ -2641,7 +2638,7 @@ import "strings"
26412638
}).steps & [
26422639
_,
26432640
])[0]
2644-
_#codeGenGo: "1.15.15"
2641+
_#codeGenGo: "1.16.10"
26452642
_#latestStableGo: "1.17.3"
26462643
_#linuxMachine: "ubuntu-18.04"
26472644
_#macosMachine: "macos-10.15"
@@ -2651,7 +2648,6 @@ import "strings"
26512648
matrix: {
26522649
"go-version": [
26532650
〈3;_#codeGenGo〉,
2654-
"1.16.10",
26552651
〈3;_#latestStableGo〉,
26562652
]
26572653
os: [
@@ -2680,7 +2676,7 @@ import "strings"
26802676
})
26812677
_#cacheGoModules: (〈0;_#step〉 & {
26822678
name: "Cache Go modules"
2683-
uses: "actions/cache@v1"
2679+
uses: "actions/cache@v2"
26842680
with: {
26852681
path: "~/go/pkg/mod"
26862682
key: "${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}"

internal/ci/workflows.cue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ _#bashWorkflow: json.#Workflow & {
343343
_#job: ((json.#Workflow & {}).jobs & {x: _}).x
344344
_#step: ((_#job & {steps: _}).steps & [_])[0]
345345

346-
// We use the latest go1.15 for code generation
347-
_#codeGenGo: "1.15.15"
346+
// We use the latest go1.16 for code generation
347+
_#codeGenGo: "1.16.10"
348348

349349
// Use a specific latest version for release builds
350350
_#latestStableGo: "1.17.3"
@@ -356,7 +356,7 @@ _#windowsMachine: "windows-2019"
356356
_#testStrategy: {
357357
"fail-fast": false
358358
matrix: {
359-
"go-version": [_#codeGenGo, "1.16.10", _#latestStableGo]
359+
"go-version": [_#codeGenGo, _#latestStableGo]
360360
os: [_#linuxMachine, _#macosMachine, _#windowsMachine]
361361
}
362362
}
@@ -385,7 +385,7 @@ _#checkoutCode: _#step & {
385385

386386
_#cacheGoModules: _#step & {
387387
name: "Cache Go modules"
388-
uses: "actions/cache@v1"
388+
uses: "actions/cache@v2"
389389
with: {
390390
path: "~/go/pkg/mod"
391391
key: "${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}"

0 commit comments

Comments
 (0)