Skip to content

Commit c03a715

Browse files
committedApr 3, 2025·
internal/ci: test and release on Go 1.24
Our stable release binaries need to be built with the latest major version of Go, as otherwise users will see version incompatibility errors when trying to use `cue get go` with the latest Go toolchain. We also disable staticcheck at this point, given that the pinned version does not support Go 1.24 yet, and updating staticcheck to get newer warnings is not something we want to do in backporting release branches; we already do that in master. Updates #3868. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I8f18f117d4148a9bb93712a4fcc25192748eeee8 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1212810 Reviewed-by: Roger Peppe <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
1 parent df60e2f commit c03a715

File tree

4 files changed

+14
-30
lines changed

4 files changed

+14
-30
lines changed
 

‎.github/workflows/release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
uses: actions/setup-go@v5
5858
with:
5959
cache: false
60-
go-version: 1.23.5
60+
go-version: 1.24.2
6161
- name: Set common go env vars
6262
run: |-
6363
go env -w GOTOOLCHAIN=local

‎.github/workflows/trybot.yaml

+11-17
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
matrix:
2222
go-version:
2323
- 1.22.x
24-
- 1.23.x
24+
- 1.24.x
2525
runner:
2626
- ubuntu-24.04
2727
- macos-14
@@ -107,20 +107,20 @@ jobs:
107107
github.repository == 'cue-lang/cue' && (((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
108108
Dispatch-Trailer: {"type":"')))) || github.ref == 'refs/heads/ci/test')
109109
run: go clean -testcache
110-
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
110+
- if: (matrix.go-version == '1.24.x' && matrix.runner == 'ubuntu-24.04')
111111
name: Early git and code sanity checks
112112
run: go run ./internal/ci/checks
113113
- if: |-
114114
((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
115-
Dispatch-Trailer: {"type":"')))) || !(matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
115+
Dispatch-Trailer: {"type":"')))) || !(matrix.go-version == '1.24.x' && matrix.runner == 'ubuntu-24.04')
116116
name: Test
117117
run: go test ./...
118-
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
118+
- if: (matrix.go-version == '1.24.x' && matrix.runner == 'ubuntu-24.04')
119119
name: Test with -race
120120
env:
121121
GORACE: atexit_sleep_ms=10
122122
run: go test -race ./...
123-
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
123+
- if: (matrix.go-version == '1.24.x' && matrix.runner == 'ubuntu-24.04')
124124
name: Test on 32 bits
125125
env:
126126
GOARCH: "386"
@@ -133,35 +133,29 @@ jobs:
133133
credentials_json: ${{ secrets.E2E_GCLOUD_KEY }}
134134
if: |-
135135
github.repository == 'cue-lang/cue' && (((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
136-
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
136+
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.24.x' && matrix.runner == 'ubuntu-24.04')
137137
name: gcloud auth for end-to-end tests
138138
- if: |-
139139
github.repository == 'cue-lang/cue' && (((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
140-
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
140+
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.24.x' && matrix.runner == 'ubuntu-24.04')
141141
name: gcloud setup for end-to-end tests
142142
uses: google-github-actions/setup-gcloud@v2
143143
- if: |-
144144
github.repository == 'cue-lang/cue' && (((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
145-
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
145+
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.24.x' && matrix.runner == 'ubuntu-24.04')
146146
name: End-to-end test
147147
run: |-
148148
cd internal/_e2e
149149
go test -race
150150
env:
151151
CUE_TEST_TOKEN: ${{ secrets.E2E_PORCUEPINE_CUE_TOKEN }}
152-
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
152+
- if: (matrix.go-version == '1.24.x' && matrix.runner == 'ubuntu-24.04')
153153
name: Go checks
154154
run: |-
155155
go vet ./...
156156
go mod tidy
157157
(cd internal/_e2e && go test -run=-)
158-
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
159-
name: staticcheck
160-
uses: dominikh/staticcheck-action@v1
161-
with:
162-
version: 2024.1.1
163-
install-go: false
164-
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
158+
- if: (matrix.go-version == '1.24.x' && matrix.runner == 'ubuntu-24.04')
165159
name: Check all git tags are available
166160
run: |-
167161
cd $(mktemp -d)
@@ -177,7 +171,7 @@ jobs:
177171
echo "Did you forget about refs/attic branches? https://github.com/cue-lang/cue/wiki/Notes-for-project-maintainers"
178172
exit 1
179173
fi
180-
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
174+
- if: (matrix.go-version == '1.24.x' && matrix.runner == 'ubuntu-24.04')
181175
name: Generate
182176
env:
183177
CUE_TOKEN: ${{ secrets.NOTCUECKOO_CUE_TOKEN }}

‎internal/ci/github/trybot.cue

-10
Original file line numberDiff line numberDiff line change
@@ -181,16 +181,6 @@ workflows: trybot: _repo.bashWorkflow & {
181181
go mod tidy
182182
(cd internal/_e2e && go test -run=-)
183183
"""
184-
}, {
185-
name: "staticcheck"
186-
// TODO(mvdan): once we can do 'go tool staticcheck' with Go 1.24+,
187-
// then using this action is probably no longer worthwhile.
188-
// Note that we should then persist staticcheck's cache too.
189-
uses: "dominikh/staticcheck-action@v1"
190-
with: {
191-
version: "2024.1.1" // Pin a version for determinism.
192-
"install-go": false // We install Go ourselves.
193-
}
194184
},
195185
]
196186

‎internal/ci/repo/repo.cue

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ windowsMachine: "windows-2022"
3333
// Use the latest Go version for extra checks,
3434
// such as running tests with the data race detector.
3535
// This may be a release candidate if we are late into a Go release cycle.
36-
latestGo: "1.23.x"
36+
latestGo: "1.24.x"
3737

3838
// The list of all Go versions that we run our tests on.
3939
// This typically goes back one major Go version, as we support two at a time.
@@ -42,7 +42,7 @@ matrixGo: ["1.22.x", latestGo]
4242
// Use a specific latest version for release builds.
4343
// Note that we don't want ".x" for the sake of reproducibility,
4444
// so we instead pin a specific Go release.
45-
pinnedReleaseGo: "1.23.5"
45+
pinnedReleaseGo: "1.24.2"
4646

4747
goreleaserVersion: "v2.5.0"
4848

0 commit comments

Comments
 (0)
Please sign in to comment.