Skip to content

Commit 5cf1aa1

Browse files
hrvolapetermyitcv
authored andcommitted
feat: update go build matrix
Add Go 1.17 to the build matrix and ensure that the latest version of Go is used to build release artefacts. Closes #1223 Signed-off-by: Peter Hrvola <[email protected]> Change-Id: Ica7e8f54623639a86ec0194b70347420c82e4ed8 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/526425 Reviewed-by: Paul Jolly <[email protected]>
1 parent 35c2f3c commit 5cf1aa1

File tree

5 files changed

+28
-22
lines changed

5 files changed

+28
-22
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Install Go
2020
uses: actions/setup-go@v2
2121
with:
22-
go-version: 1.15.8
22+
go-version: "1.17"
2323
stable: false
2424
- name: Setup qemu
2525
uses: docker/setup-qemu-action@v1

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
matrix:
3939
go-version:
4040
- 1.14.14
41+
- "1.17"
4142
- 1.15.8
4243
- "1.16"
4344
os:
@@ -80,7 +81,7 @@ jobs:
8081
- name: Test
8182
run: go test ./...
8283
- if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/ci/')
83-
&& matrix.go-version == '1.15.8' && matrix.os == 'ubuntu-18.04' }}
84+
&& matrix.go-version == '1.17' && matrix.os == 'ubuntu-18.04' }}
8485
name: Test with -race
8586
run: go test -race ./...
8687
- name: gorelease check

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
- name: Install Go
9393
uses: actions/setup-go@v2
9494
with:
95-
go-version: 1.15.8
95+
go-version: "1.17"
9696
stable: false
9797
- name: Setup qemu
9898
uses: docker/setup-qemu-action@v1
@@ -185,6 +185,7 @@ jobs:
185185
matrix:
186186
go-version:
187187
- 1.14.14
188+
- "1.17"
188189
- 1.15.8
189190
- "1.16"
190191
os:
@@ -227,7 +228,7 @@ jobs:
227228
- name: Test
228229
run: go test ./...
229230
- if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/ci/')
230-
&& matrix.go-version == '1.15.8' && matrix.os == 'ubuntu-18.04' }}
231+
&& matrix.go-version == '1.17' && matrix.os == 'ubuntu-18.04' }}
231232
name: Test with -race
232233
run: go test -race ./...
233234
- name: gorelease check
@@ -1372,15 +1373,15 @@ _#step: ((_#job & {
13721373
_#codeGenGo: "1.14.14"
13731374

