ci: drop go1.12 add go1.15
Switch to code generation happening against 1.14.9
Update README to reflect new minimum version of Go 1.13
Change-Id: If8d790fe6500a708a2ba7fd8737ffd380048a1be
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7021
Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index e68b3ee..fa75d65 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -16,9 +16,9 @@
fail-fast: false
matrix:
go-version:
- - 1.12.x
- 1.13.x
- - 1.14.3
+ - 1.14.9
+ - 1.15.x
os:
- ubuntu-latest
- macos-latest
@@ -38,15 +38,14 @@
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum')
}}
restore-keys: ${{ runner.os }}-${{ matrix.go-version }}-go-
- - if: matrix.go-version == '1.14.3' && matrix.os != 'windows-latest'
+ - if: matrix.go-version == '1.14.9' && matrix.os != 'windows-latest'
name: Generate
run: go generate ./...
- name: Test
run: go test ./...
- name: Test with -race
run: go test -race ./...
- - if: matrix.go-version == '1.14.3' || matrix.go-version == '1.13.x'
- name: gorelease check
+ - name: gorelease check
run: go run golang.org/x/exp/cmd/gorelease
- name: Check that git is clean post generate and tests
run: test -z "$(git status --porcelain)" || (git status; git diff; false)
diff --git a/.github/workflows/test_dispatch.yml b/.github/workflows/test_dispatch.yml
index 46a8b18..0aa8f64 100644
--- a/.github/workflows/test_dispatch.yml
+++ b/.github/workflows/test_dispatch.yml
@@ -42,15 +42,14 @@
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum')
}}
restore-keys: ${{ runner.os }}-${{ matrix.go-version }}-go-
- - if: matrix.go-version == '1.14.3' && matrix.os != 'windows-latest'
+ - if: matrix.go-version == '1.14.9' && matrix.os != 'windows-latest'
name: Generate
run: go generate ./...
- name: Test
run: go test ./...
- name: Test with -race
run: go test -race ./...
- - if: matrix.go-version == '1.14.3' || matrix.go-version == '1.13.x'
- name: gorelease check
+ - name: gorelease check
run: go run golang.org/x/exp/cmd/gorelease
- name: Check that git is clean post generate and tests
run: test -z "$(git status --porcelain)" || (git status; git diff; false)
@@ -66,9 +65,9 @@
fail-fast: false
matrix:
go-version:
- - 1.12.x
- 1.13.x
- - 1.14.3
+ - 1.14.9
+ - 1.15.x
os:
- ubuntu-latest
- macos-latest
diff --git a/README.md b/README.md
index b33ec3c..b17a09a 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@
[](https://github.com/cuelang/cue/actions)
[](https://goreportcard.com/report/github.com/cuelang/cue)
[](https://golangci.com/r/github.com/cuelang/cue)
-[](https://golang.org/dl/)
+[](https://golang.org/dl/)
[]()
diff --git a/internal/ci/workflows.cue b/internal/ci/workflows.cue
index 3b4432f..c182896 100644
--- a/internal/ci/workflows.cue
+++ b/internal/ci/workflows.cue
@@ -32,13 +32,14 @@
#job: ((json.#Workflow & {}).jobs & {x: _}).x
#step: ((#job & {steps: _}).steps & [_])[0]
-#latestGo: "1.14.3"
+// We need at least go1.14 for code generation
+#codeGenGo: "1.14.9"
#testStrategy: {
"fail-fast": false
matrix: {
// Use a stable version of 1.14.x for go generate
- "go-version": ["1.12.x", "1.13.x", #latestGo]
+ "go-version": ["1.13.x", #codeGenGo, "1.15.x"]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
}
}
@@ -70,9 +71,9 @@
#goGenerate: #step & {
name: "Generate"
run: "go generate ./..."
- // The Go version corresponds to the precise 1.14.x version specified in
+ // The Go version corresponds to the precise version specified in
// the matrix. Skip windows for now until we work out why re-gen is flaky
- if: "matrix.go-version == '\(#latestGo)' && matrix.os != 'windows-latest'"
+ if: "matrix.go-version == '\(#codeGenGo)' && matrix.os != 'windows-latest'"
}
#goTest: #step & {
@@ -88,9 +89,6 @@
#goReleaseCheck: #step & {
name: "gorelease check"
run: "go run golang.org/x/exp/cmd/gorelease"
- // Only run on 1.13.x and latest Go for now. Bug with Go 1.12.x means
- // this check fails
- if: "matrix.go-version == '\(#latestGo)' || matrix.go-version == '1.13.x'"
}
#checkGitClean: #step & {