13741375
// Use a specific latest version for release builds
1375-
_#latestStableGo: "1.15.8"
1376+
_#latestStableGo: "1.17"
13761377
_#linuxMachine: "ubuntu-18.04"
13771378
_#macosMachine: "macos-10.15"
13781379
_#windowsMachine: "windows-2019"
13791380
_#testStrategy: {
13801381
"fail-fast": false
13811382
matrix: {
13821383
// Use a stable version of 1.14.x for go generate
1383-
"go-version": [_#codeGenGo, _#latestStableGo, "1.16"]
1384+
"go-version": [_#codeGenGo, _#latestStableGo, "1.15.8", "1.16"]
13841385
os: [_#linuxMachine, _#macosMachine, _#windowsMachine]
13851386
}
13861387
}

cue/testdata/eval/github.txtar

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,15 @@ _#step: ((_#job & {
263263
_#codeGenGo: "1.14.14"
264264

265265
// Use a specific latest version for release builds
266-
_#latestStableGo: "1.15.8"
266+
_#latestStableGo: "1.17"
267267
_#linuxMachine: "ubuntu-18.04"
268268
_#macosMachine: "macos-10.15"
269269
_#windowsMachine: "windows-2019"
270270
_#testStrategy: {
271271
"fail-fast": false
272272
matrix: {
273273
// Use a stable version of 1.14.x for go generate
274-
"go-version": [_#codeGenGo, _#latestStableGo, "1.16"]
274+
"go-version": [_#codeGenGo, _#latestStableGo, "1.15.8", "1.16"]
275275
os: [_#linuxMachine, _#macosMachine, _#windowsMachine]
276276
}
277277
}
@@ -1089,8 +1089,9 @@ import "strings"
10891089
matrix: (#struct){
10901090
"go-version": (#list){
10911091
0: (string){ "1.14.14" }
1092-
1: (string){ "1.15.8" }
1093-
2: (string){ "1.16" }
1092+
1: (string){ "1.17" }
1093+
2: (string){ "1.15.8" }
1094+
3: (string){ "1.16" }
10941095
}
10951096
os: (#list){
10961097
0: (string){ "ubuntu-18.04" }
@@ -1144,7 +1145,7 @@ import "strings"
11441145
7: (#struct){
11451146
name: (string){ "Test with -race" }
11461147
run: (string){ "go test -race ./..." }
1147-
if: (string){ "${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/ci/') && matrix.go-version == '1.15.8' && matrix.os == 'ubuntu-18.04' }}" }
1148+
if: (string){ "${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/ci/') && matrix.go-version == '1.17' && matrix.os == 'ubuntu-18.04' }}" }
11481149
}
11491150
8: (#struct){
11501151
name: (string){ "gorelease check" }
@@ -1389,7 +1390,7 @@ import "strings"
13891390
name: (string){ "Install Go" }
13901391
uses: (string){ "actions/setup-go@v2" }
13911392
with: (#struct){
1392-
"go-version": (string){ "1.15.8" }
1393+
"go-version": (string){ "1.17" }
13931394
stable: (bool){ false }
13941395
}
13951396
}
@@ -1670,8 +1671,9 @@ import "strings"
16701671
matrix: (#struct){
16711672
"go-version": (#list){
16721673
0: (string){ "1.14.14" }
1673-
1: (string){ "1.15.8" }
1674-
2: (string){ "1.16" }
1674+
1: (string){ "1.17" }
1675+
2: (string){ "1.15.8" }
1676+
3: (string){ "1.16" }
16751677
}
16761678
os: (#list){
16771679
0: (string){ "ubuntu-18.04" }
@@ -1725,7 +1727,7 @@ import "strings"
17251727
7: (#struct){
17261728
name: (string){ "Test with -race" }
17271729
run: (string){ "go test -race ./..." }
1728-
if: (string){ "${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/ci/') && matrix.go-version == '1.15.8' && matrix.os == 'ubuntu-18.04' }}" }
1730+
if: (string){ "${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/ci/') && matrix.go-version == '1.17' && matrix.os == 'ubuntu-18.04' }}" }
17291731
}
17301732
8: (#struct){
17311733
name: (string){ "gorelease check" }
@@ -1964,7 +1966,7 @@ import "strings"
19641966
name: (string){ "Install Go" }
19651967
uses: (string){ "actions/setup-go@v2" }
19661968
with: (#struct){
1967-
"go-version": (string){ "1.15.8" }
1969+
"go-version": (string){ "1.17" }
19681970
stable: (bool){ false }
19691971
}
19701972
}
@@ -2238,7 +2240,7 @@ import "strings"
22382240
_#step(:ci): (#struct){
22392241
}
22402242
_#codeGenGo(:ci): (string){ "1.14.14" }
2241-
_#latestStableGo(:ci): (string){ "1.15.8" }
2243+
_#latestStableGo(:ci): (string){ "1.17" }
22422244
_#linuxMachine(:ci): (string){ "ubuntu-18.04" }
22432245
_#macosMachine(:ci): (string){ "macos-10.15" }
22442246
_#windowsMachine(:ci): (string){ "windows-2019" }
@@ -2247,8 +2249,9 @@ import "strings"
22472249
matrix: (#struct){
22482250
"go-version": (#list){
22492251
0: (string){ "1.14.14" }
2250-
1: (string){ "1.15.8" }
2251-
2: (string){ "1.16" }
2252+
1: (string){ "1.17" }
2253+
2: (string){ "1.15.8" }
2254+
3: (string){ "1.16" }
22522255
}
22532256
os: (#list){
22542257
0: (string){ "ubuntu-18.04" }
@@ -2643,7 +2646,7 @@ import "strings"
26432646
_,
26442647
])[0]
26452648
_#codeGenGo: "1.14.14"
2646-
_#latestStableGo: "1.15.8"
2649+
_#latestStableGo: "1.17"
26472650
_#linuxMachine: "ubuntu-18.04"
26482651
_#macosMachine: "macos-10.15"
26492652
_#windowsMachine: "windows-2019"
@@ -2653,6 +2656,7 @@ import "strings"
26532656
"go-version": [
26542657
〈2;_#codeGenGo〉,
26552658
〈2;_#latestStableGo〉,
2659+
"1.15.8",
26562660
"1.16",
26572661
]
26582662
os: [

internal/ci/workflows.cue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ _#step: ((_#job & {steps: _}).steps & [_])[0]
347347
_#codeGenGo: "1.14.14"
348348

349349
// Use a specific latest version for release builds
350-
_#latestStableGo: "1.15.8"
350+
_#latestStableGo: "1.17"
351351

352352
_#linuxMachine: "ubuntu-18.04"
353353
_#macosMachine: "macos-10.15"
@@ -357,7 +357,7 @@ _#testStrategy: {
357357
"fail-fast": false
358358
matrix: {
359359
// Use a stable version of 1.14.x for go generate
360-
"go-version": [_#codeGenGo, _#latestStableGo, "1.16"]
360+
"go-version": [_#codeGenGo, _#latestStableGo, "1.15.8", "1.16"]
361361
os: [_#linuxMachine, _#macosMachine, _#windowsMachine]
362362
}
363363
}

0 commit comments

Comments
 (0)